lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d7e0fbca-7e9d-fbe2-6f8c-6e60a78f56df@gmail.com>
Date:   Wed, 16 Nov 2022 14:56:09 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Masahiro Yamada <masahiroy@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Paul Gortmaker <paul.gortmaker@...driver.com>,
        Nathan Chancellor <natechancellor@...il.com>, ojeda@...nel.org,
        sedat.dilek@...il.com
Subject: Re: kbuild: check the minimum compiler version in Kconfig

On 11/16/22 14:48, Nick Desaulniers wrote:
> On Wed, Nov 16, 2022 at 1:48 PM Florian Fainelli <f.fainelli@...il.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.

Setting HOSTCC three times is done by buildroot, it does it through make 
flags, and then variables passed to make etc. clearly we could change 
that, but that's out of scope is not it?
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