aboutsummaryrefslogtreecommitdiff
path: root/csu/Makefile
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2021-12-11 23:08:32 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2021-12-12 00:42:13 +0100
commit556a6126f8764bc66d03368b5ac3e26631556559 (patch)
tree736b213ed4c2d785aa5382bcd9e0480557228020 /csu/Makefile
parent26803075e4e7c0468965ed0d037345288aae99de (diff)
downloadglibc-556a6126f8764bc66d03368b5ac3e26631556559.zip
glibc-556a6126f8764bc66d03368b5ac3e26631556559.tar.gz
glibc-556a6126f8764bc66d03368b5ac3e26631556559.tar.bz2
hurd: Add rules for static PIE build
This fixes [BZ #28671].
Diffstat (limited to 'csu/Makefile')
-rw-r--r--csu/Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/csu/Makefile b/csu/Makefile
index e2390e4..b52a98f 100644
--- a/csu/Makefile
+++ b/csu/Makefile
@@ -71,17 +71,21 @@ else
extra-objs += gmon-start.o
endif
+ifeq (yes,$(enable-static-pie))
+extra-objs += r$(start-installed-name) gr$(start-installed-name)
+install-lib += r$(start-installed-name) gr$(start-installed-name)
+endif
+
ifneq ($(start-installed-name),$(static-start-installed-name))
-# FIXME: Only Hurd defines static-start-installed-name. Hurd needs to
-# provide special rules to support static PIE.
extra-objs += $(static-start-installed-name) g$(static-start-installed-name)
omit-deps += $(patsubst %.o,%,$(static-start-installed-name) \
g$(static-start-installed-name))
install-lib += $(static-start-installed-name) g$(static-start-installed-name)
-else
ifeq (yes,$(enable-static-pie))
-extra-objs += r$(start-installed-name) gr$(start-installed-name)
-install-lib += r$(start-installed-name) gr$(start-installed-name)
+extra-objs += r$(static-start-installed-name) gr$(static-start-installed-name)
+omit-deps += $(patsubst %.o,%,r$(static-start-installed-name) \
+ gr$(static-start-installed-name))
+install-lib += r$(static-start-installed-name) gr$(static-start-installed-name)
endif
endif
@@ -150,6 +154,9 @@ ifneq ($(start-installed-name),$(static-start-installed-name))
$(objpfx)g$(static-start-installed-name): \
$(objpfx)g%: $(objpfx)% $(objpfx)gmon-start.o
$(link-relocatable)
+$(objpfx)gr$(static-start-installed-name): \
+ $(objpfx)gr%: $(objpfx)r% $(objpfx)gmon-start.o
+ $(link-relocatable)
endif
else
$(addprefix $(objpfx),$(sort g$(start-installed-name) \