summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/powerpc/Makefile
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2004-08-27 15:14:55 +0000
committerJoakim Tjernlund <joakim.tjernlund@transmode.se>2004-08-27 15:14:55 +0000
commitc9a8697e5b02b390e3cb14ba787998459af2aac5 (patch)
treef58cbbfbda73b44aa21bef547f38855cae3311d9 /libc/sysdeps/linux/powerpc/Makefile
parentd6ea3852863b744ad86802f0a1ebe4d596286a3e (diff)
Preliminary PIE support for powerpc, i386 was used as template.
Requested by Peter Mazinger. Testing wanted.
Diffstat (limited to 'libc/sysdeps/linux/powerpc/Makefile')
-rw-r--r--libc/sysdeps/linux/powerpc/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/powerpc/Makefile b/libc/sysdeps/linux/powerpc/Makefile
index 93f447137..cf8be499e 100644
--- a/libc/sysdeps/linux/powerpc/Makefile
+++ b/libc/sysdeps/linux/powerpc/Makefile
@@ -22,6 +22,9 @@ ASFLAGS=$(CFLAGS)
CRT0_SRC = crt0.S
CRT0_OBJ = crt0.o crt1.o
+ifeq ($(strip $(UCLIBC_PIE_SUPPORT)),y)
+CRT0_OBJ += Scrt0.o Scrt1.o
+endif
CRT0_DEPS=gmon-start.S
CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
@@ -41,6 +44,13 @@ $(LIBC): ar-target
ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
cp $(CRT0_OBJ) $(TOPDIR)lib/
+ifeq ($(strip $(UCLIBC_PIE_SUPPORT)),y)
+ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
+ $(RM) $(TOPDIR)lib/Scrt0.o
+else
+ mv $(TOPDIR)lib/Scrt0.o $(TOPDIR)lib/Scrt1.o
+endif
+endif
$(CRT0_OBJ): $(CRT0_SRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o