From 8c34a8bf92a14aa489c30df6b434f42ac96216c3 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Tue, 4 Oct 2022 16:23:34 -0700 Subject: [PATCH] util-docker: Add 'ubuntu-22.04_gcc-version' Now that ubuntu 22.04 has been released we can use it to test newer GCC compilers. GCC-11 has been moved to use this image. Change-Id: I3b0dbd82112068f19682e5cf19ffbe81f3d18149 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64173 Reviewed-by: Kunal Pai Maintainer: Bobby Bruce Tested-by: kokoro --- util/dockerfiles/docker-compose.yaml | 2 +- .../Dockerfile | 28 ++++++++----------- 2 files changed, 13 insertions(+), 17 deletions(-) rename util/dockerfiles/{ubuntu-20.04_gcc-version-11 => ubuntu-22.04_gcc-version}/Dockerfile (71%) diff --git a/util/dockerfiles/docker-compose.yaml b/util/dockerfiles/docker-compose.yaml index 103c221dc0..53111f1c9e 100644 --- a/util/dockerfiles/docker-compose.yaml +++ b/util/dockerfiles/docker-compose.yaml @@ -66,7 +66,7 @@ services: image: gcr.io/gem5-test/gcc-version-10 gcc-11: build: - context: ubuntu-20.04_gcc-version-11 + context: ubuntu-22.04_gcc-version dockerfile: Dockerfile args: - version=11 diff --git a/util/dockerfiles/ubuntu-20.04_gcc-version-11/Dockerfile b/util/dockerfiles/ubuntu-22.04_gcc-version/Dockerfile similarity index 71% rename from util/dockerfiles/ubuntu-20.04_gcc-version-11/Dockerfile rename to util/dockerfiles/ubuntu-22.04_gcc-version/Dockerfile index f01479d526..121ac37c34 100644 --- a/util/dockerfiles/ubuntu-20.04_gcc-version-11/Dockerfile +++ b/util/dockerfiles/ubuntu-22.04_gcc-version/Dockerfile @@ -1,4 +1,4 @@ -# Copyright (c) 2021 The Regents of the University of California +# Copyright (c) 2022 The Regents of the University of California # All Rights Reserved. # # Redistribution and use in source and binary forms, with or without @@ -23,29 +23,25 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -FROM ubuntu:20.04 +FROM ubuntu:22.04 -# At the time of this Dockerfile's creation, Ubuntu 20.04 APT does not -# distribute gcc-11 by default. A special APT repository is needed. We hope -# this Dockerfile will merge with ubuntu-20.04_gcc-version once GCC-11 can be -# installed via APT more easily. +# Valid version values: +# 11 + +ARG version ENV DEBIAN_FRONTEND=noninteractive RUN apt -y update && apt -y upgrade && \ apt -y install git m4 scons zlib1g zlib1g-dev libprotobuf-dev \ protobuf-compiler libprotoc-dev libgoogle-perftools-dev python3-dev \ - python-is-python3 doxygen libboost-all-dev libhdf5-serial-dev \ - python3-pydot libpng-dev make software-properties-common - -RUN add-apt-repository \ - 'deb http://mirrors.kernel.org/ubuntu hirsute main universe' -RUN apt -y install gcc-11 g++-11 + doxygen libboost-all-dev libhdf5-serial-dev python3-pydot libpng-dev \ + gcc-${version} g++-${version} make RUN update-alternatives --install \ - /usr/bin/g++ g++ /usr/bin/g++-11 100 + /usr/bin/g++ g++ /usr/bin/g++-${version} 100 RUN update-alternatives --install \ - /usr/bin/gcc gcc /usr/bin/gcc-11 100 + /usr/bin/gcc gcc /usr/bin/gcc-${version} 100 RUN update-alternatives --install \ - /usr/bin/c++ c++ /usr/bin/g++-11 100 + /usr/bin/c++ c++ /usr/bin/g++-${version} 100 RUN update-alternatives --install \ - /usr/bin/cc cc /usr/bin/gcc-11 100 + /usr/bin/cc cc /usr/bin/gcc-${version} 100