Skip to content

Commit

Permalink
Update every release platform to gcc-9
Browse files Browse the repository at this point in the history
  • Loading branch information
corco committed May 1, 2021
1 parent dfe69f6 commit 1c8806e
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 12 deletions.
13 changes: 8 additions & 5 deletions releasing/centos/8/compiler.dockerstage
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Install C++ compiler
RUN yum -y group install --nogpgcheck "Development Tools" || \
yum -y groupinstall --nogpgcheck "Development Tools"
# Link libstdc++ statically so people don't have to install devtoolset-8
# just to use verible.
ENV BAZEL_LINKOPTS "-static-libstdc++:-lm -static-libstdc++:-lrt"
ENV BAZEL_LINKLIBS "-l%:libstdc++.a"

RUN gcc --version
RUN g++ --version
# Get a newer GCC version
RUN yum install -y --nogpgcheck gcc-toolset-9-toolchain

SHELL [ "scl", "enable", "gcc-toolset-9" ]
4 changes: 2 additions & 2 deletions releasing/centos/common/compiler.dockerstage
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ ENV BAZEL_LINKLIBS "-l%:libstdc++.a"

# Get a newer GCC version
RUN yum install -y --nogpgcheck centos-release-scl
RUN yum install -y --nogpgcheck devtoolset-8
RUN yum install -y --nogpgcheck devtoolset-9

SHELL [ "scl", "enable", "devtoolset-8" ]
SHELL [ "scl", "enable", "devtoolset-9" ]
2 changes: 1 addition & 1 deletion releasing/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ sed "s#${TARGET_OS}:VERSION#${TARGET_OS}:${TARGET_VERSION}#g" ${TARGET_OS}.docke
case "$TARGET_OS" in
ubuntu)
# Compiler
[ "$TARGET_VERSION" = xenial ] && _version="$TARGET_VERSION" || _version="common"
[ "$TARGET_VERSION" = xenial ] || [ "$TARGET_VERSION" = bionic ] && _version="$TARGET_VERSION" || _version="common"
cat ${TARGET_OS}/${_version}/compiler.dockerstage >> ${OUT_DIR}/Dockerfile
# Bazel
cat ${TARGET_OS}/common/bazel.dockerstage >> ${OUT_DIR}/Dockerfile
Expand Down
12 changes: 12 additions & 0 deletions releasing/ubuntu/bionic/compiler.dockerstage
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
RUN add-apt-repository ppa:ubuntu-toolchain-r/test; apt-get update
RUN apt-get install -y \
build-essential \
g++-9 \
gcc-9

RUN ln -sf /usr/bin/gcc-9 /usr/bin/gcc
RUN ln -sf /usr/bin/g++-9 /usr/bin/g++

# Link libstdc++ statically
ENV BAZEL_LINKOPTS "-static-libstdc++:-lm"
ENV BAZEL_LINKLIBS "-l%:libstdc++.a"
8 changes: 4 additions & 4 deletions releasing/ubuntu/xenial/compiler.dockerstage
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
RUN add-apt-repository ppa:ubuntu-toolchain-r/test; apt-get update
RUN apt-get install -y \
build-essential \
g++-7 \
gcc-7
g++-9 \
gcc-9

RUN ln -sf /usr/bin/gcc-7 /usr/bin/gcc
RUN ln -sf /usr/bin/g++-7 /usr/bin/g++
RUN ln -sf /usr/bin/gcc-9 /usr/bin/gcc
RUN ln -sf /usr/bin/g++-9 /usr/bin/g++

# Link libstdc++ statically
ENV BAZEL_LINKOPTS "-static-libstdc++:-lm"
Expand Down

0 comments on commit 1c8806e

Please sign in to comment.