summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-01-14 15:59:36 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-01-14 15:59:36 +0000
commit9324e66665c4c7197856ac249a32a88ee6d86e21 (patch)
tree8c86ef56e552ca3022a0dbf4776192a186a46f6f
parentff1aa7ce9021d00e53fd647b30878f59278ecf94 (diff)
- make sure to pass the correct PIE flags to gcc (Peter S. Mazinger)
-rw-r--r--Rules.mak5
1 files changed, 3 insertions, 2 deletions
diff --git a/Rules.mak b/Rules.mak
index 847d04c89..802ee99bb 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -427,9 +427,10 @@ export PIEFLAG:=$(call check_gcc,$(PIEFLAG_NAME),$(PICFLAG))
endif
# We need to keep track of both the CC PIE flag (above) as
# well as the LD PIE flag (below) because we can't rely on
-# gcc passing -pie if we used -fPIE
+# gcc passing -pie if we used -fPIE. We need to directly use -pie
+# instead of -Wl,-pie as gcc picks up the wrong startfile/endfile
ifndef LDPIEFLAG
-export LDPIEFLAG:=$(shell $(LD) --help 2>/dev/null | grep -q -- -pie && echo "-Wl,-pie")
+export LDPIEFLAG:=$(shell $(LD) --help 2>/dev/null | grep -q -- -pie && echo "-pie")
endif
# Check for AS_NEEDED support in linker script (binutils>=2.16.1 has it)