summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-05-17 19:16:47 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-05-19 04:59:39 -0400
commit35bdab1cb97f0be0ebea7cc93b977759f51d976c (patch)
treee29e88e11e74e75006c511c840224fc6dfc35218 /distrib
parent02d1633466733f154753753c8d9e94062d334b1a (diff)
downloadhaskell-35bdab1cb97f0be0ebea7cc93b977759f51d976c.tar.gz
configure: Check CC_STAGE0 for --target support
We previously only checked the stage 1/2 compiler for --target support. We got away with this for quite a while but it eventually caught up with us in #21579, where `bytestring`'s new NEON implementation was unbuildable on Darwin due to Rosetta's seemingly random logic for determining which executable image to execute. This lead to a confusing failure to build `bytestring`'s cbits, when `clang` tried to compile NEON builtins while targetting x86-64. Fix this by checking CC_STAGE0 for --target support. Fixes #21579.
Diffstat (limited to 'distrib')
-rw-r--r--distrib/configure.ac.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in
index 9b7abd5867..a1fbf79a14 100644
--- a/distrib/configure.ac.in
+++ b/distrib/configure.ac.in
@@ -201,7 +201,8 @@ AC_SUBST(TargetHasGnuNonexecStack)
dnl ** See whether cc supports --target=<triple> and set
dnl CONF_CC_OPTS_STAGE[12] accordingly.
-FP_CC_SUPPORTS_TARGET
+FP_CC_SUPPORTS_TARGET([$CC], [CONF_CC_OPTS_STAGE1], [CONF_CXX_OPTS_STAGE1], [CONF_GCC_LINK_OPTS_STAGE1])
+FP_CC_SUPPORTS_TARGET([$CC], [CONF_CC_OPTS_STAGE2], [CONF_CXX_OPTS_STAGE2], [CONF_GCC_LINK_OPTS_STAGE2])
dnl TargetWordSize for settings file
AC_CHECK_SIZEOF(void *, 4)