From 13ca772ddcc86d5a92ee8277d712ed108c1ba606 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Thu, 14 Oct 2004 10:08:03 +0000 Subject: 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) --- utils/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/Makefile b/utils/Makefile index c5c858195..2b5e30635 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -54,7 +54,7 @@ ldconfig: ldconfig.c readsoname.c $(STRIPTOOL) -x -R .note -R .comment $@ ldd: ldd.c - $(CC) $(CFLAGS) $(XXFLAGS) -Wl,-s \ + $(CC) $(CFLAGS) $(XXFLAGS) $(PIEFLAG) $(LDPIEFLAG) -Wl,-s \ -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \ -nostdlib -o $@ $(BIN_START_FILES) $^ $(LDADD_LIBFLOAT) \ @@ -62,7 +62,7 @@ ldd: ldd.c $(STRIPTOOL) -x -R .note -R .comment $@ iconv: ../libc/misc/wchar/wchar.c - $(CC) $(CFLAGS) $(XXFLAGS) -Wl,-s -DL_iconv_main \ + $(CC) $(CFLAGS) $(XXFLAGS) $(PIEFLAG) $(LDPIEFLAG) -Wl,-s -DL_iconv_main \ -nostdlib -o $@ $(BIN_START_FILES) $^ $(LDADD_LIBFLOAT) \ -L../lib -lc $(LIBGCC) $(END_FILES) $(STRIPTOOL) -x -R .note -R .comment $@ -- cgit v1.2.3