summaryrefslogtreecommitdiff
path: root/Rules.mak
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-12-22 18:58:12 +0000
committerEric Andersen <andersen@codepoet.org>2004-12-22 18:58:12 +0000
commit5941632e79effa6654512aa391a6d569cde68b94 (patch)
tree791f10bb689006199d5fb4bf1780d3afc26a8cf5 /Rules.mak
parent4a56d69f1e77a362a51255c125d471fb468f9517 (diff)
Patch from Peter S. Mazinger to simplify PIE handling
Diffstat (limited to 'Rules.mak')
-rw-r--r--Rules.mak6
1 files changed, 3 insertions, 3 deletions
diff --git a/Rules.mak b/Rules.mak
index b7b4df385..644d4c3ca 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -91,6 +91,7 @@ OPTIMIZATION:=
PICFLAG:=-fPIC
PIEFLAG:=$(call check_gcc,-fPIE,)
ifeq ($(strip $(PIEFLAG)),-fPIE)
+# should add check if ld supports -pie
LDPIEFLAG:=-Wl,-pie
endif
@@ -184,14 +185,13 @@ ifeq ($(strip $(TARGET_ARCH)),powerpc)
# enough. Therefore use -fpic which will reduce code size and generates
# faster code.
PICFLAG:=-fpic
- PIEFLAG=$(call check_gcc,-fpie,)
+ PIEFLAG:=$(call check_gcc,-fpie,)
endif
ifeq ($(strip $(TARGET_ARCH)),frv)
CPU_LDFLAGS-$(CONFIG_FRV)+=-melf32frvfd
CPU_CFLAGS-$(CONFIG_FRV)+=-mfdpic
PICFLAG=-fPIC -DPIC
- PIEFLAG=-fpie
# Using -pie causes the program to have an interpreter, which is
# forbidden, so we must make do with -shared. Unfortunately,
# -shared by itself would get us global function descriptors
@@ -226,7 +226,7 @@ ifeq ($(strip $(TARGET_ARCH)),arm)
endif
endif
-ifneq ($(strip $(UCLIBC_PIE_SUPPORT)),y)
+ifneq ($(UCLIBC_PIE_SUPPORT),y)
PIEFLAG=
LDPIEFLAG=
endif