Commit e605c3e8 authored by ian@well-typed.com's avatar ian@well-typed.com

Simplify BOOTSTRAPPING_GHC_INFO_FIELD

All supported bootstrapping compilers now have --info output,
so we can use that unconditionally.
parent ea301fa1
......@@ -1857,21 +1857,14 @@ case "$1" in
# BOOTSTRAPPING_GHC_INFO_FIELD
# --------------------------------
# If the bootstrapping compiler is >= 7.1, then set the variable
# $1 to the value of the ghc --info field $2. Otherwise, set it to
# $3.
# Set the variable $1 to the value of the ghc --info field $2.
AC_DEFUN([BOOTSTRAPPING_GHC_INFO_FIELD],[
if test $GhcCanonVersion -ge 701
$1=`"$WithGhc" --info | grep "^ ,(\"$2\"," | sed -e 's/.*","//' -e 's/")$//'`
tmp=${$1#\$topdir/}
if test "${$1}" != "$tmp"
then
$1=`"$WithGhc" --info | grep "^ ,(\"$2\"," | sed -e 's/.*","//' -e 's/")$//'`
tmp=${$1#\$topdir/}
if test "${$1}" != "$tmp"
then
topdir=`"$WithGhc" --print-libdir | sed 's#\\\\#/#g'`
$1="$topdir/$tmp"
fi
else
$1=$3
topdir=`"$WithGhc" --print-libdir | sed 's#\\\\#/#g'`
$1="$topdir/$tmp"
fi
AC_SUBST($1)
])
......
......@@ -131,12 +131,12 @@ if test "$WithGhc" != ""; then
GhcMinVersion2=`echo "$GhcMinVersion" | sed 's/^\\(.\\)$/0\\1/'`
GhcCanonVersion="$GhcMajVersion$GhcMinVersion2"
BOOTSTRAPPING_GHC_INFO_FIELD([OS_STAGE0],[target os],['unkown'])
BOOTSTRAPPING_GHC_INFO_FIELD([CC_STAGE0],[C compiler command],['$(CC)'])
BOOTSTRAPPING_GHC_INFO_FIELD([OS_STAGE0],[target os])
BOOTSTRAPPING_GHC_INFO_FIELD([CC_STAGE0],[C compiler command])
if test "x$OS_STAGE0" != "xOSDarwin"; then
BOOTSTRAPPING_GHC_INFO_FIELD([AR_STAGE0],[ar command],['$(AR)'])
BOOTSTRAPPING_GHC_INFO_FIELD([AR_OPTS_STAGE0],[ar flags],['$(AR_OPTS)'])
BOOTSTRAPPING_GHC_INFO_FIELD([ArSupportsAtFile_STAGE0],[ar supports at file],['$(ArSupportsAtFile)'])
BOOTSTRAPPING_GHC_INFO_FIELD([AR_STAGE0],[ar command])
BOOTSTRAPPING_GHC_INFO_FIELD([AR_OPTS_STAGE0],[ar flags])
BOOTSTRAPPING_GHC_INFO_FIELD([ArSupportsAtFile_STAGE0],[ar supports at file])
else
AR_STAGE0='$(AR)'
AR_OPTS_STAGE0='$(AR_OPTS)'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment