So. Having run into this in a few package building sessions recently, I figure I should do something about fixing the following:
gcc -o libfoo.so.0 -lm -lc <.o files> objdump -x libsoo.so.0 | grep NEEDED (nothing) Note that the libm piece of this may be something else, but the libc portion is definitely present, and problematic. Note also the lack of NEEDED section for libgcc. The culprit seems to be the following (from src/gcc/config/netbsd.h): /* Provide a LIB_SPEC appropriate for NetBSD. Just select the appropriate libc, depending on whether we're doing profiling; if `-posix' is specified, link against the appropriate libposix first. Don't include libc when linking a shared library. */ #undef LIB_SPEC #define LIB_SPEC \ "%{posix: \ %{!p: \ %{!pg:-lposix}} \ %{p:-lposix_p} \ %{pg:-lposix_p}} \ %{!shared: \ %{!symbolic: \ %{!p: \ %{!pg:-lc}} \ %{p:-lc_p} \ %{pg:-lc_p}}}" /* Provide a LIBGCC_SPEC appropriate for NetBSD. We also want to exclude libgcc with -symbolic. */ #undef LIBGCC_SPEC #define LIBGCC_SPEC "%{!shared:%{!symbolic: -lgcc}}" Note that libposix is still a concern, and so the semantics of handling it should be preserved (libposix on NetBSD provides POSIX-compliant versions of certain libc functions that are not, in their native form, POSIX-compliant). Because I only grasp the general meaning of the above, and REALLY would prefer not to screw this up, can someone help me with a more Debian-ish section to go into netbsd-gnu.h (which is then selected from config.gcc). Once I have it, I'll generate a new, shiny, sane-for-upstream patch to replace the netbsd-gcc-config.dpatch and netbsd-dynlinker.dpatch. -- Joel Baker <[EMAIL PROTECTED]>
pgpD9xMdT12qH.pgp
Description: PGP signature