[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 28 commits: ci: Run full-ci on master and release branches

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Aug 16 10:35:27 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
173338cf by Matthew Pickering at 2023-08-15T22:00:24-04:00
ci: Run full-ci on master and release branches

Fixes #23737

- - - - -
bdab6898 by Bodigrim at 2023-08-15T22:01:03-04:00
Add @since pragmas for Data.Ord.clamp and GHC.Float.clamp

- - - - -
5422d30c by Matthew Pickering at 2023-08-16T06:34:58-04:00
ghc-toolchain: Match CPP args with configure script

At the moment we need ghc-toolchain to precisely match the output as
provided by the normal configure script. The normal configure script
(FP_HSCPP_CMD_WITH_ARGS) branches on whether we are using clang or gcc
so we match that logic exactly in ghc-toolchain.

The old implementation (which checks if certain flags are supported) is
better but for now we have to match to catch any potential errors in the
configuration.

Ticket: #23720

- - - - -
0831e093 by Matthew Pickering at 2023-08-16T06:34:58-04:00
configure: Fix `-Wl,--no-as-needed` check

The check was failing because the args supplied by $$1 were quoted which
failed because then the C compiler thought they were an input file.

Fixes #23720

- - - - -
c5898272 by Matthew Pickering at 2023-08-16T06:34:58-04:00
configure: Add flag which turns ghc-toolchain check into error

We want to catch these errors in CI, but first we need to a flag which
turns this check into an error.

- - - - -
765390a5 by Matthew Pickering at 2023-08-16T06:34:58-04:00
ci: Enable --enable-strict-ghc-toolchain-check for all CI jobs

This will cause any CI job to fail if we have a mismatch between what
ghc-toolchain reports and what ./configure natively reports. Fixing
these kinds of issues is highest priority for 9.10 release.

- - - - -
948212d5 by Rodrigo Mesquita at 2023-08-16T06:34:58-04:00
Pass user-specified options to ghc-toolchain

The current user interface to configuring target toolchains is `./configure`.

In !9263 we added a new tool to configure target toolchains called
`ghc-toolchain`, but the blessed way of creating these toolchains is
still through configure.

However, we were not passing the user-specified options given with the
`./configure` invocation to the ghc-toolchain tool.

This commit remedies that by storing the user options and environment
variables in USER_* variables, which then get passed to GHC-toolchain.

The exception to the rule is the windows bundled toolchain, which
overrides the USER_* variables with whatever flags the windows bundled
toolchain requires to work.
We consider the bundled toolchain to be effectively the user specifying
options, since the actual user delegated that configuration work.

Closes #23678

- - - - -
9fe3f5bf by Rodrigo Mesquita at 2023-08-16T06:34:58-04:00
ghc-toolchain: Parse javascript and ghcjs as a Arch and OS

- - - - -
f258a79f by Rodrigo Mesquita at 2023-08-16T06:34:58-04:00
ghc-toolchain: Fix ranlib option

- - - - -
b0461e62 by Rodrigo Mesquita at 2023-08-16T06:34:58-04:00
Check Link Works with -Werror

- - - - -
21d2bede by Matthew Pickering at 2023-08-16T06:34:58-04:00
Only check for no_compact_unwind support on darwin

While writing ghc-toolchain we noticed that the
FP_PROG_LD_NO_COMPACT_UNWIND check is subtly wrong. Specifically, we
pass -Wl,-no_compact_unwind to cc. However, ld.gold interprets this as
-n o_compact_unwind, which is a valid argument.

Fixes #23676

- - - - -
319f281c by Matthew Pickering at 2023-08-16T06:34:58-04:00
Add some javascript special cases to ghc-toolchain

On javascript there isn't a choice of toolchain but some of the
configure checks were not accurately providing the correct answer.

1. The linker was reported as gnu LD because the --version output
   mentioned gnu LD.
2. The --target flag makes no sense on javascript but it was just
   ignored by the linker, so we add a special case to stop ghc-toolchain
   thinking that emcc supports --target when used as a linker.

- - - - -
2ba69492 by Matthew Pickering at 2023-08-16T06:34:58-04:00
check for emcc in gnu_LD check

- - - - -
2a93db0e by Matthew Pickering at 2023-08-16T06:34:58-04:00
Add ldOverrideWhitelist to only default to ldOverride on windows/linux

On some platforms - ie darwin, javascript etc we really do not want to
allow the user to use any linker other than the default one as this
leads to all kinds of bugs. Therefore it is a bit more prudant to add a
whitelist which specifies on which platforms it might be possible to use
a different linker.

- - - - -
da5a1d5d by Matthew Pickering at 2023-08-16T06:34:58-04:00
Fix plaform glob in FPTOOLS_SET_C_LD_FLAGS

A normal triple may look like

x86_64-unknown-linux

but when cross-compiling you get $target set to a quad such as..

aarch64-unknown-linux-gnu

Which should also match this check.

- - - - -
2f0a08e0 by Matthew Pickering at 2023-08-16T06:34:58-04:00
ghc-toolchain: Pass ld-override onto ghc-toolchain

- - - - -
939bf885 by Matthew Pickering at 2023-08-16T06:34:58-04:00
ld override: Make whitelist override user given option

- - - - -
97f986c4 by Matthew Pickering at 2023-08-16T06:34:58-04:00
ghc-toolchain: Add format mode to normalise differences before diffing.

The "format" mode takes an "--input" and "--ouput" target file and
formats it.

This is intended to be useful on windows where the
configure/ghc-toolchain target files can't be diffed very easily because
the path separators are different.

- - - - -
57bdc321 by Matthew Pickering at 2023-08-16T06:34:58-04:00
ghc-toolchain: Bump ci-images commit to get new ghc-wasm-meta

We needed to remove -Wno-unused-command-line-argument from the arguments
passed in order for the configure check to report correctly.

See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10976#note_516335

- - - - -
e0d0fc7c by Matthew Pickering at 2023-08-16T06:34:58-04:00
configure: MergeObjsCmd - distinguish between empty string and unset variable

If `MergeObjsCmd` is explicitly set to the empty string then we should
assume that MergeObjs is just not supported.

This is especially important for windows where we set MergeObjsCmd to ""
in m4/fp_setup_windows_toolchain.m4.

- - - - -
dcc22129 by Matthew Pickering at 2023-08-16T06:34:58-04:00
configure: Add proper check to see if object merging works

- - - - -
7b2506ed by Matthew Pickering at 2023-08-16T06:34:58-04:00
ghc-toolchain: If MergeObjsCmd is not set, replace setting with Nothing

If the user explicitly chooses to not set a MergeObjsCmd then it is
correct to use Nothing for tgtMergeObjs field in the Target file.

- - - - -
504ed753 by Matthew Pickering at 2023-08-16T06:34:58-04:00
HsCppArgs: Augment the HsCppOptions

This is important when we pass -I when setting up the windows toolchain.

- - - - -
367e809c by Matthew Pickering at 2023-08-16T06:34:58-04:00
Set USER_CPP_ARGS when setting up windows toolchain

- - - - -
fe921a8e by Rodrigo Mesquita at 2023-08-16T06:34:58-04:00
Improve handling of Cc as a fallback

- - - - -
8b93db84 by Rodrigo Mesquita at 2023-08-16T06:34:58-04:00
ghc-toolchain: Configure Cpp and HsCpp correctly when user specifies flags

In ghc-toolchain, we were only /not/ configuring required flags when the
user specified any flags at all for the  of the HsCpp and Cpp tools.

Otherwise, the linker takes into consideration the user specified flags
to determine whether to search for a better linker implementation, but
already configured the remaining GHC and platform-specific flags
regardless of the user options.

Other Tools consider the user options as a baseline for further
configuration (see `findProgram`), so #23689 is not applicable.

Closes #23689

- - - - -
b23b4fcc by Matthew Pickering at 2023-08-16T06:34:58-04:00
CPP_ARGS: Put new options after user specified options

This matches up with the behaviour of ghc-toolchain, so that the output
of both matches.

- - - - -
0d9b6215 by Gergő Érdi at 2023-08-16T06:34:59-04:00
If a defaulting plugin made progress, re-zonk wanteds before built-in defaulting

Fixes #23821.

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/Tc/Solver.hs
- configure.ac
- distrib/configure.ac.in
- hadrian/cfg/default.target.in
- libraries/base/Data/Ord.hs
- libraries/base/GHC/Float.hs
- m4/find_merge_objects.m4
- m4/fp_cpp_cmd_with_args.m4
- m4/fp_hs_cpp_cmd_with_args.m4
- m4/fp_link_supports_no_as_needed.m4
- m4/fp_prog_ld_is_gnu.m4
- m4/fp_prog_ld_no_compact_unwind.m4
- m4/fp_setup_windows_toolchain.m4
- m4/fptools_set_c_ld_flags.m4
- m4/ghc_toolchain.m4
- m4/prep_target_file.m4
- testsuite/tests/plugins/Makefile
- + testsuite/tests/plugins/T23821.hs
- testsuite/tests/plugins/all.T
- + testsuite/tests/plugins/defaulting-plugin/DefaultInterference.hs
- testsuite/tests/plugins/defaulting-plugin/defaulting-plugin.cabal
- utils/ghc-toolchain/exe/Main.hs
- utils/ghc-toolchain/src/GHC/Toolchain/ParseTriple.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Program.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Tools/Cc.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Tools/Cpp.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -2,7 +2,7 @@ variables:
   GIT_SSL_NO_VERIFY: "1"
 
   # Commit of ghc/ci-images repository from which to pull Docker images
-  DOCKER_REV: a9c0f5efbe503c17f63070583b2d815e498acc68
+  DOCKER_REV: 17f816b010d4e585d3a935530ea3d1fc743eac0d
 
   # Sequential version number of all cached things.
   # Bump to invalidate GitLab CI cache.
@@ -123,6 +123,12 @@ workflow:
   rules:
     - if: '$RELEASE_JOB == "yes"'
 
+.full-ci: &full-ci
+  - if: '$CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/'
+  - if: '$CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/'
+  - if: '$CI_COMMIT_BRANCH == "master"'
+  - if: '$CI_COMMIT_BRANCH =~ /ghc-[0-9]+\.[0-9]+/'
+
 ############################################################
 # Runner Tags
 ############################################################
@@ -433,8 +439,7 @@ hadrian-multi:
     paths:
       - cabal-cache
   rules:
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/'
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/'
+    - *full-ci
 
 ############################################################
 # stack-hadrian-build
@@ -605,8 +610,7 @@ source-tarball:
     - if: $NIGHTLY
     - if: '$RELEASE_JOB == "yes"'
     - if: '$CI_MERGE_REQUEST_LABELS =~ /.*test-bootstrap.*/'
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/'
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/'
+    - *full-ci
 
 generate-hadrian-bootstrap-sources:
   stage: full-build
@@ -625,8 +629,7 @@ generate-hadrian-bootstrap-sources:
     - if: $NIGHTLY
     - if: '$RELEASE_JOB == "yes"'
     - if: '$CI_MERGE_REQUEST_LABELS =~ /.*test-bootstrap.*/'
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/'
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/'
+    - *full-ci
 
 
 package-hadrian-bootstrap-sources:
@@ -644,8 +647,7 @@ package-hadrian-bootstrap-sources:
     - if: $NIGHTLY
     - if: '$RELEASE_JOB == "yes"'
     - if: '$CI_MERGE_REQUEST_LABELS =~ /.*test-bootstrap.*/'
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/'
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/'
+    - *full-ci
 
 test-bootstrap:
   stage: full-build
@@ -682,8 +684,7 @@ test-bootstrap:
   rules:
     - if: $NIGHTLY
     - if: '$CI_MERGE_REQUEST_LABELS =~ /.*test-bootstrap.*/'
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/'
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/'
+    - *full-ci
     - if: '$RELEASE_JOB == "yes"'
       when: always
       variables:
@@ -837,11 +838,7 @@ perf-nofib:
   image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV"
   rules:
     - when: never
-    - if: $CI_MERGE_REQUEST_ID
-    - if: '$CI_COMMIT_BRANCH == "master"'
-    - if: '$CI_COMMIT_BRANCH =~ /ghc-[0.9]+\.[0-9]+/'
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/'
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/'
+    - *full-ci
   tags:
     - x86_64-linux
   before_script:
@@ -883,10 +880,6 @@ perf:
       optional: true
   dependencies: null
   image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora33:$DOCKER_REV"
-  rules:
-    - if: $CI_MERGE_REQUEST_ID
-    - if: '$CI_COMMIT_BRANCH == "master"'
-    - if: '$CI_COMMIT_BRANCH =~ /ghc-[0.9]+\.[0-9]+/'
   tags:
     - x86_64-linux-perf
   script:
@@ -908,8 +901,7 @@ perf:
     paths:
       - out
   rules:
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/'
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/'
+    - *full-ci
 
 ############################################################
 # ABI testing
@@ -949,8 +941,7 @@ abi-test:
     paths:
       - out
   rules:
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/'
-    - if: '$CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/'
+    - *full-ci
 
 
 ############################################################


=====================================
.gitlab/generate-ci/gen_ci.hs
=====================================
@@ -157,6 +157,7 @@ configureArgsStr bc = unwords $
   ++ ["--with-intree-gmp" | Just _ <- pure (crossTarget bc) ]
   ++ ["--with-system-libffi" | crossTarget bc == Just "wasm32-wasi" ]
   ++ ["--enable-ipe-data-compression" | withZstd bc ]
+  ++ ["--enable-strict-ghc-toolchain-check"]
 
 -- Compute the hadrian flavour from the BuildConfig
 mkJobFlavour :: BuildConfig -> Flavour
@@ -620,8 +621,20 @@ ruleString Off Nightly = "$NIGHTLY == null"
 labelString :: String -> String
 labelString s =  "$CI_MERGE_REQUEST_LABELS =~ /.*" ++ s ++ ".*/"
 
+branchStringExact :: String -> String
+branchStringExact s = "$CI_COMMIT_BRANCH == \"" ++ s ++ "\""
+
+branchStringLike :: String -> String
+branchStringLike s = "$CI_COMMIT_BRANCH =~ /" ++ s ++ "/"
+
+
 validateRuleString :: ValidateRule -> String
-validateRuleString FullCI = or_all ([labelString "full-ci", labelString "marge_bot_batch_merge_job"])
+validateRuleString FullCI = or_all ([ labelString "full-ci"
+                                    , labelString "marge_bot_batch_merge_job"
+                                    , branchStringExact "master"
+                                    , branchStringLike "ghc-[0-9]+\\.[0-9]+"
+                                    ])
+
 validateRuleString LLVMBackend = labelString "LLVM backend"
 validateRuleString FreeBSDLabel = labelString "FreeBSD"
 validateRuleString NonmovingGc = labelString "non-moving GC"


=====================================
.gitlab/jobs.yaml
=====================================
@@ -56,7 +56,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-aarch64-darwin-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ",
+      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "LANG": "en_US.UTF-8",
       "MACOSX_DEPLOYMENT_TARGET": "11.0",
@@ -121,7 +121,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-aarch64-linux-deb10-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "aarch64-linux-deb10-validate"
     }
