Skip to content

Commit 8b9bdc8

Browse files
committed
Add gcc 12
1 parent 7b91c95 commit 8b9bdc8

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

Dockerfile

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ SHELL ["/bin/bash", "-c"]
3030
#
3131
# Builder stage for compiling gcc-6.2.0 compiler
3232

33-
FROM caen-base as gcc-builder
33+
FROM caen-base as gcc-6-builder
3434

3535
# Install pre-requisite programs for compiling gcc-6.2.0
3636
RUN dnf update -y && dnf install -y --nodocs \
@@ -169,9 +169,10 @@ COPY --from=builder-golang /usr/um/go /usr/um/go
169169
RUN ln -s /usr/um/go/bin/go /usr/bin/go
170170

171171
# Set our compiled gcc to custom software location
172-
COPY --from=gcc-builder /usr/um/gcc-6.2.0/ /usr/um/gcc-6.2.0/
172+
COPY --from=gcc-6-builder /usr/um/gcc-6.2.0/ /usr/um/gcc-6.2.0/
173173

174-
# Install dev packages and tools, clean dnf cache to save space
174+
# Install dev packages and tools, clean dnf cache to save space. Also install
175+
# gcc-12.2.1
175176
RUN dnf --setopt=group_package_types=mandatory \
176177
groupinstall --nodocs -y "Development Tools" \
177178
&& dnf install --nodocs -y \
@@ -181,10 +182,34 @@ RUN dnf --setopt=group_package_types=mandatory \
181182
vim \
182183
which \
183184
gnupg2 \
185+
gcc-toolset-12 \
184186
&& dnf clean all \
185187
&& rm -rf /var/cache/yum \
186188
&& rm -rf /var/cache/dnf
187189

190+
# Configure versions of gcc. Default is 12.2.1, but gcc-12, gcc-12.2, gcc-12.2.1, gcc-8, gcc-8.5, gcc-8.5.0, gcc-6, gcc-6.2, gcc-6.2.0 should all work as expected
191+
192+
RUN ln -s /opt/rh/gcc-toolset-12/root/bin/gcc gcc \
193+
ln -s /opt/rh/gcc-toolset-12/root/bin/gcc g++ \
194+
ln -s /opt/rh/gcc-toolset-12/root/bin/gcc gcc-12 \
195+
ln -s /opt/rh/gcc-toolset-12/root/bin/gcc g++-12 \
196+
ln -s /opt/rh/gcc-toolset-12/root/bin/gcc gcc-12.2 \
197+
ln -s /opt/rh/gcc-toolset-12/root/bin/gcc g++-12.2 \
198+
ln -s /opt/rh/gcc-toolset-12/root/bin/gcc gcc-12.2.1 \
199+
ln -s /opt/rh/gcc-toolset-12/root/bin/gcc g++-12.2.1 \
200+
ln -s /usr/bin/gcc gcc-8 \
201+
ln -s /usr/bin/g++ g++-8 \
202+
ln -s /usr/bin/gcc gcc-8.5 \
203+
ln -s /usr/bin/g++ g++-8.5 \
204+
ln -s /usr/bin/gcc gcc-8.5.0 \
205+
ln -s /usr/bin/g++ g++-8.5.0 \
206+
ln -s /usr/um/gcc-6.2.0/bin/gcc gcc-6 \
207+
ln -s /usr/um/gcc-6.2.0/bin/g++ g++-6 \
208+
ln -s /usr/um/gcc-6.2.0/bin/gcc gcc-6.2 \
209+
ln -s /usr/um/gcc-6.2.0/bin/g++ g++-6.2 \
210+
ln -s /usr/um/gcc-6.2.0/bin/gcc gcc-6.2.0 \
211+
ln -s /usr/um/gcc-6.2.0/bin/g++ g++-6.2.0
212+
188213
# Give bash a pretty prompt
189214
ENV PS1="\[\e[0;1;38;5;82m\]CAEN ~\[\e[0m\] "
190215

0 commit comments

Comments
 (0)