Skip to content

Commit 7a3764a

Browse files
committed
Add gcc to clang images
This is needed also in clang images as a build tool for build requirements, such as flex.
1 parent 7cb60cf commit 7a3764a

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

docker/debian/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ ARG DEBIAN_FRONTEND=noninteractive
162162
# Install Clang. Use the LLVM apt repository to access the latest versions. We
163163
# must repeat the DEBIAN_VERSION argument here, as it is not inherited from the
164164
# base or source images.
165+
# Note, gcc is needed for build dependencies.
165166
ARG DEBIAN_VERSION
166167
ARG CLANG_VERSION
167168
RUN <<EOF
@@ -170,6 +171,7 @@ printf "%s\n%s\n" \
170171
"deb [signed-by=/etc/apt/keyrings/llvm.gpg] https://apt.llvm.org/${DEBIAN_VERSION}/ llvm-toolchain-${DEBIAN_VERSION}-${CLANG_VERSION} main" \
171172
| tee /etc/apt/sources.list.d/llvm.list
172173
apt-get update
174+
apt-get install -y --no-install-recommends gcc
173175
apt-get install -t llvm-toolchain-${DEBIAN_VERSION}-${CLANG_VERSION} -y --no-install-recommends clang-${CLANG_VERSION} llvm-${CLANG_VERSION}
174176
apt-get clean
175177
rm -rf /var/lib/apt/lists/*

docker/rhel/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,9 @@ FROM base AS clang
140140

141141
# Install Clang. Note that in the RHEL UBIs, we cannot choose the Clang version
142142
# to install and we get what is available.
143+
# Note, gcc is needed for build dependencies.
143144
RUN <<EOF
144-
dnf install -y --setopt=tsflags=nodocs clang llvm
145+
dnf install -y --setopt=tsflags=nodocs clang llvm gcc
145146
dnf clean -y all
146147
rm -rf /var/cache/dnf/*
147148
EOF

docker/ubuntu/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,14 @@ FROM base AS clang
157157
# This is not inherited from base image, ensure no manual interaction needed.
158158
ARG DEBIAN_FRONTEND=noninteractive
159159

160-
# Install Clang.
160+
# Install Clang. Note, gcc is needed for build dependencies
161161
ARG CLANG_VERSION
162162
RUN <<EOF
163163
apt-get update
164164
apt-get install -y --no-install-recommends \
165165
clang-${CLANG_VERSION} \
166-
llvm-${CLANG_VERSION}
166+
llvm-${CLANG_VERSION} \
167+
gcc
167168
apt-get clean
168169
rm -rf /var/lib/apt/lists/*
169170
EOF

0 commit comments

Comments
 (0)