Refresh "kbuild: Use -nostdinc in compile tests"

This commit is contained in:
Salvatore Bonaccorso 2020-06-22 21:49:01 +02:00
parent 1965b86044
commit 0bf54c7df4
1 changed files with 9 additions and 13 deletions

View File

@ -20,10 +20,8 @@ References: https://bugs.debian.org/717557
References: https://bugs.debian.org/726861 References: https://bugs.debian.org/726861
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
--- ---
Index: linux/scripts/Kbuild.include --- a/scripts/Kbuild.include
=================================================================== +++ b/scripts/Kbuild.include
--- linux.orig/scripts/Kbuild.include
+++ linux/scripts/Kbuild.include
@@ -121,7 +121,7 @@ CC_OPTION_CFLAGS = $(filter-out $(GCC_PL @@ -121,7 +121,7 @@ CC_OPTION_CFLAGS = $(filter-out $(GCC_PL
# Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
@ -71,20 +69,18 @@ Index: linux/scripts/Kbuild.include
# ld-option # ld-option
# Usage: KBUILD_LDFLAGS += $(call ld-option, -X, -Y) # Usage: KBUILD_LDFLAGS += $(call ld-option, -X, -Y)
Index: linux/Makefile --- a/Makefile
=================================================================== +++ b/Makefile
--- linux.orig/Makefile @@ -661,6 +661,8 @@ else
+++ linux/Makefile KBUILD_CFLAGS += -O2
@@ -668,6 +668,8 @@ endif endif
KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0409, \
$(call cc-disable-warning,maybe-uninitialized,))
+NOSTDINC_FLAGS += -nostdinc +NOSTDINC_FLAGS += -nostdinc
+ +
# Tell gcc to never replace conditional load with a non-conditional one # Tell gcc to never replace conditional load with a non-conditional one
KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0) KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
KBUILD_CFLAGS += $(call cc-option,-fno-allow-store-data-races)
@@ -787,7 +789,7 @@ LDFLAGS_vmlinux += --gc-sections @@ -781,7 +783,7 @@ LDFLAGS_vmlinux += --gc-sections
endif endif
# arch Makefile may override CC so keep this after arch Makefile is included # arch Makefile may override CC so keep this after arch Makefile is included