Skip to content

Commit 16cb16e

Browse files
committed
x86/build: Remove -ffreestanding on i386 with GCC
The use of -ffreestanding is a leftover that is only needed for certain versions of Clang. Adjust this to be Clang-only. A later patch will make this a versioned check. Acked-by: Ingo Molnar <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
1 parent 47f4af4 commit 16cb16e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/x86/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ ifeq ($(CONFIG_X86_32),y)
137137
include $(srctree)/arch/x86/Makefile_32.cpu
138138
KBUILD_CFLAGS += $(cflags-y)
139139

140-
# temporary until string.h is fixed
140+
ifeq ($(CONFIG_CC_IS_CLANG),y)
141+
# https://github.com/llvm/llvm-project/issues/53645
141142
KBUILD_CFLAGS += -ffreestanding
143+
endif
142144

143145
ifeq ($(CONFIG_STACKPROTECTOR),y)
144146
ifeq ($(CONFIG_SMP),y)

0 commit comments

Comments
 (0)