diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py index ed6c95952..f120590e6 100644 --- a/unittests/linuxliketests.py +++ b/unittests/linuxliketests.py @@ -1726,10 +1726,8 @@ class LinuxlikeTests(BasePlatformTests): testdir = os.path.join(self.unit_test_dir, '86 prelinking') env = get_fake_env(testdir, self.builddir, self.prefix) cc = detect_c_compiler(env, MachineChoice.HOST) - if cc.id == "gcc": - gccver = subprocess.check_output(['gcc', '--version']) - if b'7.5.0' in gccver: - raise SkipTest('GCC on Bionic is too old to be supported.') + if cc.id == "gcc" and not version_compare(cc.version, '>=9'): + raise SkipTest('Prelinking not supported with gcc 8 or older.') self.init(testdir) self.build() outlib = os.path.join(self.builddir, 'libprelinked.a')