summaryrefslogtreecommitdiff
path: root/libc/Rules
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2011-05-15 12:22:50 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2011-05-15 12:22:50 +0000
commitbc5b8c65ef17547cbab9141d66798bbb3cae9c2a (patch)
treec41d5e47bf1ebffbe2fc7461f0131e7a8b16dc49 /libc/Rules
parentc0ce886c9f6b0580924e4f21180602f5e72d6570 (diff)
Merge changes between r13800 and r13831 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@13832 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/Rules')
-rw-r--r--libc/Rules18
1 files changed, 16 insertions, 2 deletions
diff --git a/libc/Rules b/libc/Rules
index 434b8a230..a7cbdd3b9 100644
--- a/libc/Rules
+++ b/libc/Rules
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2000,2002,2003,2004,2005,2006
+# Copyright (C) 1991-2000,2002,2003,2004,2005,2006,2011
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
@@ -106,12 +106,19 @@ xtests: tests $(xtests:%=$(objpfx)%.out) $(xtests-bp.out)
ifeq ($(build-programs),yes)
binaries-all = $(others) $(sysdep-others) $(tests) $(xtests) $(test-srcs)
binaries-static = $(others-static) $(tests-static) $(xtests-static)
+ifeq (yesyes,$(have-fpie)$(build-shared))
+binaries-pie = $(others-pie) $(tests-pie) $(xtests-pie)
+else
+binaries-pie =
+endif
else
binaries-all = $(tests) $(xtests) $(test-srcs)
binaries-static =
+binaries-pie =
endif
-binaries-shared = $(filter-out $(binaries-static), $(binaries-all))
+binaries-shared = $(filter-out $(binaries-pie) $(binaries-static), \
+ $(binaries-all))
ifneq "$(strip $(binaries-shared))" ""
$(addprefix $(objpfx),$(binaries-shared)): %: %.o \
@@ -120,6 +127,13 @@ $(addprefix $(objpfx),$(binaries-shared)): %: %.o \
$(+link)
endif
+ifneq "$(strip $(binaries-pie))" ""
+$(addprefix $(objpfx),$(binaries-pie)): %: %.o \
+ $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
+ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
+ $(+link-pie)
+endif
+
ifneq "$(strip $(binaries-static))" ""
$(addprefix $(objpfx),$(binaries-static)): %: %.o \
$(sort $(filter $(common-objpfx)lib%,$(link-libc-static))) \