[Git][ghc/ghc][wip/hadrian-cross-stage2] 2 commits: fail when bindist configure fails

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Fri Oct 6 11:36:25 UTC 2023



Matthew Pickering pushed to branch wip/hadrian-cross-stage2 at Glasgow Haskell Compiler / GHC


Commits:
b6410078 by GHC GitLab CI at 2023-10-06T11:36:06+00:00
fail when bindist configure fails

- - - - -
e8c6538d by GHC GitLab CI at 2023-10-06T11:36:06+00:00
Correctly propagate build/host/target to bindist

- - - - -


4 changed files:

- .gitlab/ci.sh
- configure.ac
- distrib/configure.ac.in
- m4/fptools_set_platform_vars.m4


Changes:

=====================================
.gitlab/ci.sh
=====================================
@@ -560,7 +560,7 @@ function install_bindist() {
 
       run ${CONFIGURE_WRAPPER:-} ./configure \
           --prefix="$instdir" \
-          "${args[@]+"${args[@]}"}"
+          "${args[@]+"${args[@]}"}" || fail "bindist configure failed"
       make_install_destdir "$TOP"/destdir "$instdir"
       ;;
   esac


=====================================
configure.ac
=====================================
@@ -286,6 +286,7 @@ if test "${WithGhc}" != ""
 then
         bootstrap_host=`"${WithGhc}" +RTS --info | grep '^ ,("Host platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'`
         bootstrap_target=`"${WithGhc}" +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'`
+	bootstrap_build="$bootstrap_host"
         if test "$bootstrap_host" != "$bootstrap_target"
         then
                 echo "Bootstrapping GHC is a cross compiler. This probably isn't going to work"


=====================================
distrib/configure.ac.in
=====================================
@@ -21,6 +21,8 @@ dnl * Deal with arguments telling us gmp is somewhere odd
 dnl--------------------------------------------------------------------
 
 dnl Various things from the source distribution configure
+bootstrap_build=@BuildPlatform@
+bootstrap_host=@HostPlatform@
 bootstrap_target=@TargetPlatform@
 
 bootstrap_llvm_target=@LlvmTarget@


=====================================
m4/fptools_set_platform_vars.m4
=====================================
@@ -77,9 +77,9 @@ dnl fi
 # compiler's target platform.
 AC_DEFUN([FPTOOLS_OVERRIDE_PLATFORM_FROM_BOOTSTRAP],
 [
-    if test "$bootstrap_target" != ""
+    if test "$bootstrap_$1" != ""
     then
-        $1=$bootstrap_target
+        $1=$bootstrap_$1
         echo "$1 platform inferred as: [$]$1"
     else
         echo "Can't work out $1 platform"



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/74ba41ddd2147f3e6aaf1cd2f2f2e7f3fb621f7f...e8c6538db02b9f463883902f5411066bd0944a20

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/74ba41ddd2147f3e6aaf1cd2f2f2e7f3fb621f7f...e8c6538db02b9f463883902f5411066bd0944a20
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/20231006/30e493e4/attachment-0001.html>


More information about the ghc-commits mailing list