[Bug 218808] www/firefox: usr/bin/ld: error: unknown argument: --warn-unresolved-symbols

2017-04-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218808

--- Comment #2 from Jan Beich  ---
(In reply to Jan Beich from comment #1)
> --ignore-unresolved-symbol (ld.bfd 2.26+

Oops, since ld.bfd 2.24 but the flag came from NetBSD.

https://mail-index.netbsd.org/source-changes/2008/04/03/msg004439.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 218808] www/firefox: usr/bin/ld: error: unknown argument: --warn-unresolved-symbols

2017-04-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218808

Jan Beich  changed:

   What|Removed |Added

 CC||freebsd-toolchain@FreeBSD.o
   ||rg
  Flags|maintainer-feedback?(gecko@ |maintainer-feedback+
   |FreeBSD.org)|

--- Comment #1 from Jan Beich  ---
(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 

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.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"