summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-08-11 22:52:49 +0000
committerMike Frysinger <vapier@gentoo.org>2005-08-11 22:52:49 +0000
commitef8c7a93f9f081ea1080d7785cf67a415851fd1a (patch)
tree97cc2d670a44f2eb01c080cbdeea1c26185ed416 /utils
parentafd3f33a079ce83d5e4afd485d2b1d02c05ac938 (diff)
touchup PIE support for all the utils and fix stripping on iconv
Diffstat (limited to 'utils')
-rw-r--r--utils/Makefile11
1 files changed, 8 insertions, 3 deletions
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 $@