aboutsummaryrefslogtreecommitdiff
path: root/Rules
diff options
context:
space:
mode:
Diffstat (limited to 'Rules')
-rw-r--r--Rules18
1 files changed, 16 insertions, 2 deletions
diff --git a/Rules b/Rules
index 5ace24c..00f03df 100644
--- a/Rules
+++ b/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 @@ endif
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))) \