@@ -163,7 +163,7 @@
     ],
     "rules": [
       {
-        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
         "when": "on_success"
       }
     ],
@@ -182,7 +182,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-i386-linux-deb10-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "i386-linux-deb10-validate"
     }
@@ -243,7 +243,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-aarch64-darwin-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ",
+      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "LANG": "en_US.UTF-8",
       "MACOSX_DEPLOYMENT_TARGET": "11.0",
@@ -309,7 +309,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-aarch64-linux-deb10-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "aarch64-linux-deb10-validate",
       "XZ_OPT": "-9"
@@ -371,7 +371,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-aarch64-linux-deb10-validate+llvm",
       "BUILD_FLAVOUR": "validate+llvm",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "aarch64-linux-deb10-validate+llvm",
       "XZ_OPT": "-9"
@@ -433,7 +433,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-i386-linux-deb10-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "i386-linux-deb10-validate",
       "XZ_OPT": "-9"
@@ -495,7 +495,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-darwin-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ",
+      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "LANG": "en_US.UTF-8",
       "MACOSX_DEPLOYMENT_TARGET": "10.10",
@@ -564,7 +564,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-freebsd13-validate",
       "BUILD_FLAVOUR": "validate",
       "CABAL_INSTALL_VERSION": "3.8.1.0",
-      "CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib ",
+      "CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check",
       "GHC_VERSION": "9.4.3",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "RUNTEST_ARGS": "",
@@ -629,7 +629,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-int_native-validate+fully_static",
       "BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458",
       "BUILD_FLAVOUR": "validate+fully_static",
-      "CONFIGURE_ARGS": "--disable-ld-override ",
+      "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
       "RUNTEST_ARGS": "",
@@ -694,7 +694,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-validate",
       "BROKEN_TESTS": "encoding004 T10458",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--disable-ld-override ",
+      "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
       "RUNTEST_ARGS": "",
@@ -759,7 +759,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-validate+fully_static",
       "BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458",
       "BUILD_FLAVOUR": "validate+fully_static",
-      "CONFIGURE_ARGS": "--disable-ld-override ",
+      "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
       "RUNTEST_ARGS": "",
@@ -823,7 +823,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_17-wasm-cross_wasm32-wasi-release+fully_static",
       "BUILD_FLAVOUR": "release+fully_static",
-      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi",
+      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
       "CROSS_TARGET": "wasm32-wasi",
       "HADRIAN_ARGS": "--docs=none",
       "RUNTEST_ARGS": "",
@@ -887,7 +887,7 @@
       "BIGNUM_BACKEND": "native",
       "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_17-wasm-int_native-cross_wasm32-wasi-release+fully_static",
       "BUILD_FLAVOUR": "release+fully_static",
-      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi",
+      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
       "CROSS_TARGET": "wasm32-wasi",
       "HADRIAN_ARGS": "--docs=none",
       "RUNTEST_ARGS": "",
@@ -951,7 +951,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_17-wasm-unreg-cross_wasm32-wasi-release+fully_static",
       "BUILD_FLAVOUR": "release+fully_static",
-      "CONFIGURE_ARGS": "--enable-unregisterised --with-intree-gmp --with-system-libffi",
+      "CONFIGURE_ARGS": "--enable-unregisterised --with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
       "CROSS_TARGET": "wasm32-wasi",
       "HADRIAN_ARGS": "--docs=none",
       "RUNTEST_ARGS": "",
@@ -1015,7 +1015,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-centos7-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-centos7-validate",
@@ -1078,7 +1078,7 @@
       "BIGNUM_BACKEND": "native",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-int_native-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-int_native-validate",
       "XZ_OPT": "-9"
@@ -1140,7 +1140,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-no_tntc-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--disable-tables-next-to-code",
+      "CONFIGURE_ARGS": "--disable-tables-next-to-code --enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-no_tntc-validate",
       "XZ_OPT": "-9"
@@ -1202,7 +1202,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-numa-slow-validate",
       "BUILD_FLAVOUR": "slow-validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "ENABLE_NUMA": "1",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-numa-slow-validate",
@@ -1265,7 +1265,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-unreg-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--enable-unregisterised",
+      "CONFIGURE_ARGS": "--enable-unregisterised --enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-unreg-validate",
       "XZ_OPT": "-9"
@@ -1327,7 +1327,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-validate",
       "XZ_OPT": "-9"
@@ -1389,7 +1389,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-validate+debug_info",
       "BUILD_FLAVOUR": "validate+debug_info",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-validate+debug_info",
       "XZ_OPT": "-9"
@@ -1451,7 +1451,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-validate+llvm",
       "BUILD_FLAVOUR": "validate+llvm",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-validate+llvm",
       "XZ_OPT": "-9"
@@ -1513,7 +1513,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-validate+thread_sanitizer",
       "BUILD_FLAVOUR": "validate+thread_sanitizer",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--docs=none",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-validate+thread_sanitizer",
@@ -1577,7 +1577,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-zstd-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--enable-ipe-data-compression",
+      "CONFIGURE_ARGS": "--enable-ipe-data-compression --enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-zstd-validate",
       "XZ_OPT": "-9"
@@ -1639,7 +1639,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-cross_aarch64-linux-gnu-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--with-intree-gmp",
+      "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
       "CROSS_EMULATOR": "qemu-aarch64 -L /usr/aarch64-linux-gnu",
       "CROSS_TARGET": "aarch64-linux-gnu",
       "RUNTEST_ARGS": "",
@@ -1703,7 +1703,7 @@
       "BIGNUM_BACKEND": "native",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--with-intree-gmp",
+      "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
       "CONFIGURE_WRAPPER": "emconfigure",
       "CROSS_EMULATOR": "js-emulator",
       "CROSS_TARGET": "javascript-unknown-ghcjs",
@@ -1768,7 +1768,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb11-validate",
       "XZ_OPT": "-9"
