From: Florian Fainelli <f.fainelli@gmail.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Nathan Chancellor <natechancellor@gmail.com>,
ojeda@kernel.org, sedat.dilek@gmail.com,
clang-built-linux <llvm@lists.linux.dev>,
Manoj Gupta <manojgupta@google.com>
Subject: Re: kbuild: check the minimum compiler version in Kconfig
Date: Wed, 16 Nov 2022 15:16:32 -0800 [thread overview]
Message-ID: <15631f6a-dae6-b996-6e74-1bf7304b30a0@gmail.com> (raw)
In-Reply-To: <CAKwvOdmP+VgjsJGuvuC9q3RbwpqUwoNg6cyv3f5SjAqLc2K3_Q@mail.gmail.com>
On 11/16/22 15:11, Nick Desaulniers wrote:
> On Wed, Nov 16, 2022 at 3:10 PM Nick Desaulniers
> <ndesaulniers@google.com> wrote:
>>
>> On Wed, Nov 16, 2022 at 2:56 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>>>
>>> On 11/16/22 14:48, Nick Desaulniers wrote:
>>>> On Wed, Nov 16, 2022 at 1:48 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>>>>>
>>>>> Hi Masahiro, Nick,
>>>>>
>>>>> The compiler version check performed with
>>>>> aec6c60a01d3a3170242d6a99372a388e1136dc6 ("kbuild: check the minimum
>>>>> compiler version in Kconfig") can be defeated and prevent running the
>>>>> *config targets if specifying LLVM=1 on the command line, in that way:
>>>>>
>>>>> BR_BINARIES_DIR=/local/users/fainelli/buildroot-llvm/output/arm64/images
>>>>> LLVM=1 LLVM_IAS=1 PKG_CONFIG_PATH="" /usr/bin/make -j49 -C
>>>>> /local/users/fainelli/buildroot-llvm/output/arm64/build/linux-custom
>>>>> HOSTCC="/usr/bin/gcc"
>>>>> HOSTCC="/local/users/fainelli/buildroot-llvm/output/arm64/host/bin/ccache
>>>>> /usr/bin/gcc -O2
>>>>> -I/local/users/fainelli/buildroot-llvm/output/arm64/host/include
>>>>> -DNDEBUG -L/local/users/fainelli/buildroot-llvm/output/arm64/host/lib
>>>>> -Wl,-rpath,/local/users/fainelli/buildroot-llvm/output/arm64/host/lib"
>>>>> ARCH=arm64
>>>>> INSTALL_MOD_PATH=/local/users/fainelli/buildroot-llvm/output/arm64/target
>>>>> CROSS_COMPILE="/local/users/fainelli/buildroot-llvm/output/arm64/host/bin/aarch64-linux-"
>>>>> WERROR=0
>>>>> DEPMOD=/local/users/fainelli/buildroot-llvm/output/arm64/host/sbin/depmod
>>>>> INSTALL_MOD_STRIP=1 HOSTCC="/usr/bin/gcc" menuconfig
>>>>> UPD scripts/kconfig/mconf-cfg
>>>>> HOSTCC scripts/kconfig/mconf.o
>>>>> HOSTCC scripts/kconfig/lxdialog/checklist.o
>>>>> HOSTCC scripts/kconfig/lxdialog/inputbox.o
>>>>> HOSTCC scripts/kconfig/lxdialog/menubox.o
>>>>> HOSTCC scripts/kconfig/lxdialog/textbox.o
>>>>> HOSTCC scripts/kconfig/lxdialog/util.o
>>>>> HOSTCC scripts/kconfig/lxdialog/yesno.o
>>>>> HOSTLD scripts/kconfig/mconf
>>>>> ***
>>>>> *** Compiler is too old.
>>>>> *** Your Clang version: 10.0.0
>>>>> *** Minimum Clang version: 10.0.1
>>>>> ***
>>>>> scripts/Kconfig.include:44: Sorry, this compiler is not supported.
>>>>>
>>>>> Here, the compiler check is actually checking the host compiler clang
>>>>> version installed on my Ubuntu 20.04 system, as opposed to the cross
>>>>> compiler clang version that is being used.
>>>>
>>>> LLVM=1 will use `clang` as found by your $PATH. Where did you express
>>>> to make what the "cross compiler clang version" is? (And why do you
>>>> set HOSTCC three times)
>>>
>>> We are setting CROSS_COMPILE to express the cross compiler clang prefix
>>> to use.
>>
>> Can you try setting CLANG_PREFIX rather than CROSS_COMPILE (to the same value)?
>>
>> CLANG_PREFIX=/local/users/fainelli/buildroot-llvm/output/arm64/host/bin/aarch64-linux-
>
> sorry, I meant LLVM_PREFIX
Same results unfortunately.
--
Florian
next prev parent reply other threads:[~2022-11-16 23:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 21:48 Florian Fainelli
2022-11-16 22:48 ` Nick Desaulniers
2022-11-16 22:56 ` Florian Fainelli
2022-11-16 23:10 ` Nick Desaulniers
2022-11-16 23:11 ` Nick Desaulniers
2022-11-16 23:16 ` Florian Fainelli [this message]
2022-11-16 23:24 ` Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15631f6a-dae6-b996-6e74-1bf7304b30a0@gmail.com \
--to=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=manojgupta@google.com \
--cc=masahiroy@kernel.org \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=ojeda@kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=sedat.dilek@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®