summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml7
-rwxr-xr-x.gitlab/ci.sh22
2 files changed, 28 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9ef89e756a..fd04734e44 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -989,9 +989,11 @@ release-x86_64-linux-ubuntu2004:
allow_failure: true
variables:
TEST_ENV: "x86_64-linux-alpine"
+ BUILD_FLAVOUR: "static"
BIN_DIST_NAME: "ghc-x86_64-alpine-linux"
# Can't use ld.gold due to #13958.
CONFIGURE_ARGS: "--disable-ld-override"
+ INSTALL_CONFIGURE_ARGS: "--disable-ld-override"
HADRIAN_ARGS: "--docs=no-sphinx"
# encoding004 due to lack of locale support
# T10458 due to fact that dynamic linker tries to reload libAS
@@ -1002,12 +1004,16 @@ release-x86_64-linux-ubuntu2004:
when: always
expire_in: 2 week
+validate-x86_64-linux-alpine-hadrian:
+ extends: .build-x86_64-linux-alpine-hadrian
+
release-x86_64-linux-alpine-integer-simple:
extends:
- .build-x86_64-linux-alpine-hadrian
- .release
variables:
BIGNUM_BACKEND: native
+ BUILD_FLAVOUR: "static"
release-x86_64-linux-alpine-integer-gmp:
extends:
@@ -1015,6 +1021,7 @@ release-x86_64-linux-alpine-integer-gmp:
- .release
variables:
BIGNUM_BACKEND: gmp
+ BUILD_FLAVOUR: "static"
nightly-x86_64-linux-alpine:
<<: *nightly
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index 74b25e7732..4ab1f3fc81 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -66,6 +66,10 @@ Environment variables affecting both build systems:
Whether to ignore perf failures (one of "increases",
"decreases", or "all")
HERMETIC Take measures to avoid looking at anything in \$HOME
+ CONFIGURE_ARGS Arguments passed to configure script.
+ INSTALL_CONFIGURE_ARGS
+ Arguments passed to the binary distribution configure script
+ during installation of test toolchain.
Environment variables determining build configuration of Make system:
@@ -467,6 +471,21 @@ function test_hadrian() {
return
fi
+ # Ensure that statically-linked builds are actually static
+ if [[ "${BUILD_FLAVOUR}" = *static* ]]; then
+ bad_execs=""
+ for binary in _build/stage1/bin/*; do
+ if ldd "${binary}" &> /dev/null; then
+ warn "${binary} is not static!"
+ ldd "${binary}"
+ echo
+ bad_execs="$bad_execs $binary"
+ fi
+ done
+ if [ -n "$bad_execs" ]; then
+ error "the following executables contain dynamic-object references: $bad_execs"
+ fi
+ fi
cd _build/bindist/ghc-*/
case "$(uname)" in
@@ -475,7 +494,8 @@ function test_hadrian() {
cp -a * "$TOP"/_build/install
;;
*)
- run ./configure --prefix="$TOP"/_build/install
+ read -r -a args <<< "${INSTALL_CONFIGURE_ARGS:-}"
+ run ./configure --prefix="$TOP"/_build/install "${args[@]}"
run "$MAKE" install
;;
esac