[uClibc-cvs] CVS uClibc/libc/sysdeps/linux/frv
CVS User jocke
jocke at codepoet.org
Thu Oct 14 10:08:00 UTC 2004
Update of /var/cvs/uClibc/libc/sysdeps/linux/frv
In directory nail:/tmp/cvs-serv7202/libc/sysdeps/linux/frv
Modified Files:
Makefile
Log Message:
Peter Mazinger writes:
The attached patch generalizes the use of PIE (all archs are brought in
sync that use/mention it: x86/ppc/frv) and makes use of it building the
target utils.
Tested on x86, ppc should be tested, frv uses -fPIE at one location, but
at another place -fpie, I don't know which is correct (could be both) and
misses the target addition in Config.in.
The test for ppc (requires the earlier sent crt-correction patch to work
correctly):
enable UCLIBC_PIE_SUPPORT, build uClibc and utils, check:
file ./utils/ldd, it should show shared object (instead of executable)
--- /var/cvs/uClibc/libc/sysdeps/linux/frv/Makefile 2004/08/26 23:36:04 1.6
+++ /var/cvs/uClibc/libc/sysdeps/linux/frv/Makefile 2004/10/14 10:08:00 1.7
@@ -23,7 +23,9 @@
CRT0_SRC = crt0.S
CRT0_OBJ = crt0.o crt1.o
+ifeq $(strip $(UCLIBC_PIE_SUPPORT)),y)
SCRT0_OBJ = $(patsubst %,S%, $(CRT0_OBJ))
+endif
CRT0_DEPS=gmon-start.S
CTOR_TARGETS = crti.o crtn.o
@@ -54,11 +56,11 @@
$(CC) $(CFLAGS) -c $< -o $@
$(SCRT0_OBJ): $(CRT0_SRC) Scrtreloc.o
- $(CC) $(CFLAGS) -fPIE -DL_$* -r -nostdlib $< Scrtreloc.o -o $*.o
+ $(CC) $(CFLAGS) $(PIEFLAG) -DL_$* -r -nostdlib $< Scrtreloc.o -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
Scrtreloc.o: crtreloc.c
- $(CC) $(CFLAGS) -fPIE -c $< -o $@
+ $(CC) $(CFLAGS) $(PIEFLAG) -c $< -o $@
$(CTOR_TARGETS): %.o : %.S
$(CC) $(CFLAGS) -c $< -o $@
More information about the uClibc-cvs
mailing list