@@ -1830,7 +1830,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-validate+boot_nonmoving_gc",
       "BUILD_FLAVOUR": "validate+boot_nonmoving_gc",
-      "CONFIGURE_ARGS": "",
+      "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"
@@ -1892,7 +1892,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb9-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb9-validate",
       "XZ_OPT": "-9"
@@ -1954,7 +1954,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
       "BUILD_FLAVOUR": "release",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "LLC": "/bin/false",
       "OPT": "/bin/false",
       "RUNTEST_ARGS": "",
@@ -2018,7 +2018,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
       "BUILD_FLAVOUR": "release",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--haddock-base-url",
       "LLC": "/bin/false",
       "OPT": "/bin/false",
@@ -2083,7 +2083,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-validate+debug_info",
       "BUILD_FLAVOUR": "validate+debug_info",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "LLC": "/bin/false",
       "OPT": "/bin/false",
       "RUNTEST_ARGS": "",
@@ -2147,7 +2147,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-rocky8-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-rocky8-validate",
@@ -2210,7 +2210,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-ubuntu18_04-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-ubuntu18_04-validate",
       "XZ_OPT": "-9"
@@ -2272,7 +2272,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-ubuntu20_04-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-ubuntu20_04-validate",
       "XZ_OPT": "-9"
@@ -2330,7 +2330,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-windows-int_native-validate",
       "BUILD_FLAVOUR": "validate",
       "CABAL_INSTALL_VERSION": "3.8.1.0",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "GHC_VERSION": "9.4.3",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "LANG": "en_US.UTF-8",
@@ -2392,7 +2392,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-windows-validate",
       "BUILD_FLAVOUR": "validate",
       "CABAL_INSTALL_VERSION": "3.8.1.0",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "GHC_VERSION": "9.4.3",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "LANG": "en_US.UTF-8",
@@ -2458,7 +2458,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-aarch64-darwin-release",
       "BUILD_FLAVOUR": "release",
-      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ",
+      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
       "IGNORE_PERF_FAILURES": "all",
       "LANG": "en_US.UTF-8",
@@ -2525,7 +2525,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-aarch64-linux-deb10-release+no_split_sections",
       "BUILD_FLAVOUR": "release+no_split_sections",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids",
       "IGNORE_PERF_FAILURES": "all",
       "RUNTEST_ARGS": "",
@@ -2589,7 +2589,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-i386-linux-deb10-release+no_split_sections",
       "BUILD_FLAVOUR": "release+no_split_sections",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids",
       "IGNORE_PERF_FAILURES": "all",
       "RUNTEST_ARGS": "",
@@ -2653,7 +2653,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-darwin-release",
       "BUILD_FLAVOUR": "release",
-      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ",
+      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
       "IGNORE_PERF_FAILURES": "all",
       "LANG": "en_US.UTF-8",
@@ -2724,7 +2724,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-int_native-release+fully_static",
       "BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458",
       "BUILD_FLAVOUR": "release+fully_static",
-      "CONFIGURE_ARGS": "--disable-ld-override ",
+      "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
       "IGNORE_PERF_FAILURES": "all",
       "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
@@ -2790,7 +2790,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-release+fully_static+no_split_sections",
       "BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458",
       "BUILD_FLAVOUR": "release+fully_static+no_split_sections",
-      "CONFIGURE_ARGS": "--disable-ld-override ",
+      "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
       "IGNORE_PERF_FAILURES": "all",
       "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
@@ -2856,7 +2856,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-release+no_split_sections",
       "BROKEN_TESTS": "encoding004 T10458",
       "BUILD_FLAVOUR": "release+no_split_sections",
-      "CONFIGURE_ARGS": "--disable-ld-override ",
+      "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
       "IGNORE_PERF_FAILURES": "all",
       "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
@@ -2921,7 +2921,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-centos7-release+no_split_sections",
       "BUILD_FLAVOUR": "release+no_split_sections",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
       "IGNORE_PERF_FAILURES": "all",
       "RUNTEST_ARGS": "",
@@ -2985,7 +2985,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-release",
       "BUILD_FLAVOUR": "release",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids",
       "IGNORE_PERF_FAILURES": "all",
       "RUNTEST_ARGS": "",
@@ -3049,7 +3049,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-release+debug_info",
       "BUILD_FLAVOUR": "release+debug_info",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids",
       "IGNORE_PERF_FAILURES": "all",
       "RUNTEST_ARGS": "",
@@ -3113,7 +3113,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-release",
       "BUILD_FLAVOUR": "release",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids",
       "IGNORE_PERF_FAILURES": "all",
       "RUNTEST_ARGS": "",
@@ -3177,7 +3177,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-release+boot_nonmoving_gc",
       "BUILD_FLAVOUR": "release+boot_nonmoving_gc",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids",
       "IGNORE_PERF_FAILURES": "all",
       "RUNTEST_ARGS": "--way=nonmoving --way=nonmoving_thr --way=nonmoving_thr_sanity",
@@ -3241,7 +3241,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb9-release+no_split_sections",
       "BUILD_FLAVOUR": "release+no_split_sections",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids",
       "IGNORE_PERF_FAILURES": "all",
       "RUNTEST_ARGS": "",
@@ -3305,7 +3305,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
       "BUILD_FLAVOUR": "release",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids",
       "IGNORE_PERF_FAILURES": "all",
       "LLC": "/bin/false",
@@ -3371,7 +3371,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release+debug_info",
       "BUILD_FLAVOUR": "release+debug_info",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids",
       "IGNORE_PERF_FAILURES": "all",
       "LLC": "/bin/false",
@@ -3437,7 +3437,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
       "BUILD_FLAVOUR": "release",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--haddock-base-url --hash-unit-ids",
       "IGNORE_PERF_FAILURES": "all",
       "LLC": "/bin/false",
@@ -3503,7 +3503,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-rocky8-release",
       "BUILD_FLAVOUR": "release",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
       "IGNORE_PERF_FAILURES": "all",
       "RUNTEST_ARGS": "",
@@ -3567,7 +3567,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-ubuntu18_04-release",
       "BUILD_FLAVOUR": "release",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids",
       "IGNORE_PERF_FAILURES": "all",
       "RUNTEST_ARGS": "",
@@ -3631,7 +3631,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-ubuntu20_04-release",
       "BUILD_FLAVOUR": "release",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--hash-unit-ids",
       "IGNORE_PERF_FAILURES": "all",
       "RUNTEST_ARGS": "",
@@ -3691,7 +3691,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-windows-int_native-release",
       "BUILD_FLAVOUR": "release",
       "CABAL_INSTALL_VERSION": "3.8.1.0",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "GHC_VERSION": "9.4.3",
       "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
       "IGNORE_PERF_FAILURES": "all",
@@ -3754,7 +3754,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-windows-release",
       "BUILD_FLAVOUR": "release",
       "CABAL_INSTALL_VERSION": "3.8.1.0",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "GHC_VERSION": "9.4.3",
       "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
       "IGNORE_PERF_FAILURES": "all",
@@ -3802,7 +3802,7 @@
     ],
     "rules": [
       {
-        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
         "when": "on_success"
       }
     ],
@@ -3821,7 +3821,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-darwin-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ",
+      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "LANG": "en_US.UTF-8",
       "MACOSX_DEPLOYMENT_TARGET": "10.10",
@@ -3889,7 +3889,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-freebsd13-validate",
       "BUILD_FLAVOUR": "validate",
       "CABAL_INSTALL_VERSION": "3.8.1.0",
-      "CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib ",
+      "CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check",
       "GHC_VERSION": "9.4.3",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "RUNTEST_ARGS": "",
@@ -3933,7 +3933,7 @@
     ],
     "rules": [
       {
-        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
         "when": "on_success"
       }
     ],
@@ -3953,7 +3953,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-validate+fully_static",
       "BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458",
       "BUILD_FLAVOUR": "validate+fully_static",
-      "CONFIGURE_ARGS": "--disable-ld-override ",
+      "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
       "RUNTEST_ARGS": "",
@@ -3997,7 +3997,7 @@
     ],
     "rules": [
       {
-        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
         "when": "on_success"
       }
     ],
@@ -4016,7 +4016,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_17-wasm-cross_wasm32-wasi-release+fully_static",
       "BUILD_FLAVOUR": "release+fully_static",
-      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi",
+      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
       "CROSS_TARGET": "wasm32-wasi",
       "HADRIAN_ARGS": "--docs=none",
       "RUNTEST_ARGS": "",
@@ -4061,7 +4061,7 @@
     "rules": [
       {
         "allow_failure": true,
-        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
         "when": "manual"
       }
     ],
@@ -4080,7 +4080,7 @@
       "BIGNUM_BACKEND": "native",
       "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_17-wasm-int_native-cross_wasm32-wasi-release+fully_static",
       "BUILD_FLAVOUR": "release+fully_static",
-      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi",
+      "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
       "CROSS_TARGET": "wasm32-wasi",
       "HADRIAN_ARGS": "--docs=none",
       "RUNTEST_ARGS": "",
@@ -4125,7 +4125,7 @@
     "rules": [
       {
         "allow_failure": true,
-        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
         "when": "manual"
       }
     ],
@@ -4144,7 +4144,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_17-wasm-unreg-cross_wasm32-wasi-release+fully_static",
       "BUILD_FLAVOUR": "release+fully_static",
-      "CONFIGURE_ARGS": "--enable-unregisterised --with-intree-gmp --with-system-libffi",
+      "CONFIGURE_ARGS": "--enable-unregisterised --with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
       "CROSS_TARGET": "wasm32-wasi",
       "HADRIAN_ARGS": "--docs=none",
       "RUNTEST_ARGS": "",
@@ -4188,7 +4188,7 @@
     ],
     "rules": [
       {
-        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
         "when": "on_success"
       }
     ],
@@ -4207,7 +4207,7 @@
       "BIGNUM_BACKEND": "native",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-int_native-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-int_native-validate"
     }
@@ -4250,7 +4250,7 @@
     "rules": [
       {
         "allow_failure": true,
-        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
         "when": "manual"
       }
     ],
@@ -4269,7 +4269,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-no_tntc-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--disable-tables-next-to-code",
+      "CONFIGURE_ARGS": "--disable-tables-next-to-code --enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-no_tntc-validate"
     }
@@ -4330,7 +4330,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-numa-slow-validate",
       "BUILD_FLAVOUR": "slow-validate",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "ENABLE_NUMA": "1",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-numa-slow-validate"
