Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH] selftests: fix LLVM build for i386 and x86_64
@ 2022-08-09 14:22 Guillaume Tucker
  2022-08-09 16:41 ` Nathan Chancellor
  0 siblings, 1 reply; 3+ messages in thread
From: Guillaume Tucker @ 2022-08-09 14:22 UTC (permalink / raw)
  To: Shuah Khan, Nathan Chancellor, Nick Desaulniers, Tom Rix,
	Mark Brown
  Cc: kernel, linux-kernel, linux-kselftest, llvm

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@collabora.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] selftests: fix LLVM build for i386 and x86_64
  2022-08-09 14:22 [PATCH] selftests: fix LLVM build for i386 and x86_64 Guillaume Tucker
@ 2022-08-09 16:41 ` Nathan Chancellor
  2023-02-04 13:19   ` Guillaume Tucker
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2022-08-09 16:41 UTC (permalink / raw)
  To: Guillaume Tucker
  Cc: Shuah Khan, Nick Desaulniers, Tom Rix, Mark Brown, kernel,
	linux-kernel, linux-kselftest, llvm

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@collabora.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@kernel.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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] selftests: fix LLVM build for i386 and x86_64
  2022-08-09 16:41 ` Nathan Chancellor
@ 2023-02-04 13:19   ` Guillaume Tucker
  0 siblings, 0 replies; 3+ messages in thread
From: Guillaume Tucker @ 2023-02-04 13:19 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Shuah Khan, Nick Desaulniers, Tom Rix, Mark Brown, kernel,
	linux-kernel, linux-kselftest, llvm

Hi Shuah, Nathan,

On 09/08/2022 18:41, Nathan Chancellor wrote:
> 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@collabora.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@kernel.org>

Thanks for the review.

Could you please apply this patch?  It looks like it was
forgotten like the one with the missing trailing ')' I sent
around that time (now fixed with Mark's patch).

Alternatively, please let me know if anything else needs to be
done for it.

Thanks,
Guillaume

>> ---
>>  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
>>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-04 13:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-09 14:22 [PATCH] selftests: fix LLVM build for i386 and x86_64 Guillaume Tucker
2022-08-09 16:41 ` Nathan Chancellor
2023-02-04 13:19   ` Guillaume Tucker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox