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]
Date:   Tue, 9 Aug 2022 09:41:59 -0700
From:   Nathan Chancellor <nathan@...nel.org>
To:     Guillaume Tucker <guillaume.tucker@...labora.com>
Cc:     Shuah Khan <shuah@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tom Rix <trix@...hat.com>, Mark Brown <broonie@...nel.org>,
        kernel@...labora.com, linux-kernel@...r.kernel.org,
        linux-kselftest@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] selftests: fix LLVM build for i386 and x86_64

On Tue, Aug 09, 2022 at 04:22:31PM +0200, Guillaume Tucker wrote:
> Add missing cases for the i386 and x86_64 architectures when
> determining the LLVM target for building kselftest.
> 
> Fixes: 795285ef2425 ("selftests: Fix clang cross compilation")
> Signed-off-by: Guillaume Tucker <guillaume.tucker@...labora.com>

Right, I think this is the correct thing to do for the selftests. For
the main kernel build, we use CLANG_TARGETS_FLAGS_x86 because ARCH=i386
and ARCH=x86_64 are covered by SUBARCH=x86, which is what we switch on,
rather than ARCH. I do see a couple of references to SUBARCH in the
tools directory but I am not sure if that is usable for this part so:

Reviewed-by: Nathan Chancellor <nathan@...nel.org>

> ---
>  tools/testing/selftests/lib.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
> index b1c62914366b..cc4c443d5b14 100644
> --- a/tools/testing/selftests/lib.mk
> +++ b/tools/testing/selftests/lib.mk
> @@ -10,12 +10,14 @@ endif
>  CLANG_TARGET_FLAGS_arm          := arm-linux-gnueabi
>  CLANG_TARGET_FLAGS_arm64        := aarch64-linux-gnu
>  CLANG_TARGET_FLAGS_hexagon      := hexagon-linux-musl
> +CLANG_TARGET_FLAGS_i386         := i386-linux-gnu
>  CLANG_TARGET_FLAGS_m68k         := m68k-linux-gnu
>  CLANG_TARGET_FLAGS_mips         := mipsel-linux-gnu
>  CLANG_TARGET_FLAGS_powerpc      := powerpc64le-linux-gnu
>  CLANG_TARGET_FLAGS_riscv        := riscv64-linux-gnu
>  CLANG_TARGET_FLAGS_s390         := s390x-linux-gnu
>  CLANG_TARGET_FLAGS_x86          := x86_64-linux-gnu
> +CLANG_TARGET_FLAGS_x86_64       := x86_64-linux-gnu
>  CLANG_TARGET_FLAGS              := $(CLANG_TARGET_FLAGS_$(ARCH))
>  
>  ifeq ($(CROSS_COMPILE),)
> -- 
> 2.30.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