Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp495934imm; Mon, 4 Jun 2018 22:51:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIQXXhW3xmeH+K197ce6Rb1NxxRJlunBQXt5dug8kywvkzwjvkeDrAQ4TRBkGT7HvZWVChZ X-Received: by 2002:a63:720f:: with SMTP id n15-v6mr20153376pgc.12.1528177911729; Mon, 04 Jun 2018 22:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528177911; cv=none; d=google.com; s=arc-20160816; b=vjdYCQq4+U0wquLiYpx+tpItIG34zQrJ8NzW5ytAh6QxgxGuVwa0xqAkZB+rv+SJqH Wp8FlsPBajyTXs+erpPSe2Fr+EZSBvHDE10uB5XagcXy2cdGLqRn/Rb7lcmmJRMe4f+e 9UNZPppydu/q9uYzyWFczvkiUnOtfT04TgU3QJifo6yS4Rd6D5iA7yCOuI40B+9Fkopl i8UpOSTzGbJ8T247ovVqZEAPdIt4mK2EYRfspv8UfmajrUtwf8uyRVlHCY3KeSlJEOyA N8RzY4B/oYt/Q3uRF4mc32DtHwfDYfS2w/u2X6SaMc8tSGrvj1QJ6JSJBMHKWT5eewtd DgSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=9BU/K1675wwYZyDdChk+vcPqxlswuLDZ+/6RHDQab2c=; b=lPkkOS+Nh7pZ6rMojl24O65WFZP/s2ThDcLF2GqLrd0imQQTInyqr81gFkMjoW5dCK ic0FPinn9eVRClN1tQuI1eulQ1NSCyepAl1ytAsiR2wF0KSQxyHB1kLdI5TQynwS156p ib1JLIVA1B+Wb0FtlCsalalkFrl1Cd0zrC6XjyfRjUjK66OSK+d9pFk6gW9vT/921qyL 3B+rjeh2ltnAGxEB2OXHom+h9LTI6yhuuuNU9/rq8wGtZApoSsA3DpJ7r/YIbh6/fiGa MBPi2WS43eP6/VMNxQ0ZfILlxUPyi7cCMiYXVwuqIcLhu3/cq9iko+gRMeS0detYRVRn lkiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=XOyQ9TS1; 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 y15-v6si7551936pgr.555.2018.06.04.22.51.37; Mon, 04 Jun 2018 22:51:51 -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; dkim=pass header.i=@agner.ch header.s=dkim header.b=XOyQ9TS1; 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 S1751642AbeFEFu7 (ORCPT + 99 others); Tue, 5 Jun 2018 01:50:59 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:55086 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534AbeFEFu6 (ORCPT ); Tue, 5 Jun 2018 01:50:58 -0400 Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 9174B5C1F4E; Tue, 5 Jun 2018 07:50:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1528177856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9BU/K1675wwYZyDdChk+vcPqxlswuLDZ+/6RHDQab2c=; b=XOyQ9TS1G6eMUVC5sVKHjbm3ktdzEjIK+sWUyTFyT7r+Gf3eKZ5hZ56N+j/LZ+GDOs0hoR z8NE9jXhX8TxO7xlqHKbnbYlzv0LjMFt3ESSYAVVusu+O3oSCvSqHOB2XiY23K+WbMcoGp eXZ9o689C6u2Xa/sOif+S9szLZ7g1Qw= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Tue, 05 Jun 2018 07:50:56 +0200 From: Stefan Agner To: Masahiro Yamada Cc: Linux Kbuild mailing list , Linux Kernel Mailing List , Kees Cook , Nicholas Piggin , "Luis R . Rodriguez" , Randy Dunlap , Ulf Magnusson , Sam Ravnborg , Linus Torvalds , linux-kbuild-owner@vger.kernel.org Subject: Re: [PATCH v5 24/31] kconfig: add CC_IS_GCC and GCC_VERSION In-Reply-To: References: <1527499328-13213-1-git-send-email-yamada.masahiro@socionext.com> <1527499328-13213-25-git-send-email-yamada.masahiro@socionext.com> Message-ID: <9a58f4b4e488a3bfc41aba39bc73f8ff@agner.ch> X-Sender: stefan@agner.ch User-Agent: Roundcube Webmail/1.3.4 X-Spamd-Result: default: False [-3.05 / 15.00]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_SEVEN(0.00)[11]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.95)[99.80%]; ARC_NA(0.00)[] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05.06.2018 02:07, Masahiro Yamada wrote: > Hi Stefan > > 2018-06-05 6:49 GMT+09:00 Stefan Agner : >> Hi Masahiro, >> >> On 28.05.2018 11:22, Masahiro Yamada wrote: >>> This will be useful to specify the required compiler version, >>> like this: >>> >>> config FOO >>> bool "Use Foo" >>> depends on GCC_VERSION >= 40800 >>> help >>> This feature requires GCC 4.8 or newer. >>> >> >> I tried using CC_IS_GCC today while using clang. It seems that it is set >> to y despite I am using CC=clang. >> >> .config looks like this after config: >> >> ... >> CONFIG_CC_IS_GCC=y >> CONFIG_GCC_VERSION=40201 >> CONFIG_CC_IS_CLANG=y >> CONFIG_CLANG_VERSION=60000 >> ... >> >> >> I am using clang 6.0.0 on Arch Linux, which seems to return a version >> when using gcc-version.sh: >> ./scripts/gcc-version.sh clang | sed 's/^0*//' >> 402 >> >> I guess that should not be the case? >> > > > What will 'clang --version' print on your machine? $ clang --version clang version 6.0.0 (tags/RELEASE_600/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /home/ags/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf/bin I use a symlink to clang in my cross compiler toolchain, that is why InstalledDir points to a GCC toolchain. -- Stefan