diff options
| author | Mark Brown <broonie@kernel.org> | 2026-05-29 17:41:26 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-05-29 17:41:26 +0100 |
| commit | 5e1c8f483f4cdab4413f87458735f2c724663938 (patch) | |
| tree | 7a7363ccaf26b6f6e78f13c10b7f0ff0a0d227d8 /arch | |
| parent | d471041854bdf87649e06be8713684d8476e40af (diff) | |
| parent | 880fa3a1e5c493d0deafe9153f8c2bed427b9428 (diff) | |
| download | linux-next-history-5e1c8f483f4cdab4413f87458735f2c724663938.tar.gz | |
Merge branch 'rust-fixes' of https://github.com/Rust-for-Linux/linux.git
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm/Kconfig | 2 | ||||
| -rw-r--r-- | arch/x86/Makefile | 4 | ||||
| -rw-r--r-- | arch/x86/Makefile.um | 8 |
3 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 71fc5dd4123f3..73e6647bea463 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -136,7 +136,7 @@ config ARM select MMU_GATHER_RCU_TABLE_FREE if SMP && ARM_LPAE select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_RSEQ - select HAVE_RUST if CPU_LITTLE_ENDIAN && CPU_32v7 + select HAVE_RUST if CPU_LITTLE_ENDIAN && CPU_32v7 && !KASAN select HAVE_STACKPROTECTOR select HAVE_SYSCALL_TRACEPOINTS select HAVE_UID16 diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 46fec0b08487a..1d526a5d2a831 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -77,6 +77,10 @@ KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-sse4a KBUILD_RUSTFLAGS += --target=$(objtree)/scripts/target.json KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 +# The target.json file is not available when invoking rustc-option, so use the +# built-in target when checking whether flags are supported instead. +KBUILD_RUSTFLAGS_OPTION_CHKS += --target=x86_64-unknown-none + # # CFLAGS for compiling floating point code inside the kernel. # diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um index 19c13afa474e9..9adecd65639f3 100644 --- a/arch/x86/Makefile.um +++ b/arch/x86/Makefile.um @@ -14,6 +14,14 @@ endif KBUILD_RUSTFLAGS += --target=$(objtree)/scripts/target.json +# The target.json file is not available when invoking rustc-option, so use the +# built-in target when checking whether flags are supported instead. +ifeq ($(CONFIG_X86_32),y) +KBUILD_RUSTFLAGS_OPTION_CHKS += --target=i686-unknown-linux-gnu +else +KBUILD_RUSTFLAGS_OPTION_CHKS += --target=x86_64-unknown-linux-gnu +endif + ifeq ($(CONFIG_X86_32),y) START := 0x8048000 |
