summaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-09-06 10:15:17 -0500
committerAaron Durbin <adurbin@chromium.org>2015-09-09 19:35:54 +0000
commitd4dd44cc2b75c13f5e99e8c293307199fe5e7e93 (patch)
tree8611d87f6aca6b687eac538006c74025d0f95872 /Makefile.inc
parent956c4f2d4cfa2b43085b493e0c5fed2f61cf5363 (diff)
downloadcoreboot-d4dd44cc2b75c13f5e99e8c293307199fe5e7e93.tar.xz
linking: add and use LDFLAGS_common
Add an LDFLAGS_common variable and use that for each stage during linking within all the architectures. All the architectures support gc-sections, and as such they should be linking in the same way. BUG=chrome-os-partner:44827 BRANCH=None TEST=Built rambi and analyzed the relocatable ramstage. Change-Id: I41fbded54055455889b297b9e8738db4dda0aad0 Signed-off-by: Aaron Durbin <adubin@chromium.org> Reviewed-on: http://review.coreboot.org/11522 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 4add1957d4..c0beddace3 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -278,6 +278,8 @@ CFLAGS_common += -Wstrict-aliasing -Wshadow
CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
CFLAGS_common += -ffunction-sections -fdata-sections
+LDFLAGS_common := --gc-sections -nostdlib -nostartfiles -static --emit-relocs
+
ifeq ($(CONFIG_COMPILER_GCC),y)
# cf. commit f69a99db (coreboot: x86: enable gc-sections)
CFLAGS_common += -Wno-unused-but-set-variable