[Git][ghc/ghc][master] 9 commits: ci: Enable strict ghc-toolchain setting for bindists
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Mon Jun 24 21:21:58 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
db033639 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00
ci: Enable strict ghc-toolchain setting for bindists
- - - - -
14308a8f by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00
ghc-toolchain: Improve parse failure error
Improves the error message for when `ghc-toolchain` fails to read a
valid `Target` value from a file (in doFormat mode).
- - - - -
6e7cfff1 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00
bindist: ghc-toolchain related options in configure
- - - - -
958d6931 by Matthew Pickering at 2024-06-24T17:21:15-04:00
ci: Fail when bindist configure fails when installing bindist
It is better to fail earlier if the configure step fails rather than
carrying on for a more obscure error message.
- - - - -
f48d157d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00
ghc-toolchain: Fix error logging indentation
- - - - -
f1397104 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00
bindist: Correct default.target substitution
The substitution on `default.target.in` must be done after
`PREP_TARGET_FILE` is called -- that macro is responsible for
setting the variables that will be effectively substituted in the target
file. Otherwise, the target file is invalid.
Fixes #24792 #24574
- - - - -
665e653e by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00
configure: Prefer tool name over tool path
It is non-obvious whether the toolchain configuration should use
full-paths to tools or simply their names. In addressing #24574, we've
decided to prefer executable names over paths, ultimately, because the
bindist configure script already does this, thus is the default in ghcs
out there.
Updates the in-tree configure script to prefer tool names
(`AC_CHECK_TOOL` rather than `AC_PATH_TOOL`) and `ghc-toolchain` to
ignore the full-path-result of `findExecutable`, which it previously
used over the program name.
This change doesn't undo the fix in bd92182cd56140ffb2f68ec01492e5aa6333a8fc
because `AC_CHECK_TOOL` still takes into account the target triples,
unlike `AC_CHECK_PROG/AC_PATH_PROG`.
- - - - -
463716c2 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00
dist: Don't forget to configure JavascriptCPP
We introduced a configuration step for the javascript preprocessor, but
only did so for the in-tree configure script.
This commit makes it so that we also configure the javascript
preprocessor in the configure shipped in the compiler bindist.
- - - - -
e99cd73d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00
distrib: LlvmTarget in distrib/configure
LlvmTarget was being set and substituted in the in-tree configure, but
not in the configure shipped in the bindist.
We want to set the LlvmTarget to the canonical LLVM name of the platform
that GHC is targetting.
Currently, that is going to be the boostrapped llvm target (hence the
code which sets LlvmTarget=bootstrap_llvm_target).
- - - - -
11 changed files:
- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- configure.ac
- distrib/configure.ac.in
- m4/find_merge_objects.m4
- utils/ghc-toolchain/exe/Main.hs
- utils/ghc-toolchain/src/GHC/Toolchain/CheckArm.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Monad.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Program.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Utils.hs
Changes:
=====================================
.gitlab/ci.sh
=====================================
@@ -556,7 +556,7 @@ function install_bindist() {
run ${CONFIGURE_WRAPPER:-} ./configure \
--prefix="$instdir" \
- "${args[@]+"${args[@]}"}"
+ "${args[@]+"${args[@]}"}" || fail "bindist configure failed"
make_install_destdir "$TOP"/destdir "$instdir"
# And check the `--info` of the installed compiler, sometimes useful in CI log.
"$instdir"/bin/ghc --info
=====================================
.gitlab/generate-ci/gen_ci.hs
=====================================
@@ -752,6 +752,7 @@ job arch opsys buildConfig = NamedJob { name = jobName, jobInfo = Job {..} }
, "BUILD_FLAVOUR" =: flavourString jobFlavour
, "BIGNUM_BACKEND" =: bignumString (bignumBackend buildConfig)
, "CONFIGURE_ARGS" =: configureArgsStr buildConfig
+ , "INSTALL_CONFIGURE_ARGS" =: "--enable-strict-ghc-toolchain-check"
, maybe mempty ("CONFIGURE_WRAPPER" =:) (configureWrapper buildConfig)
, maybe mempty ("CROSS_TARGET" =:) (crossTarget buildConfig)
, case crossEmulator buildConfig of
=====================================
.gitlab/jobs.yaml
=====================================
@@ -58,6 +58,7 @@
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "11.0",
"NIX_SYSTEM": "aarch64-darwin",
@@ -122,6 +123,7 @@
"BIN_DIST_NAME": "ghc-aarch64-linux-deb10-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb10-validate"
}
@@ -183,6 +185,7 @@
"BIN_DIST_NAME": "ghc-aarch64-linux-deb12-validate+llvm",
"BUILD_FLAVOUR": "validate+llvm",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb12-validate+llvm"
}
@@ -244,6 +247,7 @@
"BIN_DIST_NAME": "ghc-i386-linux-deb10-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "i386-linux-deb10-validate"
}
@@ -306,6 +310,7 @@
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "11.0",
"NIX_SYSTEM": "aarch64-darwin",
@@ -372,7 +377,7 @@
"BROKEN_TESTS": "encoding004 T10458",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
- "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
+ "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-alpine3_18-validate",
"XZ_OPT": "-9"
@@ -435,6 +440,7 @@
"BIN_DIST_NAME": "ghc-aarch64-linux-deb10-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb10-validate",
"XZ_OPT": "-9"
@@ -497,6 +503,7 @@
"BIN_DIST_NAME": "ghc-aarch64-linux-deb11-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb11-validate",
"XZ_OPT": "-9"
@@ -559,6 +566,7 @@
"BIN_DIST_NAME": "ghc-aarch64-linux-deb12-validate+llvm",
"BUILD_FLAVOUR": "validate+llvm",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb12-validate+llvm",
"XZ_OPT": "-9"
@@ -621,6 +629,7 @@
"BIN_DIST_NAME": "ghc-i386-linux-deb10-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "i386-linux-deb10-validate",
"XZ_OPT": "-9"
@@ -684,6 +693,7 @@
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "10.13",
"NIX_SYSTEM": "x86_64-darwin",
@@ -753,7 +763,7 @@
"BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458",
"BUILD_FLAVOUR": "validate+fully_static",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
- "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
+ "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-int_native-validate+fully_static",
"XZ_OPT": "-9"
@@ -817,7 +827,7 @@
"BROKEN_TESTS": "encoding004 T10458",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
- "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
+ "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-validate",
"XZ_OPT": "-9"
@@ -881,7 +891,7 @@
"BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458",
"BUILD_FLAVOUR": "validate+fully_static",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
- "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
+ "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-validate+fully_static",
"XZ_OPT": "-9"
@@ -945,7 +955,7 @@
"BROKEN_TESTS": "encoding004 T10458",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
- "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
+ "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_18-validate",
"XZ_OPT": "-9"
@@ -1202,6 +1212,7 @@
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=no-sphinx",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-centos7-validate",
"XZ_OPT": "-9"
@@ -1264,6 +1275,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-int_native-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-int_native-validate",
"XZ_OPT": "-9"
@@ -1326,6 +1338,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-no_tntc-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-tables-next-to-code --enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-no_tntc-validate",
"XZ_OPT": "-9"
@@ -1389,6 +1402,7 @@
"BUILD_FLAVOUR": "slow-validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"ENABLE_NUMA": "1",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-numa-slow-validate",
"XZ_OPT": "-9"
@@ -1451,6 +1465,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-unreg-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-unregisterised --enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-unreg-validate",
"XZ_OPT": "-9"
@@ -1513,6 +1528,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-validate",
"XZ_OPT": "-9"
@@ -1575,6 +1591,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-validate+debug_info",
"BUILD_FLAVOUR": "validate+debug_info",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-validate+debug_info",
"XZ_OPT": "-9"
@@ -1637,6 +1654,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-zstd-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-ipe-data-compression --enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-zstd-validate",
"XZ_OPT": "-9"
@@ -1701,6 +1719,7 @@
"CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
"CROSS_EMULATOR": "qemu-aarch64 -L /usr/aarch64-linux-gnu",
"CROSS_TARGET": "aarch64-linux-gnu",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate",
"XZ_OPT": "-9"
@@ -1766,6 +1785,7 @@
"CONFIGURE_WRAPPER": "emconfigure",
"CROSS_EMULATOR": "js-emulator",
"CROSS_TARGET": "javascript-unknown-ghcjs",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate",
"XZ_OPT": "-9"
@@ -1828,6 +1848,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb11-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb11-validate",
"XZ_OPT": "-9"
@@ -1890,6 +1911,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb11-validate+boot_nonmoving_gc",
"BUILD_FLAVOUR": "validate+boot_nonmoving_gc",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "--way=nonmoving --way=nonmoving_thr --way=nonmoving_thr_sanity",
"TEST_ENV": "x86_64-linux-deb11-validate+boot_nonmoving_gc",
"XZ_OPT": "-9"
@@ -1952,6 +1974,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb12-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb12-validate",
"XZ_OPT": "-9"
@@ -2014,6 +2037,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb12-validate+llvm",
"BUILD_FLAVOUR": "validate+llvm",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb12-validate+llvm",
"XZ_OPT": "-9"
@@ -2077,6 +2101,7 @@
"BUILD_FLAVOUR": "validate+thread_sanitizer_cmm",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=none",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb12-validate+thread_sanitizer_cmm",
"TSAN_OPTIONS": "suppressions=$CI_PROJECT_DIR/rts/.tsan-suppressions",
@@ -2140,6 +2165,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb9-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb9-validate",
"XZ_OPT": "-9"
@@ -2202,6 +2228,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
"BUILD_FLAVOUR": "release",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
@@ -2267,6 +2294,7 @@
"BUILD_FLAVOUR": "release",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--haddock-for-hackage",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
@@ -2331,6 +2359,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-validate+debug_info",
"BUILD_FLAVOUR": "validate+debug_info",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
@@ -2395,6 +2424,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-fedora38-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-fedora38-validate",
"XZ_OPT": "-9"
@@ -2457,6 +2487,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-rocky8-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-rocky8-validate",
"XZ_OPT": "-9"
@@ -2519,6 +2550,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-ubuntu18_04-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-ubuntu18_04-validate",
"XZ_OPT": "-9"
@@ -2581,6 +2613,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-ubuntu20_04-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-ubuntu20_04-validate",
"XZ_OPT": "-9"
@@ -2641,6 +2674,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"GHC_VERSION": "9.6.4",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"RUNTEST_ARGS": "",
@@ -2703,6 +2737,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"GHC_VERSION": "9.6.4",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"RUNTEST_ARGS": "",
@@ -2769,6 +2804,7 @@
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "11.0",
"NIX_SYSTEM": "aarch64-darwin",
@@ -2837,7 +2873,7 @@
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
- "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
+ "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-alpine3_18-release+no_split_sections",
"XZ_OPT": "-9"
@@ -2902,6 +2938,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb10-release+no_split_sections",
"XZ_OPT": "-9"
@@ -2966,6 +3003,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb11-release+no_split_sections",
"XZ_OPT": "-9"
@@ -3030,6 +3068,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "i386-linux-deb10-release+no_split_sections",
"XZ_OPT": "-9"
@@ -3094,6 +3133,7 @@
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "10.13",
"NIX_SYSTEM": "x86_64-darwin",
@@ -3165,7 +3205,7 @@
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
- "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
+ "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-int_native-release+fully_static",
"XZ_OPT": "-9"
@@ -3231,7 +3271,7 @@
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
- "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
+ "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-release+fully_static+no_split_sections",
"XZ_OPT": "-9"
@@ -3297,7 +3337,7 @@
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
- "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
+ "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-release+no_split_sections",
"XZ_OPT": "-9"
@@ -3363,7 +3403,7 @@
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
- "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
+ "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_18-release+no_split_sections",
"XZ_OPT": "-9"
@@ -3429,6 +3469,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-centos7-release+no_split_sections",
"XZ_OPT": "-9"
@@ -3493,6 +3534,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-release",
"XZ_OPT": "-9"
@@ -3557,6 +3599,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-release+debug_info",
"XZ_OPT": "-9"
@@ -3621,6 +3664,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb11-release",
"XZ_OPT": "-9"
@@ -3685,6 +3729,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb12-release",
"XZ_OPT": "-9"
@@ -3749,6 +3794,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb9-release+no_split_sections",
"XZ_OPT": "-9"
@@ -3813,6 +3859,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
@@ -3879,6 +3926,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
@@ -3945,6 +3993,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--haddock-for-hackage --hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
@@ -4011,6 +4060,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-fedora38-release",
"XZ_OPT": "-9"
@@ -4075,6 +4125,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-rocky8-release",
"XZ_OPT": "-9"
@@ -4139,6 +4190,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-ubuntu18_04-release",
"XZ_OPT": "-9"
@@ -4203,6 +4255,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-ubuntu20_04-release",
"XZ_OPT": "-9"
@@ -4264,6 +4317,7 @@
"GHC_VERSION": "9.6.4",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"RUNTEST_ARGS": "",
@@ -4327,6 +4381,7 @@
"GHC_VERSION": "9.6.4",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"RUNTEST_ARGS": "",
@@ -4392,6 +4447,7 @@
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "10.13",
"NIX_SYSTEM": "x86_64-darwin",
@@ -4460,7 +4516,7 @@
"BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458",
"BUILD_FLAVOUR": "validate+fully_static",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
- "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
+ "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-validate+fully_static"
}
@@ -4713,6 +4769,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-int_native-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-int_native-validate"
}
@@ -4775,6 +4832,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-no_tntc-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-tables-next-to-code --enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-no_tntc-validate"
}
@@ -4837,6 +4895,7 @@
"BUILD_FLAVOUR": "slow-validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"ENABLE_NUMA": "1",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-numa-slow-validate"
}
@@ -4898,6 +4957,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-unreg-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-unregisterised --enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-unreg-validate"
}
@@ -4959,6 +5019,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-validate+debug_info",
"BUILD_FLAVOUR": "validate+debug_info",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-validate+debug_info"
}
@@ -5020,6 +5081,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-zstd-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-ipe-data-compression --enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-zstd-validate"
}
@@ -5083,6 +5145,7 @@
"CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
"CROSS_EMULATOR": "qemu-aarch64 -L /usr/aarch64-linux-gnu",
"CROSS_TARGET": "aarch64-linux-gnu",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate"
}
@@ -5147,6 +5210,7 @@
"CONFIGURE_WRAPPER": "emconfigure",
"CROSS_EMULATOR": "js-emulator",
"CROSS_TARGET": "javascript-unknown-ghcjs",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate"
}
@@ -5208,6 +5272,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb11-validate+boot_nonmoving_gc",
"BUILD_FLAVOUR": "validate+boot_nonmoving_gc",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "--way=nonmoving --way=nonmoving_thr --way=nonmoving_thr_sanity",
"TEST_ENV": "x86_64-linux-deb11-validate+boot_nonmoving_gc"
}
@@ -5269,6 +5334,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb12-validate+llvm",
"BUILD_FLAVOUR": "validate+llvm",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb12-validate+llvm"
}
@@ -5332,6 +5398,7 @@
"BUILD_FLAVOUR": "validate+thread_sanitizer_cmm",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=none",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb12-validate+thread_sanitizer_cmm",
"TSAN_OPTIONS": "suppressions=$CI_PROJECT_DIR/rts/.tsan-suppressions"
@@ -5394,6 +5461,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
"BUILD_FLAVOUR": "release",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
@@ -5455,6 +5523,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"GHC_VERSION": "9.6.4",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
+ "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"RUNTEST_ARGS": "",
=====================================
configure.ac
=====================================
@@ -299,16 +299,16 @@ if test "$HostOS" = "mingw32" -a "$EnableDistroToolchain" = "NO"; then
FP_INSTALL_WINDOWS_TOOLCHAIN
FP_SETUP_WINDOWS_TOOLCHAIN([$hardtop/inplace/mingw], [$hardtop/inplace/mingw])
else
- AC_PATH_TOOL([CC],[gcc], [clang])
- AC_PATH_TOOL([CXX],[g++], [clang++])
- AC_PATH_TOOL([NM],[nm])
+ AC_CHECK_TOOL([CC],[gcc], [clang])
+ AC_CHECK_TOOL([CXX],[g++], [clang++])
+ AC_CHECK_TOOL([NM],[nm])
# N.B. we don't probe for LD here but instead
# do so in FIND_LD to avoid #21778.
- AC_PATH_TOOL([AR],[ar])
- AC_PATH_TOOL([RANLIB],[ranlib])
- AC_PATH_TOOL([OBJDUMP],[objdump])
- AC_PATH_TOOL([WindresCmd],[windres])
- AC_PATH_TOOL([Genlib],[genlib])
+ AC_CHECK_TOOL([AR],[ar])
+ AC_CHECK_TOOL([RANLIB],[ranlib])
+ AC_CHECK_TOOL([OBJDUMP],[objdump])
+ AC_CHECK_TOOL([WindresCmd],[windres])
+ AC_CHECK_TOOL([Genlib],[genlib])
if test "$HostOS" = "mingw32"; then
AC_CHECK_TARGET_TOOL([WindresCmd],[windres])
=====================================
distrib/configure.ac.in
=====================================
@@ -119,6 +119,22 @@ if test "$HostOS" = "darwin"; then
fi
fi
+AC_ARG_ENABLE(ghc-toolchain,
+[AS_HELP_STRING([--enable-ghc-toolchain],
+ [Whether to use the newer ghc-toolchain tool to configure ghc targets])],
+ [FP_CAPITALIZE_YES_NO(["$enableval"], [EnableGhcToolchain])],
+ [EnableGhcToolchain=NO]
+)
+AC_SUBST([EnableGhcToolchain])
+
+AC_ARG_ENABLE(strict-ghc-toolchain-check,
+[AS_HELP_STRING([--enable-strict-ghc-toolchain-check],
+ [Whether to raise an error if the output of ghc-toolchain differs from configure])],
+ [FP_CAPITALIZE_YES_NO(["$enableval"], [EnableStrictGhcToolchainCheck])],
+ [EnableStrictGhcToolchainCheck=NO]
+)
+AC_SUBST([EnableStrictGhcToolchainCheck])
+
dnl ** Which gcc to use?
dnl --------------------------------------------------------------
AC_PROG_CC([gcc clang])
@@ -135,6 +151,11 @@ FP_HSCPP_CMD_WITH_ARGS(HaskellCPPCmd, HaskellCPPArgs)
AC_SUBST([HaskellCPPCmd])
AC_SUBST([HaskellCPPArgs])
+# --with-js-cpp/--with-js-cpp-flags
+FP_JSCPP_CMD_WITH_ARGS(JavaScriptCPPCmd, JavaScriptCPPArgs)
+AC_SUBST([JavaScriptCPPCmd])
+AC_SUBST([JavaScriptCPPArgs])
+
# --with-cmm-cpp/--with-cmm-cpp-flags
FP_CMM_CPP_CMD_WITH_ARGS([$CC], [CmmCPPCmd], [CmmCPPArgs], [CmmCPPSupportsG0])
AC_SUBST([CmmCPPCmd])
@@ -272,6 +293,9 @@ AC_SUBST(TargetHasIdentDirective)
GHC_GNU_NONEXEC_STACK
AC_SUBST(TargetHasGnuNonexecStack)
+GHC_LLVM_TARGET_SET_VAR
+AC_SUBST(LlvmTarget)
+
dnl ** See whether cc supports --target=<triple> and set
dnl CONF_CC_OPTS_STAGE[12] accordingly.
FP_CC_SUPPORTS_TARGET([$CC], [CONF_CC_OPTS_STAGE1], [CONF_CXX_OPTS_STAGE1])
@@ -342,15 +366,8 @@ if test "x$UseLibdw" = "xYES" ; then
fi
AC_SUBST(UseLibdw)
-
FP_SETTINGS
-AC_CONFIG_FILES([config.mk])
-AC_CONFIG_FILES([default.host.target])
-AC_CONFIG_FILES([default.target])
-AC_CONFIG_FILES([mk/hsc2hs])
-AC_OUTPUT
-
# We get caught by
# http://savannah.gnu.org/bugs/index.php?1516
# $(eval ...) inside conditionals causes errors
@@ -375,6 +392,12 @@ FIND_GHC_TOOLCHAIN_BIN([YES])
PREP_TARGET_FILE
FIND_GHC_TOOLCHAIN([.])
+AC_CONFIG_FILES([config.mk])
+AC_CONFIG_FILES([default.host.target])
+AC_CONFIG_FILES([default.target])
+AC_CONFIG_FILES([mk/hsc2hs])
+AC_OUTPUT
+
VALIDATE_GHC_TOOLCHAIN([default.target],[default.target.ghc-toolchain])
rm -Rf acargs acghc-toolchain actmp-ghc-toolchain
=====================================
m4/find_merge_objects.m4
=====================================
@@ -26,7 +26,7 @@ AC_DEFUN([FIND_MERGE_OBJECTS],[
if test -z ${MergeObjsCmd+x}; then
AC_MSG_NOTICE([Setting cmd])
- MergeObjsCmd="$(command -v $LD)"
+ MergeObjsCmd="$LD"
fi
if test -z ${MergeObjsArgs+x}; then
MergeObjsArgs="-r"
@@ -45,7 +45,7 @@ AC_DEFUN([FIND_MERGE_OBJECTS],[
if test "$result" = "1"; then
AC_MSG_NOTICE([$MergeObjsCmd is broken due to binutils 22266, looking for another linker...])
MergeObjsCmd=""
- AC_PATH_TARGET_TOOL([MergeObjsCmd], [ld])
+ AC_CHECK_TARGET_TOOL([MergeObjsCmd], [ld])
CHECK_FOR_GOLD_T22266($MergeObjsCmd)
if test "$result" = "1"; then
AC_MSG_ERROR([Linker is affected by binutils 22266 but couldn't find another unaffected linker. Please set the MergeObjsCmd variable to a functional linker.])
=====================================
utils/ghc-toolchain/exe/Main.hs
=====================================
@@ -32,6 +32,7 @@ import GHC.Toolchain.Tools.Nm
import GHC.Toolchain.Tools.MergeObjs
import GHC.Toolchain.Tools.Readelf
import GHC.Toolchain.NormaliseTriple (normaliseTriple)
+import Text.Read (readMaybe)
data Opts = Opts
{ optTriple :: String
@@ -257,9 +258,12 @@ doFormat args = do
case errs of
[] -> do
let opts = foldr (.) id opts0 emptyFormatOpts
- tgt <- read @Target <$> System.IO.readFile (view _formatOptInput opts)
- let file = formatOptOutput opts
- System.IO.writeFile file (show tgt)
+ tgtFile <- System.IO.readFile (view _formatOptInput opts)
+ case readMaybe @Target tgtFile of
+ Nothing -> error $ "Failed to read a valid Target value from " ++ view _formatOptInput opts ++ ":\n" ++ tgtFile
+ Just tgt -> do
+ let file = formatOptOutput opts
+ System.IO.writeFile file (show tgt)
_ -> do
mapM_ putStrLn errs
putStrLn $ usageInfo "ghc-toolchain" formatOpts
=====================================
utils/ghc-toolchain/src/GHC/Toolchain/CheckArm.hs
=====================================
@@ -91,9 +91,8 @@ raspbianHack arch@(ArchARM ARMv6 _ abi) = do
raspbian <- isRaspbian
armv7 <- isARMv7Host
if raspbian && armv7
- then do logInfo $ unlines [ "Found compiler which claims to target ARMv6 running in Raspbian on ARMv7."
- , "Assuming we should actually target ARMv7 (see GHC #17856)"
- ]
+ then do logInfo "Found compiler which claims to target ARMv6 running in Raspbian on ARMv7."
+ logInfo "Assuming we should actually target ARMv7 (see GHC #17856)"
return $ ArchARM ARMv7 [VFPv2] abi
else return arch
where
=====================================
utils/ghc-toolchain/src/GHC/Toolchain/Monad.hs
=====================================
@@ -7,7 +7,7 @@ module GHC.Toolchain.Monad
, runM
, getEnv
, makeM
- , throwE
+ , throwE, throwEs
, ifCrossCompiling
-- * File I/O
@@ -64,10 +64,17 @@ data Error = Error { errorMessage :: String
deriving (Show)
throwE :: String -> M a
-throwE msg = do
+throwE msg = throwEs [msg]
+
+-- | Throw an error with multiple lines.
+-- This should be used rather than `throwE . unlines` to preserve proper
+-- logging indentation.
+throwEs :: [String] -> M a
+throwEs msgs = do
e <- getEnv
- logInfo msg
- let err = Error { errorMessage = msg
+ forM_ msgs $ \msg -> do
+ logInfo msg
+ let err = Error { errorMessage = unlines msgs
, errorLogContexts = logContexts e
}
M (Except.throwE [err])
=====================================
utils/ghc-toolchain/src/GHC/Toolchain/Program.hs
=====================================
@@ -75,10 +75,10 @@ callProgram prog args = do
code <- runProgram prog args
case code of
ExitSuccess -> return ()
- ExitFailure n -> throwE (err n)
+ ExitFailure n -> throwEs (err n)
where
cmdline = [prgPath prog] ++ prgFlags prog ++ args
- err n = unlines
+ err n =
[ "Command failed: " ++ unwords cmdline
, "Exited with code " ++ show n
]
@@ -104,7 +104,9 @@ logExecute prog args =
logDebug $ "Execute: " ++ intercalate " " ([prgPath prog] ++ prgFlags prog ++ args)
-- | Program specifier from the command-line.
-data ProgOpt = ProgOpt { poPath :: Maybe FilePath
+data ProgOpt = ProgOpt { poPath :: Maybe String
+ -- ^ Refers to the path to an executable, or simply the
+ -- executable name.
, poFlags :: Maybe [String]
}
@@ -135,11 +137,11 @@ findProgram :: String
-> M Program
findProgram description userSpec candidates
| Just path <- poPath userSpec = do
- let err = unlines
+ let err =
[ "Failed to find " ++ description ++ "."
, "Looked for user-specified program '" ++ path ++ "' in the system search path."
]
- toProgram <$> find_it path <|> throwE err
+ toProgram <$> find_it path <|> throwEs err
| otherwise = do
env <- getEnv
@@ -148,11 +150,11 @@ findProgram description userSpec candidates
Just prefix -> map (prefix++) candidates
Nothing -> []
candidates' = prefixedCandidates ++ candidates
- err = unlines
+ err =
[ "Failed to find " ++ description ++ "."
, "Looked for one of " ++ show candidates' ++ " in the system search path."
]
- toProgram <$> oneOf err (map find_it candidates') <|> throwE err
+ toProgram <$> oneOf' err (map find_it candidates') <|> throwEs err
where
toProgram path = Program { prgPath = path, prgFlags = fromMaybe [] (poFlags userSpec) }
@@ -160,7 +162,9 @@ findProgram description userSpec candidates
r <- liftIO $ findExecutable name
case r of
Nothing -> throwE $ name ++ " not found in search path"
- Just x -> return x
+ -- Use the given `prgPath` or candidate name rather than the
+ -- absolute path returned by `findExecutable`.
+ Just _x -> return name
-------------------- Compiling utilities --------------------
=====================================
utils/ghc-toolchain/src/GHC/Toolchain/Utils.hs
=====================================
@@ -6,6 +6,7 @@ module GHC.Toolchain.Utils
, expectFileExists
, withTempDir
, oneOf
+ , oneOf'
, isSuccess
) where
@@ -52,7 +53,12 @@ expectFileExists path err = do
unless exists $ throwE err
oneOf :: String -> [M b] -> M b
-oneOf err = foldr (<|>) (throwE err)
+oneOf err = oneOf' [err]
+
+-- | Like 'oneOf' but takes a multi-line error message if none of the checks
+-- succeed.
+oneOf' :: [String] -> [M b] -> M b
+oneOf' err = foldr (<|>) (throwEs err)
isSuccess :: ExitCode -> Bool
isSuccess = \case
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/749e089bafb1c8f7664bec5ec504835a1038f056...e99cd73d6a7fc254a257af8aa947c73938195fb3
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/749e089bafb1c8f7664bec5ec504835a1038f056...e99cd73d6a7fc254a257af8aa947c73938195fb3
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240624/8da4b148/attachment-0001.html>
More information about the ghc-commits
mailing list