Make it a specifiable option where the shared klibc lives. Update
information on working platforms (Alpha works 100% including shared)
diff --git a/MCONFIG b/MCONFIG
index cb88b0f..fa8d0e2 100644
--- a/MCONFIG
+++ b/MCONFIG
@@ -29,6 +29,13 @@
LIBGCC = $(shell $(CC) --print-libgcc)
#
+# This indicates the location of the final version of the shared library.
+# THIS MUST BE AN ABSOLUTE PATH WITH NO FINAL SLASH.
+# Leave this empty to make it the root.
+#
+SHLIBDIR = /lib
+
+#
# Include arch-specific rule fragments
#
include $(KLIBSRC)/arch/$(ARCH)/MCONFIG
diff --git a/klibc/Makefile b/klibc/Makefile
index cc6f585..a6c41af 100644
--- a/klibc/Makefile
+++ b/klibc/Makefile
@@ -85,7 +85,8 @@
ln -f $@ klibc-`cat $(SOLIB).hash`.so
interp.o: interp.S $(SOLIB).hash
- $(CC) $(CFLAGS) -D__ASSEMBLY__ -DSOHASH=\"`cat $(SOLIB).hash`\" \
+ $(CC) $(CFLAGS) -D__ASSEMBLY__ -DLIBDIR=\"$(SHLIBDIR)\" \
+ -DSOHASH=\"`cat $(SOLIB).hash`\" \
-c -o $@ $<
crt0.o: arch/$(ARCH)/crt0.o
diff --git a/klibc/README b/klibc/README
index 48ac6e3..315cab0 100644
--- a/klibc/README
+++ b/klibc/README
@@ -34,13 +34,15 @@
The following is the last known status of various architectures:
- Known to work: arm i386
- Works static, not shared: mips s390 s390x sparc sparc64 arm-thumb
- Need crt0.S updates: alpha ppc
+ Known to work: alpha arm i386
+ Works static, not shared: mips(*) s390 s390x sparc(*) sparc64(*) arm-thumb
+ Need crt0.S updates: ppc
Missing setjmp: ppc64
May or may not work: x86_64
Need porting work: cris ia64 m68k mips64 parisc sh
+ (*) = Linker problem; might work with fixed linker
+
Note that even the "known to work" ones likely have bugs. Please
report them if you run into them.
diff --git a/klibc/interp.S b/klibc/interp.S
index 4b5bcf7..3039436 100644
--- a/klibc/interp.S
+++ b/klibc/interp.S
@@ -4,7 +4,8 @@
#
.section ".interp","a"
- .ascii "/lib/klibc-"
+ .ascii LIBDIR
+ .ascii "/klibc-"
.ascii SOHASH
.ascii ".so"
.byte 0