Skip to content

Commit ae3bdb2

Browse files
authored
Prepare CBMC v6+ build on Ubuntu 18.04 (rust-lang#3377)
Use PPA with GCC-9 to build CBMC v6+ on Ubuntu 18.04 (to have full C++17 support) and build static binaries so that they can still be used on systems that might have libstdc++ from said PPA.
1 parent d66f0c2 commit ae3bdb2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,14 @@ jobs:
104104
apt-get install -y software-properties-common apt-utils
105105
add-apt-repository ppa:git-core/ppa
106106
add-apt-repository ppa:deadsnakes/ppa
107+
add-apt-repository ppa:ubuntu-toolchain-r/test
107108
apt-get update
108109
apt-get install -y \
109-
build-essential bash-completion curl lsb-release sudo g++ gcc flex \
110+
build-essential bash-completion curl lsb-release sudo g++-9 gcc-9 flex \
110111
bison make patch git python3.7 python3.7-dev python3.7-distutils
112+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 110 \
113+
--slave /usr/bin/g++ g++ /usr/bin/g++-9
114+
ln -sf cpp-9 /usr/bin/cpp
111115
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
112116
curl -s https://bootstrap.pypa.io/pip/3.7/get-pip.py -o get-pip.py
113117
python3 get-pip.py --force-reinstall

scripts/setup/ubuntu/install_cbmc.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ pushd "${WORK_DIR}"
4242
mkdir build
4343
git submodule update --init
4444

45-
cmake -S . -Bbuild -DWITH_JBMC=OFF -Dsat_impl="minisat2;cadical"
45+
cmake -S . -Bbuild -DWITH_JBMC=OFF -Dsat_impl="minisat2;cadical" \
46+
-DBUILD_SHARED_LIBS=OFF -DCMAKE_EXE_LINKER_FLAGS=-static
4647
make -C build -j$(nproc)
4748
cpack -G DEB --config build/CPackConfig.cmake
4849
sudo dpkg -i ./cbmc-*.deb

0 commit comments

Comments
 (0)