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: Chris Zankel <chris@zankel.net>
This commit is contained in:
parent
02b25d811f
commit
6550162200
2 changed files with 15 additions and 2 deletions
|
@ -2,6 +2,15 @@ menu "Kernel hacking"
|
||||||
|
|
||||||
source "lib/Kconfig.debug"
|
source "lib/Kconfig.debug"
|
||||||
|
|
||||||
|
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
|
endmenu
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,10 @@ KBUILD_CFLAGS += -pipe -mlongcalls
|
||||||
|
|
||||||
KBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,)
|
KBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,)
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_LD_NO_RELAX),)
|
||||||
|
LDFLAGS := --no-relax
|
||||||
|
endif
|
||||||
|
|
||||||
vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y))
|
vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y))
|
||||||
plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y))
|
plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue