Bug 1482270 - Check libgcc version compatibility. r=froydnj

Similar to what we do for libstdc++ and glibc, we need to ensure that
we don't somehow end up with a dependency on a too new libgcc, which
can happen if it comes from gcc 7.0.
This commit is contained in:
Mike Hommey 2018-08-10 06:48:55 +09:00
parent 15adf94f4d
commit 438a6f244a

View File

@ -22,6 +22,7 @@ from mozpack.executables import (
STDCXX_MAX_VERSION = Version('3.4.16')
GLIBC_MAX_VERSION = Version('2.12')
LIBGCC_MAX_VERSION = Version('4.8')
HOST = {
'MOZ_LIBSTDCXX_VERSION':
@ -132,6 +133,10 @@ def check_stdcxx(target, binary):
target, binary, 'libstdc++', 'GLIBCXX', STDCXX_MAX_VERSION)
def check_libgcc(target, binary):
check_dep_versions(target, binary, 'libgcc', 'GCC', LIBGCC_MAX_VERSION)
def check_glibc(target, binary):
check_dep_versions(target, binary, 'libc', 'GLIBC', GLIBC_MAX_VERSION)
@ -292,6 +297,7 @@ def checks(target, binary):
checks = []
if target['MOZ_LIBSTDCXX_VERSION']:
checks.append(check_stdcxx)
checks.append(check_libgcc)
checks.append(check_glibc)
checks.append(check_textrel)
checks.append(check_nsmodules)