Skip to content

Commit b7c8bc7

Browse files
committed
Update dist-various to Ubuntu 20.04
This updates the dist-various-1 and dist-various-2 images to Ubuntu 20.04. This requires some adjustments: * `DEBIAN_FRONTEND=noninteractive` required for apt install. * `team-gcc-argm-embedded` PPA does not support focal. However, we can simply use the distro-provided `gcc-arm-none-eabi`. Per the comment, the PPA was only used to get a newer version. * rumprun has to be updated to avoid a linker error. * We need to build rumrun with `NOGCCERROR`, which disables use of `-Werror` and allows building with a newer compiler. * We need to install `libtinfo5`, which appears to be a dependency of the clang used during the fuchsia build. * We need to switch to `g++-8` rather than `g++-7`, as at least `g++-7-arm-linux-gnueabi` is not available on focal. * We need to upgrade to GCC 6.5 for the Solaris build, as GCC 6.4 does not support the newer libisl version.
1 parent b122908 commit b7c8bc7

File tree

6 files changed

+20
-22
lines changed

6 files changed

+20
-22
lines changed

src/ci/docker/host-x86_64/dist-various-1/Dockerfile

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:20.04
22

3-
RUN apt-get update && apt-get install -y --no-install-recommends \
3+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
44
g++ \
55
automake \
66
bison \
@@ -30,6 +30,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3030
g++-aarch64-linux-gnu \
3131
g++-mips64-linux-gnuabi64 \
3232
g++-mips64el-linux-gnuabi64 \
33+
gcc-arm-none-eabi \
3334
gcc-sparc64-linux-gnu \
3435
libc6-dev-sparc64-cross \
3536
bzip2 \
@@ -43,11 +44,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4344

4445
WORKDIR /build
4546

46-
# Use the team-gcc-arm-embedded PPA for a newer version of Arm GCC
47-
RUN add-apt-repository ppa:team-gcc-arm-embedded/ppa && \
48-
apt-get update && \
49-
apt-get install -y --no-install-recommends gcc-arm-embedded
50-
5147
COPY host-x86_64/dist-various-1/build-rumprun.sh /build
5248
RUN ./build-rumprun.sh
5349

src/ci/docker/host-x86_64/dist-various-1/build-rumprun.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ exit 1
2020

2121
git clone https://github.com/rumpkernel/rumprun
2222
cd rumprun
23-
git reset --hard 39a97f37a85e44c69b662f6b97b688fbe892603b
23+
git reset --hard b04d42225a12a6fae57a78a9c1cf23642e46cd00
2424
git submodule update --init
2525

26-
CC=cc hide_output ./build-rr.sh -d /usr/local hw
26+
# Disable -Werror, to avoid breaking the build with newer compilers.
27+
CC=cc NOGCCERROR=1 hide_output ./build-rr.sh -d /usr/local hw
2728
cd ..
2829
rm -rf rumprun

src/ci/docker/host-x86_64/dist-various-2/Dockerfile

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:18.04
1+
FROM ubuntu:20.04
22

33
COPY scripts/cross-apt-packages.sh /scripts/
44
RUN sh /scripts/cross-apt-packages.sh
@@ -9,12 +9,13 @@ RUN sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list
99
RUN apt-get update && apt-get build-dep -y clang llvm && apt-get install -y --no-install-recommends \
1010
build-essential \
1111
# gcc-multilib can not be installed together with gcc-arm-linux-gnueabi
12-
gcc-7-multilib \
12+
g++-8-multilib \
1313
libedit-dev \
1414
libgmp-dev \
1515
libisl-dev \
1616
libmpc-dev \
1717
libmpfr-dev \
18+
libtinfo5 \
1819
ninja-build \
1920
nodejs \
2021
python3-dev \
@@ -23,7 +24,7 @@ RUN apt-get update && apt-get build-dep -y clang llvm && apt-get install -y --no
2324
# Needed for apt-key to work:
2425
dirmngr \
2526
gpg-agent \
26-
g++-7-arm-linux-gnueabi
27+
g++-8-arm-linux-gnueabi
2728

2829
RUN apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys 74DA7924C5513486
2930
RUN add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2 main'
@@ -41,8 +42,8 @@ ENV \
4142
AR_x86_64_sun_solaris=x86_64-sun-solaris2.10-ar \
4243
CC_x86_64_sun_solaris=x86_64-sun-solaris2.10-gcc \
4344
CXX_x86_64_sun_solaris=x86_64-sun-solaris2.10-g++ \
44-
CC_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-gcc-7 \
45-
CXX_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-g++-7 \
45+
CC_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-gcc-8 \
46+
CXX_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-g++-8 \
4647
AR_x86_64_fortanix_unknown_sgx=ar \
4748
CC_x86_64_fortanix_unknown_sgx=x86_64-fortanix-unknown-sgx-clang-11 \
4849
CFLAGS_x86_64_fortanix_unknown_sgx="-mlvi-hardening -mllvm -x86-experimental-lvi-inline-asm-hardening" \
@@ -51,14 +52,14 @@ ENV \
5152
AR_i686_unknown_freebsd=i686-unknown-freebsd11-ar \
5253
CC_i686_unknown_freebsd=i686-unknown-freebsd11-clang \
5354
CXX_i686_unknown_freebsd=i686-unknown-freebsd11-clang++ \
54-
CC=gcc-7 \
55-
CXX=g++-7
55+
CC=gcc-8 \
56+
CXX=g++-8
5657

5758
WORKDIR /build
5859
COPY scripts/musl.sh /build
5960
RUN env \
60-
CC=arm-linux-gnueabi-gcc-7 CFLAGS="-march=armv7-a" \
61-
CXX=arm-linux-gnueabi-g++-7 CXXFLAGS="-march=armv7-a" \
61+
CC=arm-linux-gnueabi-gcc-8 CFLAGS="-march=armv7-a" \
62+
CXX=arm-linux-gnueabi-g++-8 CXXFLAGS="-march=armv7-a" \
6263
bash musl.sh armv7 && \
6364
rm -rf /build/*
6465

@@ -108,7 +109,7 @@ ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabi
108109
ENV TARGETS=$TARGETS,i686-unknown-freebsd
109110

110111
# As per https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1300211
111-
# we need asm in the search path for gcc-7 (for gnux32) but not in the search path of the
112+
# we need asm in the search path for gcc-8 (for gnux32) but not in the search path of the
112113
# cross compilers.
113114
# Luckily one of the folders is /usr/local/include so symlink /usr/include/asm-generic there
114115
RUN ln -s /usr/include/asm-generic /usr/local/include/asm

src/ci/docker/host-x86_64/dist-various-2/build-solaris-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARCH=$1
77
LIB_ARCH=$2
88
APT_ARCH=$3
99
BINUTILS=2.28.1
10-
GCC=6.4.0
10+
GCC=6.5.0
1111

1212
# First up, build binutils
1313
mkdir binutils

src/ci/docker/host-x86_64/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ target="x86_64-fortanix-unknown-sgx"
77

88
install_prereq() {
99
curl https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -
10-
add-apt-repository -y 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
10+
add-apt-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main'
1111
apt-get update
1212
apt-get install -y --no-install-recommends \
1313
build-essential \

src/ci/docker/scripts/cross-apt-packages.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
apt-get update && apt-get install -y --no-install-recommends \
2+
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
33
automake \
44
bison \
55
bzip2 \

0 commit comments

Comments
 (0)