summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-06-16 19:46:49 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-06-20 07:12:32 -0400
commit689016dc1547386766cd0694c9b61a841471ffb9 (patch)
tree5731d0c506b8c7044d89650f34e92030e7524861
parenta6a8d3f57294f6319d778821e52d5dbef867b360 (diff)
downloadhaskell-689016dc1547386766cd0694c9b61a841471ffb9.tar.gz
Darwin CI: Don't explicitly pass ncurses/iconv paths
Passing --with-ncurses-libraries means the path which gets backed in progagate into the built binaries. This is incorrect when we want to distribute the binaries because the user might not have the library in that specific place. It's the user's reponsibility to direct the dynamic linker to the right place. Fixes #19968
-rw-r--r--.gitlab-ci.yml4
-rw-r--r--.gitlab/shell.nix9
2 files changed, 10 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ad1578915f..20a9bba692 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -534,7 +534,7 @@ validate-x86_64-darwin:
CPUS: 8
LANG: "en_US.UTF-8"
# WARNING: this is overridden in the shell.nix, see shell.nix!
- CONFIGURE_ARGS: "--with-intree-gmp --with-curses-libraries=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib --with-iconv-includes=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include --with-iconv-libraries=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
+ CONFIGURE_ARGS: "--with-intree-gmp"
HADRIAN_ARGS: "--docs=no-sphinx"
TEST_ENV: "x86_64-darwin-hadrian"
BIN_DIST_NAME: "ghc-amd64-apple-darwin"
@@ -634,7 +634,7 @@ validate-aarch64-darwin:
CPUS: 8
LANG: "en_US.UTF-8"
# WARNING: this is overridden in the shell.nix, see shell.nix!
- CONFIGURE_ARGS: "--with-intree-gmp --with-curses-libraries=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib --with-iconv-includes=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include --with-iconv-libraries=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
+ CONFIGURE_ARGS: "--with-intree-gmp"
HADRIAN_ARGS: "--docs=no-sphinx"
BIN_DIST_NAME: "ghc-arm64-apple-darwin"
TEST_ENV: "aarch64-darwin-hadrian"
diff --git a/.gitlab/shell.nix b/.gitlab/shell.nix
index 554226050b..dfaa9b5c5b 100644
--- a/.gitlab/shell.nix
+++ b/.gitlab/shell.nix
@@ -13,13 +13,14 @@
# we need to inject ncurses into --with-curses-libraries.
# the real fix is to teach terminfo to use libcurses on macOS.
# CONFIGURE_ARGS = "--with-intree-gmp --with-curses-libraries=${pkgs.ncurses.out}/lib";
- CONFIGURE_ARGS = "--with-intree-gmp --with-curses-libraries=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib --with-iconv-includes=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include --with-iconv-libraries=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib SH=/bin/bash";
+ CONFIGURE_ARGS = "--with-intree-gmp";
# magic speedup pony :facepalm:
#
# nix has the ugly habbit of duplicating ld flags more than necessary. This
# somewhat consolidates this.
shellHook = ''
+ echo $NIX_LDFLAGS
export NIX_LDFLAGS=$(for a in $NIX_LDFLAGS; do echo $a; done |sort|uniq|xargs)
export NIX_LDFLAGS_FOR_TARGET=$(for a in $NIX_LDFLAGS_FOR_TARGET; do echo $a; done |sort|uniq|xargs)
export NIX_LDFLAGS_FOR_TARGET=$(comm -3 <(for l in $NIX_LDFLAGS_FOR_TARGET; do echo $l; done) <(for l in $NIX_LDFLAGS; do echo $l; done))
@@ -43,6 +44,12 @@
# unconditionally add the MacOSX.sdk and TargetConditional.h
export NIX_CFLAGS_COMPILE+=" -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
+ export NIX_LDFLAGS="-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib $NIX_LDFLAGS"
+ echo $NIX_LDFLAGS
+
+ echo $MACOSX_DEPLOYMENT_TARGET
+ export MACOSX_DEPLOYMENT_TARGET=10.7
+ echo $MACOSX_DEPLOYMENT_TARGET
# Use an architecture specific home, so cabal for different architectures don't confuse each other.
export HOME="$HOME/$(uname -m)-home"