From: Marek BehĂșn Date: Thu, 20 May 2021 11:24:23 +0000 (+0200) Subject: ARM: don't use -ffunction-sections/-fdata-sections with LTO build X-Git-Tag: baikal/mips/sdk5.9~34^2^2~47^2~3 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=be5c812d491bad2578edeb8a36fa016d34ee58b4;p=uboot.git 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 Reviewed-by: Simon Glass --- diff --git a/arch/arm/config.mk b/arch/arm/config.mk index e79f0104b9..f556ee3329 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,))