diff options
author | Chris Zankel <chris@zankel.net> | 2012-11-13 18:16:36 -0500 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2012-12-19 00:10:20 -0500 |
commit | 6550162200b40d1e725167f8a617255c42b57552 (patch) | |
tree | 072a99de3ab75fe899254bf75d1a704d91f8916f | |
parent | 02b25d811f949fc70badd6535dfaf13a3c5decf9 (diff) |
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>
-rw-r--r-- | arch/xtensa/Kconfig.debug | 13 | ||||
-rw-r--r-- | arch/xtensa/Makefile | 4 |
2 files changed, 15 insertions, 2 deletions
diff --git a/arch/xtensa/Kconfig.debug b/arch/xtensa/Kconfig.debug index 11c585295dd7..be5fb4c6243f 100644 --- a/arch/xtensa/Kconfig.debug +++ b/arch/xtensa/Kconfig.debug | |||
@@ -2,6 +2,15 @@ menu "Kernel hacking" | |||
2 | 2 | ||
3 | source "lib/Kconfig.debug" | 3 | source "lib/Kconfig.debug" |
4 | 4 | ||
5 | endmenu | 5 | config LD_NO_RELAX |
6 | 6 | bool "Disable linker relaxation" | |
7 | default n | ||
8 | help | ||
9 | Enable this function to disable link-time optimizations. | ||
10 | The default linker behavior is to combine identical literal | ||
11 | values to reduce code size and remove unnecessary overhead from | ||
12 | assembler-generated 'longcall' sequences. | ||
13 | Enabling this option improves the link time but increases the | ||
14 | code size, and possibly execution time. | ||
7 | 15 | ||
16 | endmenu | ||
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index bb5ba61723f7..ab63c9beb930 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile | |||
@@ -49,6 +49,10 @@ KBUILD_CFLAGS += -pipe -mlongcalls | |||
49 | 49 | ||
50 | KBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,) | 50 | KBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,) |
51 | 51 | ||
52 | ifneq ($(CONFIG_LD_NO_RELAX),) | ||
53 | LDFLAGS := --no-relax | ||
54 | endif | ||
55 | |||
52 | vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y)) | 56 | vardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y)) |
53 | plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y)) | 57 | plfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y)) |
54 | 58 | ||