Commit 65501622 authored by Chris Zankel's avatar Chris Zankel
Browse files

xtensa: add config option to disable linker relaxation



The default linker behavior is to optimize identical literal values and
remove unnecessary overhead from assembler-generated "longcall" sequences
to reduce code size. Provide an option to disable this behavior to improve
compile time.

Signed-off-by: default avatarChris Zankel <chris@zankel.net>
parent 02b25d81
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -2,6 +2,15 @@ menu "Kernel hacking"

source "lib/Kconfig.debug"

endmenu

config LD_NO_RELAX
	bool "Disable linker relaxation"
	default n
	help
	  Enable this function to disable link-time optimizations.
	  The default linker behavior is to combine identical literal
	  values to reduce code size and remove unnecessary overhead from
	  assembler-generated 'longcall' sequences.
	  Enabling this option improves the link time but increases the
	  code size, and possibly execution time.

endmenu
+4 −0
Original line number Diff line number Diff line
@@ -49,6 +49,10 @@ KBUILD_CFLAGS += -pipe -mlongcalls

KBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,)

ifneq ($(CONFIG_LD_NO_RELAX),)
LDFLAGS := --no-relax
endif

vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y))
plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y))