From 8ac525ef1acd01fb94fca4fae9d9f65a93b423bc Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Sun, 13 Oct 2024 17:47:07 +0200 Subject: [PATCH] fix: correctly use gcc 10 --- focal-arm64/Dockerfile | 14 +++----------- focal-armhf/Dockerfile | 10 +++------- focal-riscv64/Dockerfile | 14 +++----------- 3 files changed, 9 insertions(+), 29 deletions(-) diff --git a/focal-arm64/Dockerfile b/focal-arm64/Dockerfile index 8f0dd31..c404f9c 100644 --- a/focal-arm64/Dockerfile +++ b/focal-arm64/Dockerfile @@ -17,12 +17,8 @@ RUN echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal-security main un RUN echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal-updates main universe multiverse restricted" | tee -a /etc/apt/sources.list RUN dpkg --add-architecture arm64 RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc-10 \ - g++-10 \ gcc-10-aarch64-linux-gnu \ g++-10-aarch64-linux-gnu \ - gcc-8-aarch64-linux-gnu \ - g++-8-aarch64-linux-gnu \ binutils-aarch64-linux-gnu \ build-essential \ git \ @@ -63,10 +59,6 @@ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null RUN sudo apt-get update && sudo apt-get install -y docker-ce -# Set gcc-10 as default -RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 -RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 - # Check compiler toolchain RUN gcc --version RUN g++ --version @@ -77,8 +69,8 @@ RUN g++ --version ENV AS=/usr/bin/aarch64-linux-gnu-as \ AR=/usr/bin/aarch64-linux-gnu-ar \ - CC=/usr/bin/aarch64-linux-gnu-gcc-8 \ - CPP=/usr/bin/aarch64-linux-gnu-cpp-8 \ - CXX=/usr/bin/aarch64-linux-gnu-g++-8 \ + CC=/usr/bin/aarch64-linux-gnu-gcc-10 \ + CPP=/usr/bin/aarch64-linux-gnu-cpp-10 \ + CXX=/usr/bin/aarch64-linux-gnu-g++-10 \ LD=/usr/bin/aarch64-linux-gnu-ld \ PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig diff --git a/focal-armhf/Dockerfile b/focal-armhf/Dockerfile index c5f040e..59c812d 100644 --- a/focal-armhf/Dockerfile +++ b/focal-armhf/Dockerfile @@ -17,12 +17,8 @@ RUN echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal-security main un RUN echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ focal-updates main universe multiverse restricted" | tee -a /etc/apt/sources.list RUN dpkg --add-architecture armhf RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc-10 \ - g++-10 \ gcc-10-arm-linux-gnueabihf \ g++-10-arm-linux-gnueabihf \ - gcc-8-arm-linux-gnueabihf \ - g++-8-arm-linux-gnueabihf \ binutils-arm-linux-gnueabihf \ build-essential \ git \ @@ -77,8 +73,8 @@ RUN g++ --version ENV AS=/usr/bin/arm-linux-gnueabihf-as \ AR=/usr/bin/arm-linux-gnueabihf-ar \ - CC=/usr/bin/arm-linux-gnueabihf-gcc-8 \ - CPP=/usr/bin/arm-linux-gnueabihf-cpp-8 \ - CXX=/usr/bin/arm-linux-gnueabihf-g++-8 \ + CC=/usr/bin/arm-linux-gnueabihf-gcc-10 \ + CPP=/usr/bin/arm-linux-gnueabihf-cpp-10 \ + CXX=/usr/bin/arm-linux-gnueabihf-g++-10 \ LD=/usr/bin/arm-linux-gnueabihf-ld \ PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig diff --git a/focal-riscv64/Dockerfile b/focal-riscv64/Dockerfile index 564cbbc..03d8b5f 100644 --- a/focal-riscv64/Dockerfile +++ b/focal-riscv64/Dockerfile @@ -17,12 +17,8 @@ RUN echo "deb [arch=riscv64] http://ports.ubuntu.com/ focal-security main univer RUN echo "deb [arch=riscv64] http://ports.ubuntu.com/ focal-updates main universe multiverse restricted" | tee -a /etc/apt/sources.list RUN dpkg --add-architecture riscv64 RUN apt-get update && apt-get install -y --no-install-recommends \ - gcc-10 \ - g++-10 \ gcc-10-riscv64-linux-gnu \ g++-10-riscv64-linux-gnu \ - gcc-8-riscv64-linux-gnu \ - g++-8-riscv64-linux-gnu \ binutils-aarch64-linux-gnu \ build-essential \ git \ @@ -64,10 +60,6 @@ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null RUN sudo apt-get update && sudo apt-get install -y docker-ce -# Set gcc-10 as default -RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 -RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 - # Check compiler toolchain RUN gcc --version RUN g++ --version @@ -78,8 +70,8 @@ RUN g++ --version ENV AS=/usr/bin/riscv64-linux-gnu-as \ AR=/usr/bin/riscv64-linux-gnu-ar \ - CC=/usr/bin/riscv64-linux-gnu-gcc-8 \ - CPP=/usr/bin/riscv64-linux-gnu-cpp-8 \ - CXX=/usr/bin/riscv64-linux-gnu-g++-8 \ + CC=/usr/bin/riscv64-linux-gnu-gcc-10 \ + CPP=/usr/bin/riscv64-linux-gnu-cpp-10 \ + CXX=/usr/bin/riscv64-linux-gnu-g++-10 \ LD=/usr/bin/riscv64-linux-gnu-ld \ PKG_CONFIG_PATH=/usr/lib/riscv64-linux-gnu/pkgconfig