ci: Switch to using gold as the linker.

Debian defaults to bfd, which is comically slow.  We can't use lld because
the old version we have in the debian stable we use has various bugs.

This required bumping libwayland, which had multiply-defined symbols
issues in the previous release.

Closes: #3236

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6324>
This commit is contained in:
Eric Anholt 2020-08-13 14:21:50 -07:00 committed by Marge Bot
parent 8c4fb19f09
commit d3b652f13d
5 changed files with 35 additions and 14 deletions

View file

@ -204,7 +204,7 @@ x86_build-base:
- .fdo.container-build@debian
- .container
variables:
FDO_DISTRIBUTION_TAG: &x86_build-base "2020-07-28-x86-2"
FDO_DISTRIBUTION_TAG: &x86_build-base "2020-08-13-gold"
.use-x86_build-base:
extends:
@ -222,7 +222,7 @@ x86_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &x86_build "2020-08-08-glvnd"
FDO_DISTRIBUTION_TAG: &x86_build "2020-08-13-gold"
.use-x86_build:
variables:
@ -236,7 +236,7 @@ i386_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &i386_build "2020-07-28-x86-2"
FDO_DISTRIBUTION_TAG: &i386_build "2020-08-13-gold"
.use-i386_build:
variables:
@ -250,7 +250,7 @@ ppc64el_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-07-28-x86-2"
FDO_DISTRIBUTION_TAG: &ppc64el_build "2020-08-13-gold"
.use-ppc64el_build:
variables:
@ -264,7 +264,7 @@ s390x_build:
extends:
- .use-x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &s390x_build "2020-07-28-x86-2"
FDO_DISTRIBUTION_TAG: &s390x_build "2020-08-13-gold"
.use-s390x_build:
variables:
@ -277,7 +277,7 @@ s390x_build:
x86_test-base:
extends: x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &x86_test-base "2020-07-28-x86-2"
FDO_DISTRIBUTION_TAG: &x86_test-base "2020-08-13-gold"
.use-x86_test-base:
extends:
@ -294,19 +294,19 @@ x86_test-base:
x86_test-gl:
extends: .use-x86_test-base
variables:
FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-08-14-xcb-shm"
FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-08-24-gold"
# Debian 10 based x86 test image for VK
x86_test-vk:
extends: .use-x86_test-base
variables:
FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-07-28-x86-2"
FDO_DISTRIBUTION_TAG: &x86_test-vk "2020-08-13-gold"
# Debian 9 based x86 build image (old LLVM)
x86_build_old:
extends: x86_build-base
variables:
FDO_DISTRIBUTION_TAG: &x86_build_old "2020-07-28-x86-2"
FDO_DISTRIBUTION_TAG: &x86_build_old "2020-08-13-gold"
FDO_DISTRIBUTION_VERSION: stretch-slim
.use-x86_build_old:
@ -322,7 +322,7 @@ arm_build:
- .fdo.container-build@debian@arm64v8
- .container
variables:
FDO_DISTRIBUTION_TAG: &arm_build "2020-08-04-nfs-2"
FDO_DISTRIBUTION_TAG: &arm_build "2020-08-13-gold"
.use-arm_build:
variables:
@ -337,7 +337,7 @@ arm_test-base:
- .fdo.container-build@debian
- .container
variables:
FDO_DISTRIBUTION_TAG: &arm_test-base "2020-07-28-libdrm"
FDO_DISTRIBUTION_TAG: &arm_test-base "2020-08-13-gold"
.use-arm_test-base:
extends:
@ -355,7 +355,7 @@ arm64_test:
extends:
- .use-arm_test-base
variables:
FDO_DISTRIBUTION_TAG: &arm64_test "2020-08-18"
FDO_DISTRIBUTION_TAG: &arm64_test "2020-08-24-gold"
.use-arm64_test:
variables:

View file

@ -23,7 +23,10 @@ APITRACE_VERSION="9.0"
git clone https://github.com/apitrace/apitrace.git --single-branch --no-checkout /apitrace
pushd /apitrace
git checkout "$APITRACE_VERSION"
cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on -DWaffle_DIR=/usr/local/lib/cmake/Waffle/ $EXTRA_CMAKE_ARGS
# Note: The cmake stuff for waffle in apitrace fails to use waffle's library
# directory. Just force the issue here.
env LDFLAGS="-L/usr/local/lib" \
cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False -DENABLE_WAFFLE=on -DWaffle_DIR=/usr/local/lib/cmake/Waffle/ $EXTRA_CMAKE_ARGS
ninja -C _build
mkdir build
cp _build/apitrace build

View file

@ -12,6 +12,13 @@ export PATH=/usr/lib/ccache:$PATH
export CC="/usr/lib/ccache/gcc"
export CXX="/usr/lib/ccache/g++"
# Force linkers to gold, since it's so much faster for building. We can't use
# lld because we're on old debian and it's buggy. ming fails meson builds
# with it with "meson.build:21:0: ERROR: Unable to determine dynamic linker"
find /usr/bin -name \*-ld -o -name ld | \
grep -v mingw | \
xargs -n 1 -I '{}' ln -sf '{}.gold' '{}'
ccache --show-stats
# Make a wrapper script for ninja to always include the -j flags

View file

@ -134,6 +134,17 @@ rm -rf /libdrm
mkdir -p kernel
wget -qO- ${KERNEL_URL} | tar -xz --strip-components=1 -C kernel
pushd kernel
# The kernel doesn't like the gold linker (or the old lld in our debians).
# Sneak in some override symlinks during kernel build until we can update
# debian (they'll get blown away by the rm of the kernel dir at the end).
mkdir -p ld-links
for i in /usr/bin/*-ld /usr/bin/ld; do
i=`basename $i`
ln -sf /usr/bin/$i.bfd ld-links/$i
done
export PATH=`pwd`/ld-links:$PATH
./scripts/kconfig/merge_config.sh ${DEFCONFIG} ../.gitlab-ci/${KERNEL_ARCH}.config
make ${KERNEL_IMAGE_NAME}
for image in ${KERNEL_IMAGE_NAME}; do

View file

@ -58,7 +58,7 @@ export WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
export XORGMACROS_VERSION=util-macros-1.19.0
export XCBPROTO_VERSION=xcb-proto-1.13
export LIBXCB_VERSION=libxcb-1.13
export LIBWAYLAND_VERSION=wayland-1.15.0
export LIBWAYLAND_VERSION=wayland-1.17.0
export WAYLAND_PROTOCOLS_VERSION=wayland-protocols-1.12
wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2