Backed out changeset 91300d29898b (bug 1489443) for MinGW build bustages. CLOSED TREE
authorCosmin Sabou <csabou@mozilla.com>
Sat, 13 Oct 2018 02:17:15 +0300
changeset 440964 a06d50af52573db2ac6265ee169fc8039fbf8b04
parent 440963 4e77c1c74676244514aff0fd213fb77ad18f371d
child 440965 a18cdefab69c0e21d8eaa01628e114a9b9b60873
push id34841
push useraciure@mozilla.com
push dateSat, 13 Oct 2018 09:35:03 +0000
treeherdermozilla-central@0dfb3afc7357 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1489443
milestone64.0a1
backs out91300d29898b1a1102e1b62164aeee1f56b2ee86
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 91300d29898b (bug 1489443) for MinGW build bustages. CLOSED TREE
build/autoconf/toolchain.m4
build/moz.configure/toolchain.configure
js/src/old-configure.in
old-configure.in
python/mozbuild/mozbuild/action/generate_symbols_file.py
security/generate_mapfile.py
--- a/build/autoconf/toolchain.m4
+++ b/build/autoconf/toolchain.m4
@@ -29,16 +29,22 @@ if test "$CC_TYPE" = "clang"; then
     GNU_CXX=1
     CLANG_CC=1
     CLANG_CXX=1
 fi
 if test "$CC_TYPE" = "clang-cl"; then
     CLANG_CL=1
 fi
 
+if test "$GNU_CC"; then
+    if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
+        GCC_USE_GNU_LD=1
+    fi
+fi
+
 AC_SUBST(CLANG_CXX)
 AC_SUBST(CLANG_CL)
 ])
 
 AC_DEFUN([MOZ_CROSS_COMPILER],
 [
 echo "cross compiling from $host to $target"
 
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1813,23 +1813,16 @@ def select_linker(linker, c_compiler, de
     return result
 
 
 set_config('LD_IS_BFD', depends(select_linker.KIND)
            (lambda x: x == 'bfd' or None))
 add_old_configure_assignment('LINKER_LDFLAGS', select_linker.LINKER_FLAG)
 
 
-# GCC_USE_GNU_LD=1 means the linker is command line compatible with GNU ld.
-set_config('GCC_USE_GNU_LD', depends(select_linker.KIND)
-           (lambda x: x in ('bfd', 'gold', 'lld') or None))
-add_old_configure_assignment('GCC_USE_GNU_LD', depends(select_linker.KIND)
-                             (lambda x: x in ('bfd', 'gold', 'lld') or None))
-
-
 # Assembler detection
 # ==============================================================
 
 js_option(env='AS', nargs=1, help='Path to the assembler')
 
 @depends(target, c_compiler)
 def as_info(target, c_compiler):
     if c_compiler.type in ('msvc', 'clang-cl'):
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -1765,16 +1765,18 @@ AC_SUBST(HOST_LDFLAGS)
 AC_SUBST_LIST(HOST_OPTIMIZE_FLAGS)
 AC_SUBST(HOST_AR)
 AC_SUBST(HOST_AR_FLAGS)
 AC_SUBST(HOST_RANLIB)
 AC_SUBST(HOST_BIN_SUFFIX)
 
 AC_SUBST(TARGET_XPCOM_ABI)
 
+AC_SUBST(GCC_USE_GNU_LD)
+
 AC_SUBST_LIST(DSO_CFLAGS)
 AC_SUBST_LIST(DSO_PIC_CFLAGS)
 AC_SUBST(DSO_LDOPTS)
 AC_SUBST(BIN_SUFFIX)
 AC_SUBST(USE_N32)
 AC_SUBST(CC_VERSION)
 AC_SUBST(MOZ_LINKER)
 AC_SUBST(WIN32_CONSOLE_EXE_LDFLAGS)
--- a/old-configure.in
+++ b/old-configure.in
@@ -4207,16 +4207,17 @@ AC_SUBST(HOST_AR_FLAGS)
 AC_SUBST(HOST_RANLIB)
 AC_SUBST(HOST_BIN_SUFFIX)
 
 AC_SUBST(TARGET_XPCOM_ABI)
 AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSSE3)
 AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSE4_1)
 AC_SUBST(HAVE_X86_AVX2)
 AC_SUBST(HAVE_ALTIVEC)
+AC_SUBST(GCC_USE_GNU_LD)
 
 AC_SUBST_LIST(DSO_CFLAGS)
 AC_SUBST_LIST(DSO_PIC_CFLAGS)
 AC_SUBST(DSO_LDOPTS)
 AC_SUBST(BIN_SUFFIX)
 AC_SUBST(USE_N32)
 AC_SUBST(CC_VERSION)
 AC_SUBST(NS_ENABLE_TSF)
--- a/python/mozbuild/mozbuild/action/generate_symbols_file.py
+++ b/python/mozbuild/mozbuild/action/generate_symbols_file.py
@@ -66,17 +66,17 @@ def generate_symbols_file(output, *args)
         # The DATA variable is "simply" expanded by the preprocessor, to
         # nothing on non-Windows, such that we only get the symbol name on
         # those platforms, and to DATA on Windows, so that the "DATA" part
         # is, in fact, part of the symbol name as far as the symbols variable
         # is concerned.
         assert ext == '.def'
         output.write('LIBRARY %s\nEXPORTS\n  %s\n'
                      % (libname, '\n  '.join(symbols)))
-    elif buildconfig.substs.get('GCC_USE_GNU_LD'):
+    elif buildconfig.substs['GCC_USE_GNU_LD']:
         # A linker version script is generated for GNU LD that looks like the
         # following:
         # liblibrary.so {
         # global:
         #   symbol1;
         #   symbol2;
         #   ...
         # local:
--- a/security/generate_mapfile.py
+++ b/security/generate_mapfile.py
@@ -17,18 +17,17 @@
 # Mozilla's supports building on Linux for Windows using MinGW. MinGW
 # expects all lines containing ;+ removed and all ;- tokens removed.
 
 import buildconfig
 
 
 def main(output, input):
     is_darwin = buildconfig.substs['OS_ARCH'] == 'Darwin'
-    is_mingw = "WINNT" == buildconfig.substs['OS_ARCH'] and \
-        buildconfig.substs.get('GCC_USE_GNU_LD')
+    is_mingw = "WINNT" == buildconfig.substs['OS_ARCH'] and buildconfig.substs['GCC_USE_GNU_LD']
 
     with open(input, 'rb') as f:
         for line in f:
             line = line.rstrip()
             # On everything except MinGW, remove all lines containing ';-'
             if not is_mingw and ';-' in line:
                 continue
             # On OS X, remove all lines containing ';+'