aboutsummaryrefslogtreecommitdiff
path: root/csu
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2015-08-07 01:38:39 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-08-07 01:38:39 +0200
commitedd4cbcf83fb466dd8a1b5d63d55b1fea96356fe (patch)
tree525d4c7405e67c6b2cf2c77f895f8d654ae825d7 /csu
parent5e29dd573777197fc4d12c1bdea8f6d04e505391 (diff)
downloadglibc-edd4cbcf83fb466dd8a1b5d63d55b1fea96356fe.tar
glibc-edd4cbcf83fb466dd8a1b5d63d55b1fea96356fe.tar.gz
glibc-edd4cbcf83fb466dd8a1b5d63d55b1fea96356fe.tar.bz2
glibc-edd4cbcf83fb466dd8a1b5d63d55b1fea96356fe.zip
Fix gcrt0.o compilation
When static-start-installed-name is different from start-installed-name, we must not use the shared objects. * csu/Makefile (extra-objs): Add gmon-start.o when building shared library and $(static-start-installed-name) is different from $(start-installed-name). $(objpfx)g$(static-start-installed-name): When building shared library and $(static-start-installed-name) is different from $(static-start-installed-name), revert to non-shared rule, i.e. using $(objpfx)% and gmon-start.o.
Diffstat (limited to 'csu')
-rw-r--r--csu/Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/csu/Makefile b/csu/Makefile
index 9f0855a6ac..4df5d107a1 100644
--- a/csu/Makefile
+++ b/csu/Makefile
@@ -47,6 +47,9 @@ tests-static := tst-empty
ifeq (yes,$(build-shared))
extra-objs += S$(start-installed-name) gmon-start.os
+ifneq ($(start-installed-name),$(static-start-installed-name))
+extra-objs += gmon-start.o
+endif
install-lib += S$(start-installed-name)
generated += start.os
else
@@ -98,10 +101,14 @@ endif
# startfile with gmon-start.o, which defines a constructor function
# to turn on profiling code at startup.
ifeq (yes,$(build-shared))
-$(addprefix $(objpfx),$(sort g$(start-installed-name) \
- g$(static-start-installed-name))): \
+$(objpfx)g$(start-installed-name): \
$(objpfx)g%: $(objpfx)S% $(objpfx)gmon-start.os
$(link-relocatable)
+ifneq ($(start-installed-name),$(static-start-installed-name))
+$(objpfx)g$(static-start-installed-name): \
+ $(objpfx)g%: $(objpfx)% $(objpfx)gmon-start.o
+ $(link-relocatable)
+endif
else
$(addprefix $(objpfx),$(sort g$(start-installed-name) \
g$(static-start-installed-name))): \