Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2394012imm; Sun, 9 Sep 2018 23:50:34 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY4GukzCMK9sT3xXovHKvqqiTcQ/WtYbzZh6ciz2F9O163HOvlZKz/IVGQKSfuEq8p8reiL X-Received: by 2002:a63:c702:: with SMTP id n2-v6mr21384294pgg.108.1536562234463; Sun, 09 Sep 2018 23:50:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536562234; cv=none; d=google.com; s=arc-20160816; b=W8GO514YjEnPtivM58vYU2ZRx2KQ3G1x7UVz69JxVE8dt6S0X2ICbpHyD7CYaLni+L /ABjxQ4FHWTtuDuU6q2H+2T3NjqmvYZxRMQMi+K3vEkfmrvh96bI52R9/JGNVbDStht5 XFCCmDAgI/Fo+VtfoJRTz5Y6zpmjVOzEKqalzQWmHqH+9CrpXzZA6epumAiUuNl9beEz onAPHdTDDxfgNBnaZt3kA58bprxx7O3O5bdIajf07hv8EzCvqfUnjmpJ8o6Ev3/HLhwQ N2N5EhlJwjm1b/BT1VXhTytwqEV64X0lU2CVuNWraNQ6sv5ItGeU+8Gv6GX4bTKDrCWd 8UCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=dSkMTx7sa9KmbFf2XiQSyvL8uvaa12TjHosWZOEDDZ0=; b=pWtOYHHguBPuhNfjcD8k4UL8SJyFHVvk+oBP3nd36psc7vugUCciGymijGHvz9sbzW FXZ6wdxL9UMfhb7oPpd/G3tzKE89nCUF27xMhOiXuMA8S0G9yzPPbiiEksn7AEQFjHzi XKVVestNHtXCQD1XL+fNbL9H7UeWR1w+CPH4SbYTMteC83R8XNQBga6wjwR5rkaejDoG jBhbazPZjM2znKm9Dtar0eZgN5sIOG7Ibnd4aZh3PCccNpZvLBwQp4bnonV+574zGPao anhh6KmbKgF9588WoHRA3ho5nCyk/EEMWVcRNBLcWzr9Gj+uQvnavEO9hfw+NH3lrm/N ZXIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d3-v6si16482533pla.37.2018.09.09.23.50.18; Sun, 09 Sep 2018 23:50:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727584AbeIJLlk (ORCPT + 99 others); Mon, 10 Sep 2018 07:41:40 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:59412 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbeIJLlk (ORCPT ); Mon, 10 Sep 2018 07:41:40 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 427zCv4sx7z9ttC0; Mon, 10 Sep 2018 08:48:59 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 9Zbu56X4XYPd; Mon, 10 Sep 2018 08:48:59 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 427zCv4MGhz9ttBY; Mon, 10 Sep 2018 08:48:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0407C8B78B; Mon, 10 Sep 2018 08:49:08 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 0ySsMJ1khwLE; Mon, 10 Sep 2018 08:49:07 +0200 (CEST) Received: from PO15451 (po15451.idsi0.si.c-s.fr [172.25.231.3]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C31CC8B789; Mon, 10 Sep 2018 08:49:07 +0200 (CEST) Subject: Re: Conflict between sparse and commit cafa0010cd51f ("Raise the minimum required gcc version to 4.6") To: Nick Desaulniers , Luc Van Oostenryck Cc: joe@perches.com, Kees Cook , LKML , linux-sparse@vger.kernel.org, sparse@chrisli.org References: <81a5fd11-366c-0897-4143-d8d041420a41@c-s.fr> <1324e7d6-83f8-f40f-ad34-c46e4ad3139b@c-s.fr> <20180907181337.peyfq7yvhahduvmq@ltop.local> From: Christophe LEROY Message-ID: Date: Mon, 10 Sep 2018 08:49:07 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 07/09/2018 à 20:19, Nick Desaulniers a écrit : > On Fri, Sep 7, 2018 at 11:13 AM Luc Van Oostenryck > wrote: >> >> On Fri, Sep 07, 2018 at 10:22:56AM -0700, Nick Desaulniers wrote: >>> On Fri, Sep 7, 2018 at 7:34 AM Christophe LEROY wrote: >>>> >>>> Cc linux-sparse@vger.kernel.org >>>> >>>> Le 07/09/2018 à 14:22, Christophe Leroy a écrit : >>>>> Since commit cafa0010cd51f ("Raise the minimum required gcc version to >>>>> 4.6"), sparse check fails as follows: >>>>> >>>>> [root@pc16082vm linux-powerpc]# make C=2 arch/powerpc/kernel/process.o >>>>> CALL scripts/checksyscalls.sh >>>>> CHECK scripts/mod/empty.c >>>>> ./include/linux/compiler-gcc.h:14:3: error: Sorry, your compiler is too >>>>> old - please upgrade it. >>>>> CHECK arch/powerpc/kernel/process.c >>>>> ./include/linux/compiler-gcc.h:14:3: error: Sorry, your compiler is too >>>>> old - please upgrade it. >>>>> >>>>> >>>>> I have sparse version 0.5.2 >>>>> >>>>> What can be done to fix that ? >>>>> >>>>> Christophe >>> >>> Oof, sorry Christophe. Looks like that's the latest version of sparse: >>> https://sparse.wiki.kernel.org/index.php/Main_Page#News >>> >>> I'm curious what sparse expands __GNUC__, __GNUC_MINOR__, and >>> __GNUC_PATCHLEVEL__ to? Pre commit cafa0010cd51f, it MUST be >>> expanding them to something, otherwise you'd have seen the error then, >>> too. The previous check was GCC < 3.3, now it's GCC < 4.6. >> >> Sparse expand these macros to the same version than the compiler used >> to compile GCC. I find a bit strange though to have sparse v0.5.2 but >> using an old compiler. > > So Christophe must have a version of gcc < 4.6 installed somewhere? > Does sparse use `cc`? If so, Christophe, does your `ls -l $(which cc)` > point to an old version of gcc maybe? Indeed it looks like sparse expand these macros to the version of the compiler it was compiled with. I'm building kernels for a powerpc platforms, with CROSS_COMPILE set to ppc-linux- and ppc-linux-gcc being version 5.4 However my build machine is a CentOS6 and the native gcc has version 4.4.7, so sparse expands that version. Is there a way to get sparse in line with my cross compiler version and not with the local native version ? Christophe > >> >> Also, it's worth to look at what is said in this email: >> https://lore.kernel.org/lkml/CA+55aFzYEnZR2GZLR-DwpONjMNYGYoDy+6AWLCVNayWiaZuqoA@mail.gmail.com/ >> >> >> -- Luc > > >