remove soname from libc.so/ld-musl
authorRich Felker <dalias@aerifal.cx>
Sun, 10 Mar 2013 03:34:11 +0000 (22:34 -0500)
committerRich Felker <dalias@aerifal.cx>
Sun, 10 Mar 2013 03:34:11 +0000 (22:34 -0500)
it serves no purpose (binaries linked against musl as -lc/libc.so
automatically get the right DT_NEEDED value of libc.so) and causes
ldconfig to misbehave (making a symlink to ld-musl named libc.so in
/lib). ldconfig is not used on pure musl systems, but if ld-musl is
installed on a system where it's not the primary libc, this will
pollute the system /lib with a symlink to musl named libc.so, which
should NOT exist and could cause problems linking native apps. also,
the existence of the soname caused spurious warnings from ldconfig
when /lib and /usr/lib were the same physical directory.

Makefile

index cc4faef..997c5bb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -94,7 +94,7 @@ src/ldso/dynlink.lo: arch/$(ARCH)/reloc.h
 lib/libc.so: $(LOBJS)
        $(CC) $(CFLAGS_ALL_SHARED) $(LDFLAGS) -nostdlib -shared \
        -Wl,-e,_start -Wl,-Bsymbolic-functions \
 lib/libc.so: $(LOBJS)
        $(CC) $(CFLAGS_ALL_SHARED) $(LDFLAGS) -nostdlib -shared \
        -Wl,-e,_start -Wl,-Bsymbolic-functions \
-       -Wl,-soname=libc.so -o $@ $(LOBJS) $(LIBCC)
+       -o $@ $(LOBJS) $(LIBCC)
 
 lib/libc.a: $(OBJS)
        rm -f $@
 
 lib/libc.a: $(OBJS)
        rm -f $@