OSDN Git Service

touchup PIE support for all the utils and fix stripping on iconv
authorMike Frysinger <vapier@gentoo.org>
Thu, 11 Aug 2005 22:52:49 +0000 (22:52 -0000)
committerMike Frysinger <vapier@gentoo.org>
Thu, 11 Aug 2005 22:52:49 +0000 (22:52 -0000)
utils/Makefile

index fcd38fe..7023a9b 100644 (file)
@@ -46,22 +46,27 @@ readelf: readelf.c
        $(CC) $(CFLAGS) $^ -o $@
        $(STRIPTOOL) -s -x -R .note -R .comment $@
 
+ifeq ($(strip $(UCLIBC_STATIC_LDCONFIG)),y)
+LDCONFIG_CFLAGS := -static
+else
+LDCONFIG_CFLAGS := $(PIEFLAG) $(LDPIEFLAG)
+endif
 ldconfig: ldconfig.c
-       $(CC) $(CFLAGS) $(if $(filter $(UCLIBC_STATIC_LDCONFIG),y),-static) \
+       $(CC) $(CFLAGS) $(LDCONFIG_CFLAGS) \
                -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
                -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \
                $^ -o $@
        $(STRIPTOOL) -s -x -R .note -R .comment $@
 
 ldd: ldd.c
-       $(CC) $(CFLAGS) $(PIEFLAG) \
+       $(CC) $(CFLAGS) $(PIEFLAG) $(LDPIEFLAG) \
                -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
                -DUCLIBC_LDSO=$(UCLIBC_LDSO) -I. -I../ldso/include \
                $^ -o $@
        $(STRIPTOOL) -s -x -R .note -R .comment $@
 
 iconv: ../libc/misc/wchar/wchar.c
-       $(CC) $(CFLAGS) $(PIEFLAG) -Wl,-s \
+       $(CC) $(CFLAGS) $(PIEFLAG) $(LDPIEFLAG) \
                -DL_iconv_main \
                $^ -o $@
        $(STRIPTOOL) -s -x -R .note -R .comment $@