Date: Sat, 22 Apr 2017 08:06:04 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 218808] www/firefox: usr/bin/ld: error: unknown argument: --warn-unresolved-symbols Message-ID: <bug-218808-29464-5lMbBrcH4n@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-218808-29464@https.bugs.freebsd.org/bugzilla/> References: <bug-218808-29464@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D218808 Jan Beich <jbeich@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |freebsd-toolchain@FreeBSD.o | |rg Flags|maintainer-feedback?(gecko@ |maintainer-feedback+ |FreeBSD.org) | --- Comment #1 from Jan Beich <jbeich@FreeBSD.org> --- (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 =3D 0; environ[i] !=3D 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 --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-218808-29464-5lMbBrcH4n>