@@ -4373,7 +4373,7 @@
     ],
     "rules": [
       {
-        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
         "when": "on_success"
       }
     ],
@@ -4392,7 +4392,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-unreg-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--enable-unregisterised",
+      "CONFIGURE_ARGS": "--enable-unregisterised --enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-unreg-validate"
     }
@@ -4434,7 +4434,7 @@
     ],
     "rules": [
       {
-        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
         "when": "on_success"
       }
     ],
@@ -4453,7 +4453,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-validate+debug_info",
       "BUILD_FLAVOUR": "validate+debug_info",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-validate+debug_info"
     }
@@ -4514,7 +4514,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-validate+llvm",
       "BUILD_FLAVOUR": "validate+llvm",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-validate+llvm"
     }
@@ -4557,7 +4557,7 @@
     "rules": [
       {
         "allow_failure": true,
-        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
         "when": "manual"
       }
     ],
@@ -4576,7 +4576,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-validate+thread_sanitizer",
       "BUILD_FLAVOUR": "validate+thread_sanitizer",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "HADRIAN_ARGS": "--docs=none",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-validate+thread_sanitizer",
@@ -4639,7 +4639,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb10-zstd-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--enable-ipe-data-compression",
+      "CONFIGURE_ARGS": "--enable-ipe-data-compression --enable-strict-ghc-toolchain-check",
       "RUNTEST_ARGS": "",
       "TEST_ENV": "x86_64-linux-deb10-zstd-validate"
     }
@@ -4681,7 +4681,7 @@
     ],
     "rules": [
       {
-        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
         "when": "on_success"
       }
     ],
@@ -4700,7 +4700,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-cross_aarch64-linux-gnu-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--with-intree-gmp",
+      "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
       "CROSS_EMULATOR": "qemu-aarch64 -L /usr/aarch64-linux-gnu",
       "CROSS_TARGET": "aarch64-linux-gnu",
       "RUNTEST_ARGS": "",
@@ -4744,7 +4744,7 @@
     ],
     "rules": [
       {
-        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "if": "((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
         "when": "on_success"
       }
     ],
@@ -4763,7 +4763,7 @@
       "BIGNUM_BACKEND": "native",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-validate",
       "BUILD_FLAVOUR": "validate",
-      "CONFIGURE_ARGS": "--with-intree-gmp",
+      "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
       "CONFIGURE_WRAPPER": "emconfigure",
       "CROSS_EMULATOR": "js-emulator",
       "CROSS_TARGET": "javascript-unknown-ghcjs",
@@ -4827,7 +4827,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-validate+boot_nonmoving_gc",
       "BUILD_FLAVOUR": "validate+boot_nonmoving_gc",
-      "CONFIGURE_ARGS": "",
+      "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"
     }
@@ -4888,7 +4888,7 @@
       "BIGNUM_BACKEND": "gmp",
       "BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
       "BUILD_FLAVOUR": "release",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "LLC": "/bin/false",
       "OPT": "/bin/false",
       "RUNTEST_ARGS": "",
@@ -4947,7 +4947,7 @@
       "BIN_DIST_NAME": "ghc-x86_64-windows-validate",
       "BUILD_FLAVOUR": "validate",
       "CABAL_INSTALL_VERSION": "3.8.1.0",
-      "CONFIGURE_ARGS": "",
+      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
       "GHC_VERSION": "9.4.3",
       "HADRIAN_ARGS": "--docs=no-sphinx",
       "LANG": "en_US.UTF-8",


=====================================
compiler/GHC/Tc/Solver.hs
=====================================
@@ -3598,6 +3598,12 @@ applyDefaultingRules wanteds
              ; return defaultedGroups
              }
 
+       -- If a defaulting plugin solves a tyvar, some of the wanteds
+       -- will have filled-in metavars by now (see #23281). So we
+       -- re-zonk to make sure the built-in defaulting rules don't try
+       -- to solve the same metavars.
+       ; wanteds <- if or plugin_defaulted then TcS.zonkWC wanteds else pure wanteds
+
        ; let groups = findDefaultableGroups info wanteds
 
        ; traceTcS "applyDefaultingRules {" $


=====================================
configure.ac
=====================================
@@ -42,6 +42,19 @@ dnl works as expected, since we're slightly modifying how Autoconf
 dnl interprets build/host/target and how this interacts with $CC tests
 test -n "$target_alias" && ac_tool_prefix=$target_alias-
 
+dnl ----------------------------------------------------------
+dnl ** Store USER specified environment variables to pass them on to
+dnl ** ghc-toolchain (in m4/ghc-toolchain.m4)
+USER_CFLAGS="$CFLAGS"
+USER_LDFLAGS="$LDFLAGS"
+USER_LIBS="$LIBS"
+USER_CXXFLAGS="$CXXFLAGS"
+dnl The lower-level/not user-facing environment variables that may still be set
+dnl by developers such as in ghc-wasm-meta
+USER_CONF_CC_OPTS_STAGE2="$CONF_CC_OPTS_STAGE2"
+USER_CONF_CXX_OPTS_STAGE2="$CONF_CXX_OPTS_STAGE2"
+USER_CONF_GCC_LINKER_OPTS_STAGE2="$CONF_GCC_LINKER_OPTS_STAGE2"
+
 dnl ----------------------------------------------------------
 dnl ** Find unixy sort and find commands,
 dnl ** which are needed by FP_SETUP_PROJECT_VERSION
@@ -171,6 +184,14 @@ AC_ARG_ENABLE(ghc-toolchain,
 )
 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 CC_STAGE0, LD_STAGE0, AR_STAGE0 are like the "previous" variable
 dnl CC, LD, AR (inherited by CC_STAGE[123], etc.)
 dnl but instead used by stage0 for bootstrapping stage1
@@ -1183,8 +1204,9 @@ checkMake380 make
 checkMake380 gmake
 
 # Toolchain target files
+FIND_GHC_TOOLCHAIN_BIN([NO])
 PREP_TARGET_FILE
-FIND_GHC_TOOLCHAIN([hadrian/cfg],[NO])
+FIND_GHC_TOOLCHAIN([hadrian/cfg])
 
 AC_CONFIG_FILES(
 [ mk/project.mk
@@ -1322,3 +1344,5 @@ For more information on how to configure your GHC build, see
 
 VALIDATE_GHC_TOOLCHAIN([hadrian/cfg/default.target],[hadrian/cfg/default.target.ghc-toolchain])
 
+rm -Rf acargs acghc-toolchain actmp-ghc-toolchain
+


=====================================
distrib/configure.ac.in
=====================================
@@ -315,11 +315,14 @@ checkMake380 make
 checkMake380 gmake
 
 # Toolchain target files
+FIND_GHC_TOOLCHAIN_BIN([YES])
 PREP_TARGET_FILE
-FIND_GHC_TOOLCHAIN([.],[YES])
+FIND_GHC_TOOLCHAIN([.])
 
 VALIDATE_GHC_TOOLCHAIN([default.target],[default.target.ghc-toolchain])
 
+rm -Rf acargs acghc-toolchain actmp-ghc-toolchain
+
 echo "****************************************************"
 echo "Configuration done, ready to 'make install'"
 echo "(see README and INSTALL files for more info.)"


=====================================
hadrian/cfg/default.target.in
=====================================
@@ -34,6 +34,6 @@ Target
 
 , tgtRanlib = Just (Ranlib {ranlibProgram = Program {prgPath = "@RanlibCmd@", prgFlags = []}})
 , tgtNm = Nm {nmProgram = Program {prgPath = "@NmCmd@", prgFlags = []}}
-, tgtMergeObjs = Just (MergeObjs {mergeObjsProgram = Program {prgPath = "@MergeObjsCmd@", prgFlags = @MergeObjsArgsList@}, mergeObjsSupportsResponseFiles = @MergeObjsSupportsResponseFilesBool@})
+, tgtMergeObjs = @MergeObjsCmdMaybe@
 , tgtWindres = @WindresCmdMaybeProg@
 }


=====================================
libraries/base/Data/Ord.hs
=====================================
@@ -64,6 +64,8 @@ comparing p x y = compare (p x) (p y)
 --
 -- >>> clamp ('a', 'm') 'x'
 -- 'm'
+--
+-- @since 4.16.0.0
 clamp :: (Ord a) => (a, a) -> a -> a
 clamp (low, high) a = min high (max a low)
 


=====================================
libraries/base/GHC/Float.hs
=====================================
@@ -1600,6 +1600,8 @@ exponents returned by decodeFloat.
 -- ==== __Example__
 -- >>> clamp (-10) 5
 -- 10
+--
+-- @since 4.13.0.0
 clamp :: Int -> Int -> Int
 clamp bd k = max (-bd) (min bd k)
 


=====================================
m4/find_merge_objects.m4
=====================================
@@ -3,25 +3,59 @@
 # Find which linker to use to merge object files.
 #
 # See Note [Merging object files for GHCi] in GHC.Driver.Pipeline.
+
+
+AC_DEFUN([CHECK_MERGE_OBJECTS],[
+  AC_REQUIRE([FP_FIND_NM])
+  AC_MSG_NOTICE([Checking whether $MergeObjsCmd can merge objects])
+  echo 'int funA(int x) {return x;}' > conftesta.c
+  echo 'int funB(int x) {return x;}' > conftestb.c
+  "$CC" -c -o conftesta.o conftesta.c
+  "$CC" -c -o conftestb.o conftestb.c
+  $MergeObjsCmd $MergeObjsArgs conftesta.o conftestb.o -o conftestc.o || AC_MSG_ERROR([ $MergeObjsCmd could not merge objects ])
+
+  # Check the resulting object file has both functions.
+  "$NM" conftestc.o | grep funA > /dev/null 2>&1 || AC_MSG_ERROR([ $MergeObjsCmd could not merge objects ])
+  "$NM" conftestc.o | grep funB > /dev/null 2>&1 || AC_MSG_ERROR([ $MergeObjsCmd could not merge objects ])
+
+  rm -r conftest*.c conftest*.o
+])
+
 AC_DEFUN([FIND_MERGE_OBJECTS],[
     AC_REQUIRE([FIND_LD])
 
-    if test -z "$MergeObjsCmd"; then
+    if test -z ${MergeObjsCmd+x}; then
+        AC_MSG_NOTICE([Setting cmd])
         MergeObjsCmd="$(command -v $LD)"
     fi
-    if test -z "$MergeObjsArgs"; then
+    if test -z ${MergeObjsArgs+x}; then
         MergeObjsArgs="-r"
     fi
 
-    CHECK_FOR_GOLD_T22266($MergeObjsCmd)
-    if test "$result" = "1"; then
-        AC_MSG_NOTICE([$MergeObjsCmd is broken due to binutils 22266, looking for another linker...])
-        MergeObjsCmd=""
-        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.])
-        fi
+
+    # If MergeObjsCmd="" then we assume that the user is explicitly telling us that
+    # they do not want to configure the MergeObjsCmd, this is particularly important for
+    # the bundled windows toolchain.
+    if test -z "$MergeObjsCmd"; then
+      AC_MSG_NOTICE([No command for merging objects as explicitly instructed by user])
+
+    else
+      # Check first that gold works
+      CHECK_FOR_GOLD_T22266($MergeObjsCmd)
+      if test "$result" = "1"; then
+          AC_MSG_NOTICE([$MergeObjsCmd is broken due to binutils 22266, looking for another linker...])
+          MergeObjsCmd=""
+          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.])
+          fi
+
+      fi
+
+      # Now just check that merging objects works at all
+      CHECK_MERGE_OBJECTS()
+
     fi
 
     AC_SUBST([MergeObjsCmd])


