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.
--- /dev/null
+/* 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 )