diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2021-05-20 13:24:23 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-05-24 14:21:30 -0400 |
commit | 75c7d10c1f61ff509bcbe00284b7424b55c9ed92 (patch) | |
tree | bff0fabbf0cf3b2ec77d40d36bf510c24f49e2eb /arch | |
parent | 8f9696510afc2b52ebeba5d1db4883cf3331c206 (diff) | |
download | u-boot-75c7d10c1f61ff509bcbe00284b7424b55c9ed92.zip u-boot-75c7d10c1f61ff509bcbe00284b7424b55c9ed92.tar.gz u-boot-75c7d10c1f61ff509bcbe00284b7424b55c9ed92.tar.bz2 |
ARM: don't use -ffunction-sections/-fdata-sections with LTO build
When building with LTO, using -ffunction-sections/-fdata-sections is not
useful anymore.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/config.mk | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/config.mk b/arch/arm/config.mk index e79f010..f556ee3 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -16,8 +16,12 @@ CFLAGS_NON_EFI := -fno-pic -ffixed-r9 -ffunction-sections -fdata-sections \ CFLAGS_EFI := -fpic -fshort-wchar LDFLAGS_FINAL += --gc-sections -PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections \ - -fno-common -ffixed-r9 + +ifndef CONFIG_LTO +PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections +endif + +PLATFORM_RELFLAGS += -fno-common -ffixed-r9 PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \ $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) |