This increases the overhead of frequently executed helpers. We need to move rule past QEMU_CFLAGS assignment to ensure that the required simple assignment picks up all bits. The signal workaround is moved just for the sake of consistency.
Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> --- Changes in v2: - unbreak qemu-user build Maybe some real make guru has a nicer solution for removing the switch. Makefile.target | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile.target b/Makefile.target index 88d2f1f..b545161 100644 --- a/Makefile.target +++ b/Makefile.target @@ -89,14 +89,6 @@ translate-all.o: translate-all.c cpu.h tcg/tcg.o: cpu.h -# HELPER_CFLAGS is used for all the code compiled with static register -# variables -op_helper.o user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS) - -# Note: this is a workaround. The real fix is to avoid compiling -# cpu_signal_handler() in user-exec.c. -signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS) - ######################################################### # Linux user emulator target @@ -387,6 +379,15 @@ obj-y += $(addprefix ../, $(trace-obj-y)) endif # CONFIG_SOFTMMU +# HELPER_CFLAGS is used for all the code compiled with static register +# variables +# NOTE: Must be after the last QEMU_CFLAGS assignment +op_helper.o user-exec.o: QEMU_CFLAGS := $(subst -fstack-protector-all,,$(QEMU_CFLAGS)) $(HELPER_CFLAGS) + +# Note: this is a workaround. The real fix is to avoid compiling +# cpu_signal_handler() in user-exec.c. +signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS) + ifndef CONFIG_LINUX_USER ifndef CONFIG_BSD_USER # libcacard needs qemu-thread support, and besides is only needed by devices -- 1.7.3.4