=====================================
m4/fp_cpp_cmd_with_args.m4
=====================================
@@ -45,12 +45,13 @@ AC_ARG_WITH(cpp-flags,
       # Use whatever flags were manually set, ignoring previously configured
       # flags; and add CPP_ARGS (which will be -E if CPP_CMD was not specified)
       CPP_ARGS="$CPP_ARGS $withval"
+      USER_CPP_ARGS="$withval"
   fi
 ],
 [
   # Augment CPP_ARGS with whatever flags were previously configured and passed
   # as an argument.
-  CPP_ARGS="$CPP_ARGS $$3"
+  CPP_ARGS="$$3 $CPP_ARGS"
 ])
 
 $2="$CPP_CMD"


=====================================
m4/fp_hs_cpp_cmd_with_args.m4
=====================================
@@ -39,6 +39,7 @@ AC_ARG_WITH(hs-cpp-flags,
           AC_MSG_WARN([Request to use $withval will be ignored])
       else
           HS_CPP_ARGS=$withval
+          USER_HS_CPP_ARGS=$withval
       fi
   ],
 [
@@ -63,6 +64,6 @@ AC_ARG_WITH(hs-cpp-flags,
 )
 
 $1=$HS_CPP_CMD
-$2=$HS_CPP_ARGS
+$2="$$2 $HS_CPP_ARGS"
 
 ])


=====================================
m4/fp_link_supports_no_as_needed.m4
=====================================
@@ -8,9 +8,9 @@ AC_DEFUN([FP_LINK_SUPPORTS_NO_AS_NEEDED],
     AC_MSG_CHECKING([whether Cc linker supports -Wl,--no-as-needed])
     echo 'int f(int a) {return 2*a;}' > conftest.a.c
     echo 'int f(int a); int main(int argc, char **argv) {return f(0);}' > conftest.b.c
-    $CC -c -o conftest.a.o conftest.a.c > /dev/null 2>&1
-    $CC -c -o conftest.b.o conftest.b.c > /dev/null 2>&1
-    if "$CC" "$$1" -Wl,--no-as-needed -o conftest conftest.a.o conftest.b.o > /dev/null 2>&1
+    $CC -c -o conftest.a.o conftest.a.c  2>&1
+    $CC -c -o conftest.b.o conftest.b.c  2>&1
+    if "$CC" ${$1:+$$1} -Wl,--no-as-needed -o conftest conftest.a.o conftest.b.o 2>&1
     then
         $1="$$1 -Wl,--no-as-needed"
         AC_MSG_RESULT([yes])


=====================================
m4/fp_prog_ld_is_gnu.m4
=====================================
@@ -4,10 +4,19 @@
 # GNU ld or not.
 AC_DEFUN([FP_PROG_LD_IS_GNU],[
 AC_CACHE_CHECK([whether ld is GNU ld], [fp_cv_gnu_ld],
-[[if $LD --version 2> /dev/null | grep "GNU" > /dev/null 2>&1; then
-  fp_cv_gnu_ld=YES
-else
+[[
+
+if "$LD" --version 2> /dev/null | grep "emcc" > /dev/null 2>&1;
+then
   fp_cv_gnu_ld=NO
-fi]])
+else
+  if "$LD" --version 2> /dev/null | grep "GNU" > /dev/null 2>&1; then
+    fp_cv_gnu_ld=YES
+  else
+    fp_cv_gnu_ld=NO
+  fi
+fi
+
+]])
 AC_SUBST([LdIsGNULd],["$fp_cv_gnu_ld"])
 ])# FP_PROG_LD_IS_GNU


=====================================
m4/fp_prog_ld_no_compact_unwind.m4
=====================================
@@ -5,14 +5,21 @@
 AC_DEFUN([FP_PROG_LD_NO_COMPACT_UNWIND],
 [
 AC_CACHE_CHECK([whether ld understands -no_compact_unwind], [fp_cv_ld_no_compact_unwind],
-[echo 'int foo() { return 0; }' > conftest.c
-${CC-cc} -c conftest.c
-if $LD -r -no_compact_unwind -o conftest2.o conftest.o > /dev/null 2>&1; then
-   fp_cv_ld_no_compact_unwind=yes
-else
-   fp_cv_ld_no_compact_unwind=no
-fi
-rm -rf conftest*])
+[
+case $build in
+  *-darwin)
+    echo 'int foo() { return 0; }' > conftest.c
+    "${CC-cc}" -c conftest.c
+    if "$LD" -r -no_compact_unwind -o conftest2.o conftest.o > /dev/null 2>&1; then
+      fp_cv_ld_no_compact_unwind=yes
+    else
+      fp_cv_ld_no_compact_unwind=no
+    fi
+    rm -rf conftest* ;;
+  *)
+    fp_cv_ld_no_compact_unwind=no ;;
+esac
+])
 FP_CAPITALIZE_YES_NO(["$fp_cv_ld_no_compact_unwind"], [LdHasNoCompactUnwind])
 AC_SUBST([LdHasNoCompactUnwind])
 ])# FP_PROG_LD_NO_COMPACT_UNWIND


=====================================
m4/fp_setup_windows_toolchain.m4
=====================================
@@ -127,4 +127,14 @@ AC_DEFUN([FP_SETUP_WINDOWS_TOOLCHAIN],[
     MergeObjsCmd=""
     MergeObjsArgs=""
     AC_PATH_PROG([Genlib],[genlib])
+
+
+    dnl We override the USER_* flags here since the user delegated
+    dnl configuration to the bundled windows toolchain, and these are the
+    dnl options required by the bundled windows toolchain.
+    USER_CFLAGS="$CFLAGS"
+    USER_CPP_ARGS="$CONF_CPP_OPTS_STAGE2"
+    USER_CXXFLAGS="$CXXFLAGS"
+    USER_HS_CPP_ARGS="$HaskellCPPArgs"
+    USER_LDFLAGS="$CONF_GCC_LINKER_OPTS_STAGE2"
 ])


=====================================
m4/fptools_set_c_ld_flags.m4
=====================================
@@ -19,7 +19,7 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
 
     # See Note [ELF needed shared libs]
     case $$1 in
-    *-linux|*-freebsd*)
+    *-linux*|*-freebsd*)
         FP_LINK_SUPPORTS_NO_AS_NEEDED([$3])
         ;;
     esac


=====================================
m4/ghc_toolchain.m4
=====================================
@@ -8,12 +8,28 @@ AC_DEFUN([ADD_GHC_TOOLCHAIN_ARG],
     done
 ])
 
+dnl $1 argument name
+dnl $2 first variable to try
+dnl $3 variable to add if the first variable is empty
+AC_DEFUN([ADD_GHC_TOOLCHAIN_ARG_CHOOSE],
+[
+    if test -z "$2"; then
+        ADD_GHC_TOOLCHAIN_ARG([$1],[$3])
+    else
+        ADD_GHC_TOOLCHAIN_ARG([$1],[$2])
+    fi
+])
+
 AC_DEFUN([ENABLE_GHC_TOOLCHAIN_ARG],
 [
     if test "$2" = "YES"; then
         echo "--enable-$1" >> acargs
+    elif test "$2" = "yes"; then
+        echo "--enable-$1" >> acargs
     elif test "$2" = "NO"; then
         echo "--disable-$1" >> acargs
+    elif test "$2" = "no"; then
+        echo "--disable-$1" >> acargs
     fi
 ])
 
@@ -23,6 +39,10 @@ AC_DEFUN([ENABLE_GHC_TOOLCHAIN_NOT_ARG],
         echo "--enable-$1" >> acargs
     elif test "$2" = "YES"; then
         echo "--disable-$1" >> acargs
+    elif test "$2" = "no"; then
+        echo "--enable-$1" >> acargs
+    elif test "$2" = "yes"; then
+        echo "--disable-$1" >> acargs
     fi
 ])
 
@@ -40,31 +60,8 @@ AC_DEFUN([INVOKE_GHC_TOOLCHAIN],
 ])
 
 dnl $1 is the path to the directory where to put the configured default.host.target.ghc-toolchain and default.target.ghc-toolchain
-dnl $2 is YES or NO,
-dnl     * YES means we're calling GHC_TOOLCHAIN from the bindist configure script,
-dnl         and that ghc-toolchain is already an available binary
-dnl     * NO means we're calling GHC_TOOLCHAIN from the source tree configure script,
-dnl         and that we must compile ghc-toolchain before invoking it
 AC_DEFUN([FIND_GHC_TOOLCHAIN],
 [
-    case "$2" in
-        YES)
-            # We're configuring the bindist, and the binary is already available
-            GHC_TOOLCHAIN_BIN="bin/ghc-toolchain-bin"
-            ;;
-        NO)
-            # We're in the source tree, so compile ghc-toolchain
-            "$GHC" -v0 \
-                -ilibraries/ghc-platform/src -iutils/ghc-toolchain/src \
-                -XNoImplicitPrelude \
-                -odir actmp-ghc-toolchain -hidir actmp-ghc-toolchain \
-                utils/ghc-toolchain/exe/Main.hs -o acghc-toolchain
-            GHC_TOOLCHAIN_BIN="./acghc-toolchain"
-            ;;
-        *)
-            AC_MSG_ERROR([In m4/ghc_toolchain.m4, expecting $2 to be either YES or NO.])
-            ;;
-    esac
 
     # (1) Configure a toolchain for the build and host platform (we require that BUILD=HOST, so one toolchain suffices)
     rm -f acargs
