summaryrefslogtreecommitdiff
path: root/sysdeps/mach
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/Dist2
-rw-r--r--sysdeps/mach/hurd/Makefile9
-rw-r--r--sysdeps/mach/hurd/libc_p-ldscript5
3 files changed, 12 insertions, 4 deletions
diff --git a/sysdeps/mach/hurd/Dist b/sysdeps/mach/hurd/Dist
index 986efc4e2d..62fe4d96c6 100644
--- a/sysdeps/mach/hurd/Dist
+++ b/sysdeps/mach/hurd/Dist
@@ -1,3 +1,3 @@
errnos.awk err_hurd.sub
libc-ldscript
-
+libc_p-ldscript
diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
index 74ceb2e6e1..eb3dc01252 100644
--- a/sysdeps/mach/hurd/Makefile
+++ b/sysdeps/mach/hurd/Makefile
@@ -98,17 +98,20 @@ common-generated += errnos.d stamp-errnos
libc-name = crt
ifeq (,$(subdir))
-install-others += $(libdir)/libc.a
+install-others += $(libdir)/libc.a $(libdir)/libc_p.a
$(libdir)/libc.a: $(hurd)/libc-ldscript; $(do-install)
+$(libdir)/libc_p.a: $(hurd)/libc_p-ldscript; $(do-install)
endif
-# For the shared library, we don't need to do the linker script machination.
-# Instead, we specify the required libraries when building the shared object.
+# Make sure these are used to build the libc.so shared object too.
rpcuserlibs := $(common-objpfx)mach/libmachuser.so \
$(common-objpfx)hurd/libhurduser.so
$(common-objpfx)libc.so: $(rpcuserlibs)
rpath-link := $(rpath-link):$(common-objpfx)mach:$(common-objpfx)hurd
+# And get them into the libc.so ldscript.
+$(libdir)/libc.so: $(rpcuserlibs)
+
# The RPC stubs from these libraries are needed in building the dynamic
# linker, too. It must be self-contained, so we link the needed PIC
# objects directly into the shared object.
diff --git a/sysdeps/mach/hurd/libc_p-ldscript b/sysdeps/mach/hurd/libc_p-ldscript
new file mode 100644
index 0000000000..d809998a1f
--- /dev/null
+++ b/sysdeps/mach/hurd/libc_p-ldscript
@@ -0,0 +1,5 @@
+/* This linker script is installed as /lib/libc_p.a.
+ It makes -lc_p become just like -( -lcrt_p -lmachuser_p -lhurduser_p -).
+ */
+
+GROUP ( libcrt_p.a libmachuser_p.a libhurduser_p.a )