Skip to content

Commit

Permalink
Switch to clang-12 as minimum version
Browse files Browse the repository at this point in the history
clang-11 is ancient and seems to miscompile seL4 in some SMP
configurations. Use clang-12 as minimum version instead.

Signed-off-by: Gerwin Klein <[email protected]>
  • Loading branch information
lsf37 committed Oct 9, 2024
1 parent 015a633 commit fc3c6db
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions scripts/base_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ as_root apt-get install -y --no-install-recommends \
traceroute \
# end of list

# public key for apt.llvm.org
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | as_root apt-key add -

# for specific llvm/clang versions
echo "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-12 main" >> /etc/apt/sources.list
as_root apt-get update -q

# Install python dependencies
# Upgrade pip first, then install setuptools (required for other pip packages)
# Install some basic python tools
Expand Down
8 changes: 4 additions & 4 deletions scripts/sel4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ as_root apt-get install -y --no-install-recommends \
qemu-system-x86 \
sloccount \
u-boot-tools \
clang-11 \
clang-12 \
g++-10 \
g++-10-arm-linux-gnueabi \
g++-10-arm-linux-gnueabihf \
Expand All @@ -80,7 +80,7 @@ as_root apt-get install -y --no-install-recommends \
gcc-10-arm-linux-gnueabihf \
gcc-10-base \
gcc-riscv64-unknown-elf \
libclang-11-dev \
libclang-12-dev \
qemu-system-arm \
qemu-system-misc \
$CROSS
Expand Down Expand Up @@ -144,12 +144,12 @@ if [ "$DESKTOP_MACHINE" = "no" ] ; then
done
done

# Ensure that clang-11 shows up as clang
# Ensure that clang-12 shows up as clang
for compiler in clang \
clang++ \
# end of list
do
as_root update-alternatives --install /usr/bin/"$compiler" "$compiler" "$(which "$compiler"-11)" 60 && \
as_root update-alternatives --install /usr/bin/"$compiler" "$compiler" "$(which "$compiler"-12)" 60 && \
as_root update-alternatives --auto "$compiler"
done
# Do a quick check to make sure it works:
Expand Down

0 comments on commit fc3c6db

Please sign in to comment.