summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-04-30 01:37:04 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-04-30 01:37:04 +0000
commit9e886c4836f3598f89631489fd380d3241e92897 (patch)
treefc48dc3a8da987f3c8647087fb1224755a4f690c
parent9f59aad1ccf423d0e3d2d8873e45901a321011b4 (diff)
guard against older ld's not understanding --sort-section alignment
-rw-r--r--Rules.mak7
1 files changed, 6 insertions, 1 deletions
diff --git a/Rules.mak b/Rules.mak
index a3e97415b..8d1853cf5 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -213,7 +213,12 @@ 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,)
- CPU_LDFLAGS-y += -Wl,--sort-common -Wl,--sort-section -Wl,alignment
+ifneq ($(call check_ld,--sort-common,),)
+ CPU_LDFLAGS-y += -Wl,--sort-common
+endif
+ifneq ($(call check_ld,--sort-section alignment),)
+ CPU_LDFLAGS-y += -Wl,--sort-section,alignment
+endif
CPU_LDFLAGS-y+=-m32
CPU_CFLAGS-y+=-m32