Skip to content

Commit

Permalink
x86/build: move -fno-asynchronous-unwind-tables into EMBEDDED_EXTRA_C…
Browse files Browse the repository at this point in the history
…FLAGS

Users of EMBEDDED_EXTRA_CFLAGS already use -fno-asynchronous-unwind-tables, or
ought to.  This shrinks the size of the rombios 32bit stubs in guest memory.

Signed-off-by: Andrew Cooper <[email protected]>
Reviewed-by: Jan Beulich <[email protected]>
  • Loading branch information
andyhhp committed May 13, 2020
1 parent 24f94fc commit 1a47731
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ APPEND_LDFLAGS += $(foreach i, $(APPEND_LIB), -L$(i))
APPEND_CFLAGS += $(foreach i, $(APPEND_INCLUDES), -I$(i))

EMBEDDED_EXTRA_CFLAGS := -nopie -fno-stack-protector -fno-stack-protector-all
EMBEDDED_EXTRA_CFLAGS += -fno-exceptions
EMBEDDED_EXTRA_CFLAGS += -fno-exceptions -fno-asynchronous-unwind-tables

XEN_EXTFILES_URL ?= http://xenbits.xen.org/xen-extfiles
# All the files at that location were downloaded from elsewhere on
Expand Down
2 changes: 1 addition & 1 deletion tools/tests/x86_emulator/testcase.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk

$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))

CFLAGS += -fno-builtin -fno-asynchronous-unwind-tables -g0 $($(TESTCASE)-cflags)
CFLAGS += -fno-builtin -g0 $($(TESTCASE)-cflags)

.PHONY: all
all: $(TESTCASE).bin
Expand Down
2 changes: 1 addition & 1 deletion xen/arch/x86/arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $(call as-option-add,CFLAGS,CC,\
$(call as-option-add,CFLAGS,CC,\
".L1: .L2: .nops (.L2 - .L1)$$(comma)9",-DHAVE_AS_NOPS_DIRECTIVE)

CFLAGS += -mno-red-zone -fpic -fno-asynchronous-unwind-tables
CFLAGS += -mno-red-zone -fpic

# Xen doesn't use SSE interally. If the compiler supports it, also skip the
# SSE setup for variadic function calls.
Expand Down
2 changes: 1 addition & 1 deletion xen/arch/x86/boot/build32.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include $(XEN_ROOT)/Config.mk

$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))

CFLAGS += -Werror -fno-asynchronous-unwind-tables -fno-builtin -g0 -msoft-float
CFLAGS += -Werror -fno-builtin -g0 -msoft-float
CFLAGS += -I$(XEN_ROOT)/xen/include
CFLAGS := $(filter-out -flto,$(CFLAGS))

Expand Down

0 comments on commit 1a47731

Please sign in to comment.