summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-04-15 04:35:52 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2019-05-03 11:17:58 -0400
commit96fb54a180894dc3c6821aa3297a3eb8b27f03c5 (patch)
treeaecbe102753ffe4b61c5ba9927873f1fca822fe4
parentc263a4e990b7296b074e33aa077239a0a28a818e (diff)
s390: boot, purgatory: pass $(CLANG_FLAGS) where needed
The purgatory and boot Makefiles do not inherit the original cflags, so clang falls back to the default target architecture when building it, typically this would be x86 when cross-compiling. Add $(CLANG_FLAGS) everywhere so we pass the correct --target=s390x-linux option when cross-compiling. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/Makefile4
-rw-r--r--arch/s390/purgatory/Makefile1
2 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index 54b8a12d64e8..df1d6a150f30 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -21,9 +21,9 @@ KBUILD_CFLAGS += -fPIE
21LDFLAGS_vmlinux := -pie 21LDFLAGS_vmlinux := -pie
22endif 22endif
23aflags_dwarf := -Wa,-gdwarf-2 23aflags_dwarf := -Wa,-gdwarf-2
24KBUILD_AFLAGS_DECOMPRESSOR := -m64 -D__ASSEMBLY__ 24KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__
25KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) 25KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf))
26KBUILD_CFLAGS_DECOMPRESSOR := -m64 -O2 26KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2
27KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY 27KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY
28KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float 28KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float
29KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables 29KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables
diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile
index b20934d91986..dc1ae4ff79d7 100644
--- a/arch/s390/purgatory/Makefile
+++ b/arch/s390/purgatory/Makefile
@@ -20,6 +20,7 @@ KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes
20KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare 20KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
21KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding 21KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding
22KBUILD_CFLAGS += -c -MD -Os -m64 -msoft-float -fno-common 22KBUILD_CFLAGS += -c -MD -Os -m64 -msoft-float -fno-common
23KBUILD_CFLAGS += $(CLANG_FLAGS)
23KBUILD_CFLAGS += $(call cc-option,-fno-PIE) 24KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
24KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS)) 25KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS))
25 26