[commit: ghc] master: Don't error on missing Perl, just warn and disable object splitting. (f07a6c1)

git at git.haskell.org git at git.haskell.org
Thu Jan 19 21:22:25 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/f07a6c17a3d6b32cc64b0b8318a05177fc098630/ghc

>---------------------------------------------------------------

commit f07a6c17a3d6b32cc64b0b8318a05177fc098630
Author: Demi Obenour <demiobenour at gmail.com>
Date:   Thu Jan 19 16:18:30 2017 -0500

    Don't error on missing Perl, just warn and disable object splitting.
    
    Summary:
    If Perl isn't needed, we don't need to error out.  Since all Perl is
    used for is the splitter, we can just warn.
    
    Test Plan: GHC CI
    
    Reviewers: bgamari, hvr, austin
    
    Reviewed By: bgamari
    
    Subscribers: thomie, erikd
    
    Differential Revision: https://phabricator.haskell.org/D2986
    
    GHC Trac Issues: #13141


>---------------------------------------------------------------

f07a6c17a3d6b32cc64b0b8318a05177fc098630
 configure.ac | 32 ++++++++------------------------
 1 file changed, 8 insertions(+), 24 deletions(-)

diff --git a/configure.ac b/configure.ac
index b3d2e17..4502c53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -399,24 +399,6 @@ FP_CURSES
 
 XCODE_VERSION()
 
-SplitObjsBroken=NO
-if test "$TargetOS_CPP" = "darwin"
-then
-    # Split objects is broken (#4013) with XCode < 3.2
-    if test "$XCodeVersion1" -lt 3
-    then
-        SplitObjsBroken=YES
-    else
-        if test "$XCodeVersion1" -eq 3
-        then
-            if test "$XCodeVersion2" -lt 2
-            then
-                SplitObjsBroken=YES
-            fi
-        fi
-    fi
-fi
-AC_SUBST([SplitObjsBroken])
 
 dnl ** Building a cross compiler?
 dnl --------------------------------------------------------------
@@ -600,23 +582,25 @@ AC_SUBST([GhcLibsWithUnix])
 dnl ** does #! work?
 AC_SYS_INTERPRETER()
 
+# Check for split-objs
+SplitObjsBroken=NO
 dnl ** look for `perl'
 case $HostOS_CPP in
 cygwin32|mingw32)
-    PerlCmd=$hardtop/inplace/perl/perl
-    ;;
+  PerlCmd=$hardtop/inplace/perl/perl
+  ;;
 *)
-    AC_PATH_PROG(PerlCmd,perl)
+    AC_PATH_PROG([PerlCmd],[perl])
     if test -z "$PerlCmd"
     then
-        echo "You must install perl before you can continue"
-        echo "Perhaps it is already installed, but not in your PATH?"
-        exit 1
+        AC_MSG_WARN([No Perl on PATH, disabling split object support])
+        SplitObjsBroken=YES
     else
         FPTOOLS_CHECK_PERL_VERSION
     fi
     ;;
 esac
+AC_SUBST([SplitObjsBroken])
 
 dnl ** look for GCC and find out which version
 dnl     Figure out which C compiler to use.  Gcc is preferred.



More information about the ghc-commits mailing list