]> gitweb @ CieloNegro.org - pkgsrc-ghc.git/blobdiff - patches/patch-configure
GHC 7.0.3 for powerpc-apple-darwin. It looks fully working, including GHCi!
[pkgsrc-ghc.git] / patches / patch-configure
diff --git a/patches/patch-configure b/patches/patch-configure
new file mode 100644 (file)
index 0000000..c30ee25
--- /dev/null
@@ -0,0 +1,68 @@
+$NetBSD$
+
+HC bootstrapping has bitrotted further. The original ./configure tries
+to use stage-0 GHC even when --enable-hc-boot is given.
+
+
+--- configure.orig     2011-03-26 18:10:47.000000000 +0000
++++ configure
+@@ -3626,6 +3626,8 @@ checkArch "$TargetArch"
+ checkVendor "$TargetVendor"
+ checkOS "$TargetOS"
++if test "${WithGhc}" != ""
++then
+ # Verify that the installed (bootstrap) GHC is capable of generating
+ # code for the requested build platform.
+ if test "$build" != "$bootstrap_target"
+@@ -3635,7 +3637,7 @@ then
+     echo "   Desired build platform : $BuildPlatform"
+     exit 1
+ fi
+-
++fi
+@@ -3757,6 +3759,8 @@ fi
+ # This uses GHC, so put it after the "GHC is required" check above:
++if ! test -x "utils/ghc-pwd/dist-boot/ghc-pwd"
++then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Building in-tree ghc-pwd" >&5
+ $as_echo "$as_me: Building in-tree ghc-pwd" >&6;}
+                 rm -rf utils/ghc-pwd/dist-boot
+@@ -3765,6 +3769,7 @@ $as_echo "$as_me: Building in-tree ghc-p
+     then
+         as_fn_error "Building ghc-pwd failed" "$LINENO" 5
+     fi
++fi
+     GHC_PWD=utils/ghc-pwd/dist-boot/ghc-pwd
+@@ -6255,7 +6260,7 @@ fi
+ if test -n "$DtraceCmd"; then
+-  if test "x$TargetOS_CPP-$TargetVendor_CPP" == "xdarwin-apple" -o "x$TargetOS_CPP-$TargetVendor_CPP" == "xsolaris2-unknown"; then
++  if test "x$TargetOS_CPP-$TargetVendor_CPP" = "xdarwin-apple" -o "x$TargetOS_CPP-$TargetVendor_CPP" = "xsolaris2-unknown"; then
+     HaveDtrace=YES
+   fi
+ fi
+@@ -6581,6 +6586,7 @@ $as_echo "$as_me: WARNING: cannot find h
+ fi
++if test "$BootingFromHc" = "NO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ghc-pkg matching $WithGhc" >&5
+ $as_echo_n "checking for ghc-pkg matching $WithGhc... " >&6; }
+ if test "${fp_cv_matching_ghc_pkg+set}" = set; then :
+@@ -6602,6 +6608,7 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fp_cv_matching_ghc_pkg" >&5
+ $as_echo "$fp_cv_matching_ghc_pkg" >&6; }
+ GhcPkgCmd=$fp_cv_matching_ghc_pkg
++fi