From ef8c7a93f9f081ea1080d7785cf67a415851fd1a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 11 Aug 2005 22:52:49 +0000 Subject: touchup PIE support for all the utils and fix stripping on iconv --- utils/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/Makefile b/utils/Makefile index fcd38fea4..7023a9b21 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -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 $@ -- cgit v1.2.3