From a1a2edd2a6e104aa9ffdc4ada705f71b89f586d8 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Fri, 28 Aug 2020 18:28:23 -0700 Subject: [PATCH] misc,scons,util: Drop support for GCC 4 Corresponding website update: https://gem5-review.googlesource.com/c/public/gem5-website/+/33657 Issue-on: https://gem5.atlassian.net/browse/GEM5-218 Change-Id: Ia72edda6229214e2f9d548266a42a0affd49b340 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33659 Reviewed-by: Jason Lowe-Power Reviewed-by: Gabe Black Maintainer: Jason Lowe-Power Tested-by: kokoro --- SConstruct | 32 +++++++------------ util/cloudbuild/cloudbuild_create_images.yaml | 8 ----- 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/SConstruct b/SConstruct index 4ac134bbe..ca3f1a1db 100755 --- a/SConstruct +++ b/SConstruct @@ -357,24 +357,21 @@ else: "src/SConscript to support that compiler."))) if main['GCC']: - # Check for a supported version of gcc. >= 4.8 is chosen for its - # level of c++11 support. See - # http://gcc.gnu.org/projects/cxx0x.html for details. gcc_version = readCommand([main['CXX'], '-dumpversion'], exception=False) - if compareVersions(gcc_version, "4.8") < 0: - error('gcc version 4.8 or newer required.\n' + if compareVersions(gcc_version, "5") < 0: + error('gcc version 5 or newer required.\n' 'Installed version:', gcc_version) Exit(1) main['GCC_VERSION'] = gcc_version - if compareVersions(gcc_version, '4.9') >= 0: - # Incremental linking with LTO is currently broken in gcc versions - # 4.9 and above. A version where everything works completely hasn't - # yet been identified. - # - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67548 - main['BROKEN_INCREMENTAL_LTO'] = True + # Incremental linking with LTO is currently broken in gcc versions + # 4.9 and above. A version where everything works completely hasn't + # yet been identified. + # + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67548 + main['BROKEN_INCREMENTAL_LTO'] = True + if compareVersions(gcc_version, '6.0') >= 0: # gcc versions 6.0 and greater accept an -flinker-output flag which # selects what type of output the linker should generate. This is @@ -416,9 +413,6 @@ if main['GCC']: '-fno-builtin-realloc', '-fno-builtin-free']) elif main['CLANG']: - # Check for a supported version of clang, >= 3.1 is needed to - # support similar features as gcc 4.8. See - # http://clang.llvm.org/cxx_status.html for details clang_version_re = re.compile(".* version (\d+\.\d+)") clang_version_match = clang_version_re.search(CXX_version) if (clang_version_match): @@ -462,13 +456,9 @@ elif main['CLANG']: # Add sanitizers flags sanitizers=[] if GetOption('with_ubsan'): - # Only gcc >= 4.9 supports UBSan, so check both the version - # and the command-line option before adding the compiler and - # linker flags. - if not main['GCC'] or compareVersions(main['GCC_VERSION'], '4.9') >= 0: - sanitizers.append('undefined') + sanitizers.append('undefined') if GetOption('with_asan'): - # Available for gcc >= 4.8 or llvm >= 3.1 both a requirement + # Available for gcc >= 5 or llvm >= 3.1 both a requirement # by the build system sanitizers.append('address') suppressions_file = Dir('util').File('lsan-suppressions').get_abspath() diff --git a/util/cloudbuild/cloudbuild_create_images.yaml b/util/cloudbuild/cloudbuild_create_images.yaml index 2faadfa4a..bed950a2f 100644 --- a/util/cloudbuild/cloudbuild_create_images.yaml +++ b/util/cloudbuild/cloudbuild_create_images.yaml @@ -17,13 +17,6 @@ steps: 'gcr.io/$PROJECT_ID/ubuntu-18.04_min-dependencies:latest', 'util/dockerfiles/ubuntu-18.04_min-dependencies'] - - name: 'gcr.io/cloud-builders/docker' - args: ['build', - '-t', - 'gcr.io/$PROJECT_ID/gcc-version-4.8:latest', - '--build-arg', 'version=4.8', - 'util/dockerfiles/ubuntu-18.04_gcc-version'] - - name: 'gcr.io/cloud-builders/docker' args: ['build', '-t', @@ -124,7 +117,6 @@ steps: images: ['gcr.io/$PROJECT_ID/ubuntu-20.04_all-dependencies:latest', 'gcr.io/$PROJECT_ID/ubuntu-18.04_all-dependencies:latest', 'gcr.io/$PROJECT_ID/ubuntu-18.04_min-dependencies:latest', - 'gcr.io/$PROJECT_ID/gcc-version-4.8:latest', 'gcr.io/$PROJECT_ID/gcc-version-5:latest', 'gcr.io/$PROJECT_ID/gcc-version-6:latest', 'gcr.io/$PROJECT_ID/gcc-version-7:latest', -- 2.30.2