author Nick Alexander <>
Fri, 12 Oct 2018 22:38:44 +0000
changeset 499408 91300d29898b1a1102e1b62164aeee1f56b2ee86
parent 421161 7430f157b160e95becfe148ff4f9336c8b28c4df
permissions -rw-r--r--
Bug 1489443 - Set GCC_USE_GNU_LD based on linker kind. r=froydnj The desired outcome of this change is that we'll set `-Wl,--version-script` based on linker kind and not on the output of `$LINKER -v`. This is a cheap way to address a simple problem that has a complicated ideal solution. The underlying issue is that in some situations, when targeting Android, a macOS system `ld` is interrogated to determine if a cross-compiling linker "is GNU ld" and a particular linker feature is set in that situation. The macOS system `ld` doesn't pass the "is GNU ld" test, and the linker feature isn't set; that causes link failures, even though the actual linker has nothing to do with the system `ld`. The ideal solution is to test for linker capabilities dynamically. We do a lot of that in, and we don't do any of that in toolchain.configure. Rather than start testing in toolchain.configure, we hard-code: a cheap solution to the immediate problem. Differential Revision:

if test `uname -s` = Linux; then
  . $topsrcdir/build/macosx/cross-mozconfig.common
  . $topsrcdir/build/macosx/local-mozconfig.common

. $topsrcdir/build/mozconfig.stylo