Skip to content

Commit

Permalink
fix: correctly use gcc 10
Browse files Browse the repository at this point in the history
  • Loading branch information
daiyam committed Oct 13, 2024
1 parent 42af98d commit 8ac525e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 29 deletions.
14 changes: 3 additions & 11 deletions focal-arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand All @@ -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
10 changes: 3 additions & 7 deletions focal-armhf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
14 changes: 3 additions & 11 deletions focal-riscv64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit 8ac525e

Please sign in to comment.