aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/Makefile')
-rw-r--r--arch/s390/Makefile24
1 files changed, 21 insertions, 3 deletions
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index de54cfc6109d..2ced3239cb84 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -78,6 +78,16 @@ ifeq ($(call cc-option-yn,-mwarn-dynamicstack),y)
cflags-$(CONFIG_WARN_DYNAMIC_STACK) += -mwarn-dynamicstack
endif
+ifdef CONFIG_EXPOLINE
+ ifeq ($(call cc-option-yn,$(CC_FLAGS_MARCH) -mindirect-branch=thunk),y)
+ CC_FLAGS_EXPOLINE := -mindirect-branch=thunk
+ CC_FLAGS_EXPOLINE += -mfunction-return=thunk
+ CC_FLAGS_EXPOLINE += -mindirect-branch-table
+ export CC_FLAGS_EXPOLINE
+ cflags-y += $(CC_FLAGS_EXPOLINE)
+ endif
+endif
+
ifdef CONFIG_FUNCTION_TRACER
# make use of hotpatch feature if the compiler supports it
cc_hotpatch := -mhotpatch=0,3
@@ -88,9 +98,13 @@ KBUILD_CFLAGS += -DCC_USING_HOTPATCH
endif
endif
+# Test CFI features of binutils
+cfi := $(call as-instr,.cfi_startproc\n.cfi_val_offset 15$(comma)-160\n.cfi_endproc,-DCONFIG_AS_CFI_VAL_OFFSET=1)
+
KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y)
KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare
-KBUILD_AFLAGS += $(aflags-y)
+KBUILD_CFLAGS += -fno-asynchronous-unwind-tables $(cfi)
+KBUILD_AFLAGS += $(aflags-y) $(cfi)
OBJCOPYFLAGS := -O binary
@@ -107,6 +121,7 @@ drivers-y += drivers/s390/
drivers-$(CONFIG_OPROFILE) += arch/s390/oprofile/
boot := arch/s390/boot
+syscalls := arch/s390/kernel/syscalls
tools := arch/s390/tools
all: image bzImage
@@ -128,9 +143,12 @@ archclean:
$(Q)$(MAKE) $(clean)=$(boot)
$(Q)$(MAKE) $(clean)=$(tools)
+archheaders:
+ $(Q)$(MAKE) $(build)=$(syscalls) uapi
+
archprepare:
- $(Q)$(MAKE) $(build)=$(tools) include/generated/facilities.h
- $(Q)$(MAKE) $(build)=$(tools) include/generated/dis.h
+ $(Q)$(MAKE) $(build)=$(syscalls) kapi
+ $(Q)$(MAKE) $(build)=$(tools) kapi
# Don't use tabs in echo arguments
define archhelp