提交 34ccadcd 编写于 作者: M Marek Behún 提交者: Tom Rini

ARM: don't use --gc-sections with LTO when using private libgcc

When using LTO, we can throw away the --gc-sections flag, but only if
using private libgcc.

When using system's libgcc, --gc-sections is still needed, otherwise
linking will fail due to undefined references to libc's symbols.
Signed-off-by: NMarek Behún <marek.behun@nic.cz>
Reviewed-by: NSimon Glass <sjg@chromium.org>
上级 75c7d10c
...@@ -15,7 +15,9 @@ CFLAGS_NON_EFI := -fno-pic -ffixed-r9 -ffunction-sections -fdata-sections \ ...@@ -15,7 +15,9 @@ CFLAGS_NON_EFI := -fno-pic -ffixed-r9 -ffunction-sections -fdata-sections \
-fstack-protector-strong -fstack-protector-strong
CFLAGS_EFI := -fpic -fshort-wchar CFLAGS_EFI := -fpic -fshort-wchar
ifneq ($(CONFIG_LTO)$(CONFIG_USE_PRIVATE_LIBGCC),yy)
LDFLAGS_FINAL += --gc-sections LDFLAGS_FINAL += --gc-sections
endif
ifndef CONFIG_LTO ifndef CONFIG_LTO
PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册