Skip to content

Commit 29f5e5c

Browse files
committed
Upgrade the FreeBSD toolchain to version 11.4
FreeBSD 10 reached its end-of-life in October 2018, and that toolchain caused issues in the LLVM 11 upgrade (#73526) that are resolved with the toolchain from FreeBSD 11.
1 parent 543f03d commit 29f5e5c

File tree

3 files changed

+11
-25
lines changed

3 files changed

+11
-25
lines changed

src/ci/docker/host-x86_64/dist-i686-freebsd/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ COPY scripts/sccache.sh /scripts/
2323
RUN sh /scripts/sccache.sh
2424

2525
ENV \
26-
AR_i686_unknown_freebsd=i686-unknown-freebsd10-ar \
27-
CC_i686_unknown_freebsd=i686-unknown-freebsd10-clang \
28-
CXX_i686_unknown_freebsd=i686-unknown-freebsd10-clang++
26+
AR_i686_unknown_freebsd=i686-unknown-freebsd11-ar \
27+
CC_i686_unknown_freebsd=i686-unknown-freebsd11-clang \
28+
CXX_i686_unknown_freebsd=i686-unknown-freebsd11-clang++
2929

3030
ENV HOSTS=i686-unknown-freebsd
3131

src/ci/docker/host-x86_64/dist-x86_64-freebsd/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ COPY scripts/sccache.sh /scripts/
2323
RUN sh /scripts/sccache.sh
2424

2525
ENV \
26-
AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-ar \
27-
CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-clang \
28-
CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-clang++
26+
AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd11-ar \
27+
CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd11-clang \
28+
CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd11-clang++
2929

3030
ENV HOSTS=x86_64-unknown-freebsd
3131

src/ci/docker/scripts/freebsd-toolchain.sh

+5-19
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ set -eux
55

66
arch=$1
77
binutils_version=2.25.1
8-
freebsd_version=10.3
9-
triple=$arch-unknown-freebsd10
8+
freebsd_version=11.4
9+
triple=$arch-unknown-freebsd11
1010
sysroot=/usr/local/$triple
1111

1212
hide_output() {
@@ -58,31 +58,17 @@ for lib in c++ c_nonshared compiler_rt execinfo gcc pthread rt ssp_nonshared; do
5858
done
5959

6060
# Originally downloaded from:
61-
# https://download.freebsd.org/ftp/releases/${freebsd_arch}/${freebsd_version}-RELEASE/base.txz
62-
URL=https://ci-mirrors.rust-lang.org/rustc/2019-04-04-freebsd-${freebsd_arch}-${freebsd_version}-RELEASE-base.txz
61+
# URL=https://download.freebsd.org/ftp/releases/${freebsd_arch}/${freebsd_version}-RELEASE/base.txz
62+
URL=https://ci-mirrors.rust-lang.org/rustc/2020-08-09-freebsd-${freebsd_arch}-${freebsd_version}-RELEASE-base.txz
6363
curl "$URL" | tar xJf - -C "$sysroot" --wildcards "${files_to_extract[@]}"
6464

65-
# Fix up absolute symlinks from the system image. This can be removed
66-
# for FreeBSD 11. (If there's an easy way to make them relative
67-
# symlinks instead, feel free to change this.)
68-
set +x
69-
find "$sysroot" -type l | while read symlink_path; do
70-
symlink_target=$(readlink "$symlink_path")
71-
case $symlink_target in
72-
(/*)
73-
echo "Fixing symlink ${symlink_path} -> ${sysroot}${symlink_target}" >&2
74-
ln -nfs "${sysroot}${symlink_target}" "${symlink_path}" ;;
75-
esac
76-
done
77-
set -x
78-
7965
# Clang can do cross-builds out of the box, if we give it the right
8066
# flags. (The local binutils seem to work, but they set the ELF
8167
# header "OS/ABI" (EI_OSABI) field to SysV rather than FreeBSD, so
8268
# there might be other problems.)
8369
#
8470
# The --target option is last because the cross-build of LLVM uses
85-
# --target without an OS version ("-freebsd" vs. "-freebsd10"). This
71+
# --target without an OS version ("-freebsd" vs. "-freebsd11"). This
8672
# makes Clang default to libstdc++ (which no longer exists), and also
8773
# controls other features, like GNU-style symbol table hashing and
8874
# anything predicated on the version number in the __FreeBSD__

0 commit comments

Comments
 (0)