@@ -93,6 +90,7 @@ AC_DEFUN([FIND_GHC_TOOLCHAIN],
     # the usual system locations, including the PATH, we are just explicit when
     # calling it through configure.
     rm -f acargs
+
     echo "--triple=$target" >> acargs
     echo "--output=$1/default.target.ghc-toolchain" >> acargs
     echo "--llvm-triple=$LlvmTarget" >> acargs
@@ -107,24 +105,60 @@ AC_DEFUN([FIND_GHC_TOOLCHAIN],
     echo "--merge-objs=$MergeObjsCmd" >> acargs
     echo "--readelf=$READELF" >> acargs
     echo "--windres=$WindresCmd" >> acargs
+
     ENABLE_GHC_TOOLCHAIN_NOT_ARG([locally-executable], [$CrossCompiling])
     ENABLE_GHC_TOOLCHAIN_ARG([unregisterised], [$Unregisterised])
     ENABLE_GHC_TOOLCHAIN_ARG([tables-next-to-code], [$TablesNextToCode])
+    ENABLE_GHC_TOOLCHAIN_ARG([ld-override], [$enable_ld_override])
+    ENABLE_GHC_TOOLCHAIN_ARG([libffi-adjustors], [$UseLibffiForAdjustors])
 
-    INVOKE_GHC_TOOLCHAIN()
+    dnl We store USER_* variants of all user-specified flags to pass them over to ghc-toolchain.
+    ADD_GHC_TOOLCHAIN_ARG_CHOOSE([cc-opt], [$USER_CONF_CC_OPTS_STAGE2], [$USER_CFLAGS])
+    ADD_GHC_TOOLCHAIN_ARG_CHOOSE([cc-link-opt], [$USER_CONF_GCC_LINKER_OPTS_STAGE2], [$USER_LDFLAGS])
+    ADD_GHC_TOOLCHAIN_ARG([cc-link-opt], [$USER_LIBS])
+    ADD_GHC_TOOLCHAIN_ARG_CHOOSE([cxx-opt], [$USER_CONF_CXX_OPTS_STAGE2], [$USER_CXXFLAGS])
+    ADD_GHC_TOOLCHAIN_ARG([cpp-opt], [$USER_CPP_ARGS])
+    ADD_GHC_TOOLCHAIN_ARG([hs-cpp-opt], [$USER_HS_CPP_ARGS])
 
-    rm -Rf acargs acghc-toolchain actmp-ghc-toolchain
+    INVOKE_GHC_TOOLCHAIN()
 
     dnl Note: if we weren't passing the paths to the programs explicitly, to make
     dnl ghc-toolchain use the bundled windows toolchain, simply add it to the search PATH
 ])
 
 
+dnl $1 is YES or NO,
+dnl     * YES means we're calling GHC_TOOLCHAIN from the bindist configure script,
+dnl         and that ghc-toolchain is already an available binary
+dnl     * NO means we're calling GHC_TOOLCHAIN from the source tree configure script,
+dnl         and that we must compile ghc-toolchain before invoking it
+AC_DEFUN([FIND_GHC_TOOLCHAIN_BIN],[
+    case "$1" in
+        YES)
+            # We're configuring the bindist, and the binary is already available
+            GHC_TOOLCHAIN_BIN="bin/ghc-toolchain-bin"
+            ;;
+        NO)
+            # We're in the source tree, so compile ghc-toolchain
+            "$GHC" -v0 \
+                -ilibraries/ghc-platform/src -iutils/ghc-toolchain/src \
+                -XNoImplicitPrelude \
+                -odir actmp-ghc-toolchain -hidir actmp-ghc-toolchain \
+                utils/ghc-toolchain/exe/Main.hs -o acghc-toolchain
+            GHC_TOOLCHAIN_BIN="./acghc-toolchain"
+            ;;
+        *)
+            AC_MSG_ERROR([In m4/ghc_toolchain.m4, expecting $2 to be either YES or NO.])
+            ;;
+    esac
+])
+
+
 dnl Note [ghc-toolchain consistency checking]
 dnl ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 dnl ghc-toolchain is the brand new way (2023) to configure toolchains for GHC,
 dnl but this novelty musn't break user's installations, so we still
-dnl conservatively use the toolchains configured by configure (see also m4/prep_target_file.m4).
+dnl conservatively use the toolchains configured by configure (see also m4/tprep_target_file.m4).
 dnl
 dnl However, we already ship and run ghc-toolchain at configure time to /validate/ ghc-toolchain:
 dnl * PREP_TARGET_FILE substitutes the toolchain into default.target.in and default.host.target.in
@@ -139,7 +173,11 @@ dnl files generated by ghc-toolchain instead).
 dnl $1 like "default.target"
 dnl $2 like "default.target.ghc-toolchain"
 AC_DEFUN([VALIDATE_GHC_TOOLCHAIN],[
-    diff_output=`diff "$1" "$2" 2>&1`
+    o1="$(mktemp)"
+    o2="$(mktemp)"
+    "$GHC_TOOLCHAIN_BIN" format --input="$1" --output="$o1"
+    "$GHC_TOOLCHAIN_BIN" format --input="$2" --output="$o2"
+    diff_output=`diff "$o1" "$o2" 2>&1`
     if test -z "$diff_output"; then
       true
     else
@@ -151,6 +189,11 @@ $diff_output
 Don't worry! This won't affect your ghc in any way.
 However, in a near future, we will move to configuring toolchains with "ghc-toolchain" by default, so you might have discovered a future bug.
 In light of it, if you've spotted this difference, please report a GHC bug at https://www.haskell.org/ghc/reportabug])
+
+    case "$EnableStrictGhcToolchainCheck" in
+        YES)
+          AC_MSG_ERROR([Failing due to --enable-strict-ghc-toolchain-check])
+    esac
     fi
 ])
 


