From 438a6f244accca2628e5365d76fa50eb4a4ffa8d Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Fri, 10 Aug 2018 06:48:55 +0900 Subject: [PATCH] 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. --- python/mozbuild/mozbuild/action/check_binary.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/mozbuild/mozbuild/action/check_binary.py b/python/mozbuild/mozbuild/action/check_binary.py index 4cc6beaca294..3fadd4a2e77b 100644 --- a/python/mozbuild/mozbuild/action/check_binary.py +++ b/python/mozbuild/mozbuild/action/check_binary.py @@ -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)