summaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-10-09 18:10:50 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-10-09 18:10:50 +0200
commit00d805f334c009164d7cecab931086a0545af8d1 (patch)
treea2ceba381c29448603603c82b8aec7781c94d9cb /Rules.mak
parent75f2c20b3f2478f6b9f415f2bfe0e972c947f625 (diff)
check_ld some more flags
gold does not currently implement these. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak7
1 files changed, 5 insertions, 2 deletions
diff --git a/Rules.mak b/Rules.mak
index d64897fdf..ceb1e1019 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -282,7 +282,7 @@ endif
# Idx Name Size VMA LMA File off Algn
# 0 .text xxxxxxxx 00000000 00000000 xxxxxxxx 2**2 <===!
CPU_CFLAGS-y += $(call check_gcc,-ffunction-sections -fdata-sections,)
-ifneq ($(call check_ld,--sort-common,),)
+ifneq ($(call check_ld,--sort-common),)
CPU_LDFLAGS-y += -Wl,--sort-common
endif
ifneq ($(call check_ld,--sort-section alignment),)
@@ -547,8 +547,11 @@ ifneq ($(HAVE_SHARED),y)
CFLAGS += -DSTATIC
endif
+LDFLAG_WARN_ONCE:=$(if $(call check_ld,--warn-once),-Wl$(comma)--warn-once)
+LDFLAG_SORT_COMMON:=$(if $(call check_ld,--sort-common),-Wl$(comma)--sort-common)
+LDFLAG_DISCARD_ALL:=$(if $(call check_ld,--discard-all),-Wl$(comma)--discard-all)
LDFLAGS_NOSTRIP:=$(CPU_LDFLAGS-y) -shared \
- -Wl,--warn-common -Wl,--warn-once -Wl,-z,combreloc
+ -Wl,--warn-common $(LDFLAG_WARN_ONCE) -Wl,-z,combreloc
# binutils-2.16.1 warns about ignored sections, 2.16.91.0.3 and newer are ok
#LDFLAGS_NOSTRIP+=$(call check_ld,--gc-sections)