=====================================
m4/prep_target_file.m4
=====================================
@@ -160,6 +160,14 @@ AC_DEFUN([PREP_TARGET_FILE],[
     PREP_LIST([CONF_CXX_OPTS_STAGE0])
     PREP_LIST([CONF_GCC_LINKER_OPTS_STAGE0])
 
+
+    if test -z "$MergeObjsCmd"; then
+      MergeObjsCmdMaybe=Nothing
+    else
+      MergeObjsCmdMaybe="Just (MergeObjs {mergeObjsProgram = Program {prgPath = \"$MergeObjsCmd\", prgFlags = $MergeObjsArgsList}, mergeObjsSupportsResponseFiles = $MergeObjsSupportsResponseFilesBool})"
+    fi
+    AC_SUBST([MergeObjsCmdMaybe])
+
     dnl PREP_ENDIANNESS
     case "$TargetWordBigEndian" in
         YES)


=====================================
testsuite/tests/plugins/Makefile
=====================================
@@ -172,6 +172,10 @@ test-defaulting-plugin:
 test-defaulting-plugin-fail:
 	-"$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) -v0 test-defaulting-plugin-fail.hs -package-db defaulting-plugin/pkg.test-defaulting-plugin-fail/local.package.conf
 
+.PHONY: T23821
+T23821:
+	-"$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) --make -v0 T23821.hs -package-db defaulting-plugin/pkg.test-defaulting-plugin/local.package.conf
+
 .PHONY: plugins-order
 plugins-order:
 	"$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) --make -v0 plugins-order.hs -package-db plugin-recomp/pkg.plugins01/local.package.conf -fplugin ImpurePlugin -fplugin PurePlugin -fplugin-opt ImpurePlugin:First_Option -fplugin-opt PurePlugin:Second_Option -fplugin-opt PurePlugin:Second_Option_2 -fplugin FingerprintPlugin -fplugin-opt FingerprintPlugin:1


=====================================
testsuite/tests/plugins/T23821.hs
=====================================
@@ -0,0 +1,12 @@
+{-# OPTIONS_GHC -fplugin DefaultInterference #-}
+{-# LANGUAGE ExtendedDefaultRules #-}
+module Main where
+
+class IsColor a where
+    op :: a -> ()
+
+instance IsColor (Int, Int, Int) where
+    op _ = ()
+
+main :: IO ()
+main = pure $ op (1, 2, 3)


=====================================
testsuite/tests/plugins/all.T
=====================================
@@ -280,6 +280,11 @@ test('test-defaulting-plugin-fail',
       pre_cmd('$MAKE -s --no-print-directory -C defaulting-plugin package.test-defaulting-plugin-fail TOP={top}')],
      makefile_test, [])
 
+test('T23821',
+     [extra_files(['defaulting-plugin/']),
+      pre_cmd('$MAKE -s --no-print-directory -C defaulting-plugin package.test-defaulting-plugin TOP={top}')],
+     makefile_test, [])
+
 test('plugins-order',
      [extra_files(['plugin-recomp/', 'plugin-recomp-test.hs']),
       pre_cmd('$MAKE -s --no-print-directory -C plugin-recomp package.plugins01 TOP={top}')


=====================================
testsuite/tests/plugins/defaulting-plugin/DefaultInterference.hs
=====================================
@@ -0,0 +1,32 @@
+module DefaultInterference(plugin) where
+
+import GHC.Driver.Plugins
+import GHC.Tc.Plugin
+import GHC.Tc.Types
+import GHC.Tc.Utils.TcType
+import GHC.Tc.Types.Constraint
+import GHC.Core.Predicate
+import GHC.Tc.Solver
+import GHC.Core.Type
+import GHC.Core.Class
+import GHC.Data.Bag
+import GHC.Builtin.Types (intTy)
+
+plugin :: Plugin
+plugin = defaultPlugin
+    { defaultingPlugin = \_ -> Just DefaultingPlugin
+        { dePluginInit = pure ()
+        , dePluginRun = \ _ -> defaultEverythingToInt
+        , dePluginStop = \ _ -> pure ()
+        }
+    }
+
+defaultEverythingToInt :: WantedConstraints -> TcPluginM [DefaultingProposal]
+defaultEverythingToInt wanteds = pure
+    [ DefaultingProposal tv [intTy] [ct]
+    | ct <- bagToList $ approximateWC True wanteds
+    , Just (cls, tys) <- pure $ getClassPredTys_maybe (ctPred ct)
+    , [ty] <- pure $ filterOutInvisibleTypes (classTyCon cls) tys
+    , Just tv <- pure $ getTyVar_maybe ty
+    , isMetaTyVar tv
+    ]


=====================================
testsuite/tests/plugins/defaulting-plugin/defaulting-plugin.cabal
=====================================
@@ -6,5 +6,5 @@ version: 0.1.0.0
 library
   default-language: Haskell2010
   build-depends: base, ghc, containers
-  exposed-modules: DefaultLifted
+  exposed-modules: DefaultLifted DefaultInterference
   ghc-options: -Wall


=====================================
utils/ghc-toolchain/exe/Main.hs
=====================================
@@ -1,5 +1,6 @@
 {-# LANGUAGE NamedFieldPuns #-}
 {-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE TypeApplications #-}
 
 module Main where
 
@@ -10,6 +11,7 @@ import System.Exit
 import System.Console.GetOpt
 import System.Environment
 import System.FilePath ((</>))
+import qualified System.IO (readFile, writeFile)
 
 import GHC.Platform.ArchOS
 
@@ -55,6 +57,22 @@ data Opts = Opts
     , optKeepTemp  :: Bool
     }
 
+data FormatOpts = FormatOpts
+    { formatOptInput :: FilePath
+    , formatOptOutput :: FilePath
+    }
+
+_formatOptOutput :: Lens FormatOpts String
+_formatOptOutput = Lens formatOptOutput (\x o -> o {formatOptOutput=x})
+
+_formatOptInput :: Lens FormatOpts String
+_formatOptInput = Lens formatOptInput (\x o -> o {formatOptInput=x})
+
+emptyFormatOpts :: FormatOpts
+emptyFormatOpts = FormatOpts { formatOptInput = error "formatOpts: input"
+                             , formatOptOutput = error "formatOpts: output"
+                             }
+
 emptyOpts :: Opts
 emptyOpts = Opts
     { optTriple    = ""
@@ -146,7 +164,7 @@ options =
     , progOpts "cxx" "C++ compiler" _optCxx
     , progOpts "cc-link" "C compiler for linking" _optCcLink
     , progOpts "ar" "ar archiver" _optAr
-    , progOpts "ranlib" "ranlib utility" _optAr
+    , progOpts "ranlib" "ranlib utility" _optRanlib
     , progOpts "nm" "nm archiver" _optNm
     , progOpts "readelf" "readelf utility" _optReadelf
     , progOpts "merge-objs" "linker for merging objects" _optMergeObjs
@@ -202,10 +220,41 @@ options =
     outputOpt = Option ['o'] ["output"] (ReqArg (set _optOutput) "OUTPUT")
         "The output path for the generated target toolchain configuration"
 
+formatOpts :: [OptDescr (FormatOpts -> FormatOpts)]
+formatOpts = [
+    (Option ['o'] ["output"] (ReqArg (set _formatOptOutput) "OUTPUT")
+        "The output path for the formatted target toolchain configuration")
+    , (Option ['i'] ["input"] (ReqArg (set _formatOptInput) "INPUT")
+        "The target file to format")
+    ]
+
 main :: IO ()
 main = do
     argv <- getArgs
-    let (opts0, _nonopts, errs) = getOpt RequireOrder options argv
+    case argv of
+      ("format": args) -> doFormat args
+      _ -> doConfigure argv
+
+-- The format mode is very useful for normalising paths and newlines on windows.
+doFormat :: [String] -> IO ()
+doFormat args = do
+  let (opts0, _nonopts, errs) = getOpt RequireOrder formatOpts args
+  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)
+    _ -> do
+      mapM_ putStrLn errs
+      putStrLn $ usageInfo "ghc-toolchain" formatOpts
+      exitWith (ExitFailure 1)
+
+
+
+doConfigure :: [String] -> IO ()
+doConfigure args = do
+    let (opts0, _nonopts, errs) = getOpt RequireOrder options args
     let opts = foldr (.) id opts0 emptyOpts
     case errs of
       [] -> do
@@ -309,6 +358,15 @@ archHasNativeAdjustors = \case
   _          -> False
 
 
+-- | The platforms which we attempt to override ld
+ldOverrideWhitelist :: ArchOS -> Bool
+ldOverrideWhitelist a =
+  case archOS_OS a of
+    OSLinux   -> True
+    OSMinGW32 -> True
+    _ -> False
+
+
 mkTarget :: Opts -> M Target
 mkTarget opts = do
     -- Use Llvm target if specified, otherwise use triple as llvm target
@@ -320,7 +378,7 @@ mkTarget opts = do
     (archOs, tgtVendor) <- parseTriple cc0 (optTriple opts)
     cc <- addPlatformDepCcFlags archOs cc0
     readelf <- optional $ findReadelf (optReadelf opts)
-    ccLink <- findCcLink tgtLlvmTarget (optCcLink opts) (fromMaybe True (optLdOverride opts)) archOs cc readelf
+    ccLink <- findCcLink tgtLlvmTarget (optCcLink opts) (ldOverrideWhitelist archOs && fromMaybe True (optLdOverride opts)) archOs cc readelf
 
     ar <- findAr tgtVendor (optAr opts)
     -- TODO: We could have


=====================================
utils/ghc-toolchain/src/GHC/Toolchain/ParseTriple.hs
=====================================
@@ -53,6 +53,7 @@ parseArch cc arch =
       "riscv64" -> pure ArchRISCV64
       "hppa" -> pure ArchUnknown
       "wasm32" -> pure ArchWasm32
+      "javascript" -> pure ArchJavaScript
       _ -> throwE $ "Unknown architecture " ++ arch
 
 parseOs :: String -> M OS
@@ -76,6 +77,7 @@ parseOs os =
       "aix" -> pure OSAIX
       "gnu" -> pure OSHurd
       "wasi" -> pure OSWasi
+      "ghcjs" -> pure OSGhcjs
       _ -> throwE $ "Unknown operating system " ++ os
 
 splitOn :: Char -> String -> [String]


=====================================
utils/ghc-toolchain/src/GHC/Toolchain/Program.hs
=====================================
@@ -2,6 +2,7 @@ module GHC.Toolchain.Program
     ( Program(..)
     , _prgPath
     , _prgFlags
+    , addFlagIfNew
       -- * Running programs
     , runProgram
     , callProgram
@@ -10,6 +11,7 @@ module GHC.Toolchain.Program
       -- * Finding 'Program's
     , ProgOpt(..)
     , emptyProgOpt
+    , programFromOpt
     , _poPath
     , _poFlags
     , findProgram
@@ -33,7 +35,12 @@ import GHC.Toolchain.Utils
 data Program = Program { prgPath :: FilePath
                        , prgFlags :: [String]
                        }
-    deriving (Show, Read, Eq, Ord)
+    deriving (Read, Eq, Ord)
+
+instance Show Program where
+  -- Normalise filepaths before showing to aid with diffing the target files.
+  show (Program p f) = unwords
+    [ "Program { prgPath = ", show (normalise p), ", prgFlags =", show f , "}"]
 
 _prgPath :: Lens Program FilePath
 _prgPath = Lens prgPath (\x o -> o {prgPath = x})
@@ -41,6 +48,13 @@ _prgPath = Lens prgPath (\x o -> o {prgPath = x})
 _prgFlags :: Lens Program [String]
 _prgFlags = Lens prgFlags (\x o -> o {prgFlags = x})
 
+-- | Prepends a flag to a program's flags if the flag is not in the existing flags.
+addFlagIfNew :: String -> Program -> Program
+addFlagIfNew flag prog@(Program path flags)
+  = if flag `elem` flags
+       then prog
+       else Program path (flags ++ [flag])
+
 runProgram :: Program -> [String] -> M ExitCode
 runProgram prog args = do
     logExecute prog args
@@ -98,6 +112,14 @@ _poFlags = Lens poFlags (\x o -> o {poFlags=x})
 emptyProgOpt :: ProgOpt
 emptyProgOpt = ProgOpt Nothing Nothing
 
+-- | Make a @'Program'@ from user specified program options (@'ProgOpt'@),
+-- defaulting to the given path and flags if unspecified in the @'ProgOpt'@.
+programFromOpt :: ProgOpt
+               -> FilePath -- ^ Program path to default to
+               -> [String] -- ^ Program flags to default to
+               -> Program
+programFromOpt userSpec path flags = Program { prgPath = fromMaybe path (poPath userSpec), prgFlags = fromMaybe flags (poFlags userSpec) }
+
 -- | Tries to find the user specified program by path or tries to look for one
 -- in the given list of candidates.
 --


=====================================
utils/ghc-toolchain/src/GHC/Toolchain/Tools/Cc.hs
=====================================
@@ -37,21 +37,7 @@ findCc :: String -- ^ The llvm target to use if Cc supports --target
 findCc llvmTarget progOpt = checking "for C compiler" $ do
     -- TODO: We keep the candidate order we had in configure, but perhaps
     -- there's a more optimal one
-    ccProgram' <- findProgram "C compiler" progOpt ["gcc", "clang", "cc"]
-
-    -- FIXME: This is a dreadful hack!
-    -- In reality, configure should pass these options to ghc-toolchain when
-    -- using the bundled windows toolchain, and ghc-toolchain should drop this around.
-    -- See #23678
-    let ccProgram = if "mingw32" `isInfixOf` llvmTarget && takeBaseName (prgPath ccProgram') == "clang"
-                    -- we inline the is-windows check here because we need Cc to call parseTriple
-         then
-           -- Signal that we are linking against UCRT with the _UCRT macro. This is
-           -- necessary on windows clang to ensure correct behavior when
-           -- MinGW-w64 headers are in the header include path (#22159).
-           ccProgram' & _prgFlags %++ "--rtlib=compiler-rt -D_UCRT"
-         else
-           ccProgram'
+    ccProgram <- findProgram "C compiler" progOpt ["gcc", "clang", "cc"]
 
     cc' <- ignoreUnusedArgs $ Cc {ccProgram}
     cc  <- ccSupportsTarget llvmTarget cc'


=====================================
utils/ghc-toolchain/src/GHC/Toolchain/Tools/Cpp.hs
=====================================
@@ -4,12 +4,13 @@ module GHC.Toolchain.Tools.Cpp (HsCpp(..), findHsCpp, Cpp(..), findCpp) where
 
 import Control.Monad
 import System.FilePath
+import Data.List(isInfixOf)
 
 import GHC.Toolchain.Prelude
 import GHC.Toolchain.Program
-import GHC.Toolchain.Utils (withTempDir)
 
 import GHC.Toolchain.Tools.Cc
+import GHC.Toolchain.Utils (withTempDir)
 
 newtype Cpp = Cpp { cppProgram :: Program
                     }
@@ -23,26 +24,44 @@ newtype HsCpp = HsCpp { hsCppProgram :: Program
 
 findHsCpp :: ProgOpt -> Cc -> M HsCpp
 findHsCpp progOpt cc = checking "for Haskell C preprocessor" $ do
-  -- Use the specified HS CPP or try to find one (candidate is the c compiler)
-  foundHsCppProg <- findProgram "Haskell C preprocessor" progOpt [takeFileName $ prgPath $ ccProgram cc]
-  case poFlags progOpt of
-    -- If the user specified HS CPP flags don't second-guess them
-    Just _ -> return HsCpp{hsCppProgram=foundHsCppProg}
-    -- Otherwise, configure the HS CPP flags for this CPP program
-    Nothing -> do
-      let rawHsCppProgram = over _prgFlags (["-E"]++) foundHsCppProg
-      hppArgs <- findHsCppArgs rawHsCppProgram
-      let hsCppProgram = over _prgFlags (++hppArgs) rawHsCppProgram
-      return HsCpp{hsCppProgram}
+  -- Use the specified Hs Cpp or try to use the c compiler
+  foundHsCppProg <- findProgram "Haskell C preprocessor" progOpt [] <|> pure (programFromOpt progOpt (prgPath $ ccProgram cc) [])
+  -- Always add the -E flag to the CPP, regardless of the user options
+  let rawHsCppProgram = addFlagIfNew "-E" foundHsCppProg
+  -- Always try to add the Haskell-specific CPP flags, regardless of the user options
+  hppArgs <- findHsCppArgs rawHsCppProgram
+  let hsCppProgram = over _prgFlags (++hppArgs) rawHsCppProgram
+  return HsCpp{hsCppProgram}
 
 -- | Given a C preprocessor, figure out how it should be invoked to preprocess
 -- Haskell source.
 findHsCppArgs :: Program -> M [String]
 findHsCppArgs cpp = withTempDir $ \dir -> do
+
+  let tmp_c = dir </> "tmp.c"
+  writeFile tmp_c ""
+  (_, stdout0, stderr0) <- readProgram cpp ["-x", "c", tmp_c, "-dM", "-E"]
+
+  if "__clang__" `isInfixOf` stdout0 || "__clang__" `isInfixOf` stderr0
+     then return ["-undef", "-traditional", "-Wno-invalid-pp-token", "-Wno-unicode", "-Wno-trigraphs"]
+     else do
+        (_, stdout1, stderr1) <- readProgram cpp ["-v"]
+        if "gcc" `isInfixOf` stdout1 || "gcc" `isInfixOf` stderr1
+          then return ["-undef", "-traditional"]
+          else do
+            logDebug "Can't recognize your CPP program, you may need to set --with-hs-cpp-flags=FLAGS explicitly"
+            return []
+
+
+{- TODO: We want to just check which flags are accepted rather than branching on which compiler
+         we are using but this does not match what ./configure does (#23720)
+
+         When we retire configure then this more precise logic can be reinstated.
+  withTmpDir $ \dir -> do
   let tmp_h = dir </> "tmp.h"
 
       -- Werror to ensure that unrecognized warnings result in an error
-      checkFlag flag =
+  let checkFlag flag =
           checking ("for "++flag++" support") $ callProgram cpp ["-Werror", flag, tmp_h]
 
       tryFlag flag =
@@ -56,18 +75,15 @@ findHsCppArgs cpp = withTempDir $ \dir -> do
       , tryFlag "-Wno-unicode"
       , tryFlag "-Wno-trigraphs"
       ]
+      -}
 
 ----- C preprocessor -----
 
 findCpp :: ProgOpt -> Cc -> M Cpp
 findCpp progOpt cc = checking "for C preprocessor" $ do
-  -- Use the specified CPP or try to find one (candidate is the c compiler)
-  foundCppProg <- findProgram "C preprocessor" progOpt [prgPath $ ccProgram cc]
-  case poFlags progOpt of
-    -- If the user specified CPP flags don't second-guess them
-    Just _ -> return Cpp{cppProgram=foundCppProg}
-    -- Otherwise, configure the CPP flags for this CPP program
-    Nothing -> do
-      let cppProgram = over _prgFlags (["-E"]++) foundCppProg
-      return Cpp{cppProgram}
+  -- Use the specified CPP or try to use the c compiler
+  foundCppProg <- findProgram "C preprocessor" progOpt [] <|> pure (programFromOpt progOpt (prgPath $ ccProgram cc) [])
+  -- Always add the -E flag to the CPP, regardless of the user options
+  let cppProgram = addFlagIfNew "-E" foundCppProg
+  return Cpp{cppProgram}
 


=====================================
utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs
=====================================
@@ -46,8 +46,8 @@ findCcLink :: String -- ^ The llvm target to use if CcLink supports --target
            -> Bool   -- ^ Whether we should search for a more efficient linker
            -> ArchOS -> Cc -> Maybe Readelf -> M CcLink
 findCcLink target progOpt ldOverride archOs cc readelf = checking "for C compiler for linking command" $ do
-  -- Use the specified linker or try to find one
-  rawCcLink <- findProgram "C compiler for linking" progOpt [takeFileName $ prgPath $ ccProgram cc]
+  -- Use the specified linker or try using the C compiler
+  rawCcLink <- findProgram "C compiler for linking" progOpt [] <|> pure (programFromOpt progOpt (prgPath $ ccProgram cc) [])
   ccLinkProgram <- case poFlags progOpt of
                      Just _ ->
                          -- If the user specified linker flags don't second-guess them
@@ -55,11 +55,11 @@ findCcLink target progOpt ldOverride archOs cc readelf = checking "for C compile
                      Nothing -> do
                          -- If not then try to find decent linker flags
                          findLinkFlags ldOverride cc rawCcLink <|> pure rawCcLink
-  ccLinkProgram <- linkSupportsTarget cc target ccLinkProgram
-  ccLinkSupportsNoPie         <- checkSupportsNoPie            ccLinkProgram
-  ccLinkSupportsCompactUnwind <- checkSupportsCompactUnwind cc ccLinkProgram
-  ccLinkSupportsFilelist      <- checkSupportsFilelist      cc ccLinkProgram
-  ccLinkIsGnu                 <- checkLinkIsGnu                ccLinkProgram
+  ccLinkProgram <- linkSupportsTarget archOs cc target ccLinkProgram
+  ccLinkSupportsNoPie         <- checkSupportsNoPie  ccLinkProgram
+  ccLinkSupportsCompactUnwind <- checkSupportsCompactUnwind archOs cc ccLinkProgram
+  ccLinkSupportsFilelist      <- checkSupportsFilelist cc ccLinkProgram
+  ccLinkIsGnu                 <- checkLinkIsGnu archOs ccLinkProgram
   checkBfdCopyBug archOs cc readelf ccLinkProgram
   ccLinkProgram <- addPlatformDepLinkFlags archOs cc ccLinkProgram
   let ccLink = CcLink {ccLinkProgram, ccLinkSupportsNoPie,
@@ -87,8 +87,13 @@ findLinkFlags enableOverride cc ccLink
   | otherwise =
     return ccLink
 
-linkSupportsTarget :: Cc -> String -> Program -> M Program
-linkSupportsTarget cc target link
+linkSupportsTarget :: ArchOS -> Cc -> String -> Program -> M Program
+-- Javascript toolchain provided by emsdk just ignores --target flag so
+-- we have this special case to match with ./configure (#23744)
+linkSupportsTarget archOS _ _ c
+  | ArchJavaScript <- archOS_arch archOS
+  = return c
+linkSupportsTarget _ cc target link
   = checking "whether cc linker supports --target" $
     supportsTarget (Lens id const) (checkLinkWorks cc) target link
 
@@ -124,16 +129,18 @@ checkSupportsNoPie ccLink = checking "whether the cc linker supports -no-pie" $
 -- * Check if compiling for darwin
 -- * Then do the check
 -- * Otherwise say its just not supported
-checkSupportsCompactUnwind :: Cc -> Program -> M Bool
-checkSupportsCompactUnwind cc ccLink = checking "whether the cc linker understands -no_compact_unwind" $
-  withTempDir $ \dir -> do
-    let test_o  = dir </> "test.o"
-        test2_o = dir </> "test2.o"
+checkSupportsCompactUnwind :: ArchOS -> Cc -> Program -> M Bool
+checkSupportsCompactUnwind archOs cc ccLink
+  | OSDarwin <- archOS_OS archOs = checking "whether the cc linker understands -no_compact_unwind" $
+      withTempDir $ \dir -> do
+        let test_o  = dir </> "test.o"
+            test2_o = dir </> "test2.o"
 
-    compileC cc test_o "int foo() { return 0; }"
+        compileC cc test_o "int foo() { return 0; }"
 
-    exitCode <- runProgram ccLink ["-r", "-Wl,-no_compact_unwind", "-o", test2_o, test_o]
-    return $ isSuccess exitCode
+        exitCode <- runProgram ccLink ["-r", "-Wl,-no_compact_unwind", "-o", test2_o, test_o]
+        return $ isSuccess exitCode
+  | otherwise = return False
 
 checkSupportsFilelist :: Cc -> Program -> M Bool
 checkSupportsFilelist cc ccLink = checking "whether the cc linker understands -filelist" $
@@ -163,13 +170,16 @@ checkLinkWorks cc ccLink = withTempDir $ \dir -> do
 
     let out = dir </> "test"
         err = "linker didn't produce any output"
-    callProgram ccLink ["-o", out, test_o, main_o]
+    callProgram ccLink ["-Werror", "-o", out, test_o, main_o]
     expectFileExists out err
       -- Linking in windows might produce an executable with an ".exe" extension
       <|> expectFileExists (out <.> "exe") err
 
-checkLinkIsGnu :: Program -> M Bool
-checkLinkIsGnu ccLink = do
+checkLinkIsGnu :: ArchOS -> Program -> M Bool
+checkLinkIsGnu archOs _
+  -- emsdk is never going to provide gnu ld (See #23744)
+  | ArchJavaScript <- archOS_arch archOs = return False
+checkLinkIsGnu _ ccLink = do
   out <- readProgramStdout ccLink ["-Wl,--version"]
   return ("GNU" `isInfixOf` out)
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fdfc3e7ceb4eb76117acff7e922d3c2ecf94aa8c...0d9b6215b57a4e94e3e32bfc00752caefd5ef6b4

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fdfc3e7ceb4eb76117acff7e922d3c2ecf94aa8c...0d9b6215b57a4e94e3e32bfc00752caefd5ef6b4
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/20230816/263bc53f/attachment-0001.html>


More information about the ghc-commits mailing list