https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218808
Jan Beich <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |rg Flags|maintainer-feedback?(gecko@ |maintainer-feedback+ |FreeBSD.org) | --- Comment #1 from Jan Beich <[email protected]> --- (In reply to O. Hartmann from comment #0) > I'm wondering about the error as it indicates a missing flag? Probably. Firefox uses --ignore-unresolved-symbol (ld.bfd 2.26+ or ld.gold 2.28+) or --warn-unresolved-symbol to allow environ(7) in shared libraries together with --no-undefined. This is a workaround for BSD libc, GNU libc is unaffected. $ cat a.c #include <stdio.h> void foo() { extern char **environ; for(int i = 0; environ[i] != NULL; i++) printf("%s\n", environ[i]); } $ cc -fPIC -shared -Wl,-z,defs -o a.so a.c -B/usr/local/bin -Wl,--ignore-unresolved-symbol,environ $ cc -fPIC -shared -Wl,-z,defs -o a.so a.c -Wl,--warn-unresolved-symbols /tmp/a-52cbc1.o: In function `foo': a.c:(.text+0x12): warning: undefined reference to `environ' a.c:(.text+0x32): warning: undefined reference to `environ' http://searchfox.org/mozilla-central/rev/6e1c138a06a8/old-configure.in#662 -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "[email protected]"
