Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
f30908b6
Commit
f30908b6
authored
Nov 20, 2004
by
panne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[project @ 2004-11-20 16:02:41 by panne]
Pushed -fomit-frame-pointer test down to ghc subdir + cleanup
parent
054725a0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
58 deletions
+107
-58
aclocal.m4
aclocal.m4
+18
-44
configure.ac
configure.ac
+8
-12
distrib/configure-bin.ac
distrib/configure-bin.ac
+1
-2
ghc/aclocal.m4
ghc/aclocal.m4
+67
-0
ghc/configure.ac
ghc/configure.ac
+13
-0
No files found.
aclocal.m4
View file @
f30908b6
...
...
@@ -490,52 +490,26 @@ fi
rm -f conftest
])])
dnl
dnl Extra testing of the result AC_PROG_CC, testing the gcc version no.
dnl *Must* be called after AC_PROG_CC
dnl
AC_DEFUN(FPTOOLS_HAVE_GCC,
[AC_CACHE_CHECK([whether you have an ok gcc], fptools_cv_have_gcc,
# FP_HAVE_GCC
# -----------
# Extra testing of the result AC_PROG_CC, testing the gcc version no. Sets the
# output variables HaveGcc and GccVersion.
AC_DEFUN([FP_HAVE_GCC],
[AC_REQUIRE([AC_PROG_CC])
AC_CACHE_CHECK([whether your gcc is OK], [fp_cv_have_gcc],
[if test -z "$GCC"; then
echo ''
echo "You would be better off with gcc"
echo "Perhaps it is already installed, but not in your PATH?"
fptools_cv_have_gcc='no'
fp_cv_have_gcc='no'
AC_MSG_WARN([You would be better off with gcc, perhaps it is already installed, but not in your PATH?])
else
changequote(, )dnl
gcc_version_str="`$CC -v 2>&1 | grep 'version ' | sed -e 's/.*version [^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1\.\2/g' `"
changequote([, ])dnl
fptools_cv_have_gcc='yes'
FP_COMPARE_VERSIONS([$gcc_version_str], [-lt], [2.0],
[fptools_cv_have_gcc='no'
echo ""
echo "your gcc version appears to be ..."
$CC --version
echo "gcc prior to 2.0 and have never worked with ghc."
echo "we recommend 2.95.3, although versions back to 2.7.2 should be ok."
AC_MSG_ERROR([gcc 1.X has never been supported])])
fi
])
HaveGcc=`echo $fptools_cv_have_gcc | sed 'y/yesno/YESNO/'`
AC_SUBST(HaveGcc)
GccVersion=`gcc --version | grep mingw | cut -f 3 -d ' '`
AC_SUBST(GccVersion)
])
dnl
dnl Some OSs (Mandrake Linux, in particular) configure GCC with
dnl -momit-leaf-frame-pointer on by default. If this is the case, we
dnl need to turn it off for mangling to work. The test is currently a bit
dnl crude, using only the version number of gcc.
dnl
AC_DEFUN([FPTOOLS_GCC_NEEDS_NO_OMIT_LFPTR],
[AC_CACHE_CHECK([whether gcc needs -mno-omit-leaf-frame-pointer], [fptools_cv_gcc_needs_no_omit_lfptr],
[FP_COMPARE_VERSIONS([$gcc_version_str], [-ge], [3.2],
[fptools_cv_gcc_needs_no_omit_lfptr=yes],
[fptools_cv_gcc_needs_no_omit_lfptr=no])])
if test "$fptools_cv_gcc_needs_no_omit_lfptr" = "yes"; then
AC_DEFINE([HAVE_GCC_MNO_OMIT_LFPTR], [1], [Define to 1 if gcc supports -mno-omit-leaf-frame-pointer.])
fi])# FPTOOLS_GCC_NEEDS_NO_OMIT_LFPTR
fp_cv_have_gcc='yes'
gcc_version_str="`$CC -v 2>&1 | grep 'version ' | sed -e 's/.*version [[^0-9]]*\([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\).*/\1\.\2/g' `"
FP_COMPARE_VERSIONS([$gcc_version_str], [-lt], [2.0],
[AC_MSG_ERROR([Need at least gcc version 2.0 (2.95.3 recommend)])])
fi])
AC_SUBST([HaveGcc], [`echo $fp_cv_have_gcc | sed 'y/yesno/YESNO/'`])
AC_SUBST([GccVersion], [`gcc --version | grep mingw | cut -f 3 -d ' '`])
])# FP_HAVE_GCC
dnl Small feature test for perl version. Assumes PerlCmd
...
...
configure.ac
View file @
f30908b6
...
...
@@ -578,17 +578,15 @@ dnl use either is considered a Feature.
dnl ** What command to use to compile compiler sources ?
dnl --------------------------------------------------------------
AC_ARG_WITH(
ghc
,
AC_ARG_WITH(
[ghc]
,
[AC_HELP_STRING([--with-ghc=ARG],
[Use ARG as the path to GHC [default=autodetect]])],
[ WithGhc="$withval" ],
[
if test "$GHC" = ""; then
AC_PATH_PROG(GHC,ghc)
[Use ARG as the path to GHC [default=autodetect]])],
[WithGhc="$withval"],
[if test "$GHC" = ""; then
AC_PATH_PROG([GHC], [ghc])
fi
WithGhc=$GHC
])
AC_SUBST(WithGhc)
WithGhc="$GHC"])
AC_SUBST([WithGhc])
AC_ARG_WITH(hc,
[AC_HELP_STRING([--with-hc=ARG],
...
...
@@ -819,9 +817,7 @@ dnl ** look for GCC and find out which version
dnl Figure out which C compiler to use. Gcc is preferred.
dnl If gcc, make sure it's at least 2.1
dnl
AC_PROG_CC
FPTOOLS_HAVE_GCC
FPTOOLS_GCC_NEEDS_NO_OMIT_LFPTR
FP_HAVE_GCC
dnl ** figure out how to invoke cpp directly (gcc -E is no good)
AC_PROG_CPP
...
...
distrib/configure-bin.ac
View file @
f30908b6
...
...
@@ -121,8 +121,7 @@ AC_PATH_PROG(SedCmd,sed)
#
dnl ** How to invoke cpp directly **
#
AC_PROG_CC
FPTOOLS_HAVE_GCC
FP_HAVE_GCC
AC_PROG_CPP
#
...
...
ghc/aclocal.m4
View file @
f30908b6
...
...
@@ -58,3 +58,70 @@ else
fi])
AC_SUBST([GhcHasReadline], [`echo $fp_cv_ghc_has_readline | sed 'y/yesno/YESNO/'`])
])# FP_GHC_HAS_READLINE
# FP_COMPARE_VERSIONS(VERSION1, TEST, VERSION2, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
# ----------------------------------------------------------------------------------
# Compare dotted version numbers VERSION1 and VERSION2 lexicographically according
# to TEST (one of -eq, -ne, -lt, -le, -gt, or -ge).
AC_DEFUN([FP_COMPARE_VERSIONS],
[fp_version1=$1; fp_version2=$3
fp_save_IFS=$IFS; IFS='.'
while test x"$fp_version1" != x || test x"$fp_version2" != x
do
set dummy $fp_version1; shift
fp_num1=""
test $[@%:@] = 0 || { fp_num1="[$]1"; shift; }
test x"$fp_num1" = x && fp_num1="0"
fp_version1="[$]*"
set dummy $fp_version2; shift
fp_num2=""
test $[@%:@] = 0 || { fp_num2="[$]1"; shift; }
test x"$fp_num2" = x && fp_num2="0"
fp_version2="[$]*"
test "$fp_num1" = "$fp_num2" || break;
done
IFS=$fp_save_IFS
AS_IF([test "$fp_num1" $2 "$fp_num2"], [$4], [$5])[]dnl
])# FP_COMPARE_VERSIONS
# FP_HAVE_GCC
# -----------
# Extra testing of the result AC_PROG_CC, testing the gcc version no. Sets the
# output variables HaveGcc and GccVersion.
AC_DEFUN([FP_HAVE_GCC],
[AC_REQUIRE([AC_PROG_CC])
AC_CACHE_CHECK([whether your gcc is OK], [fp_cv_have_gcc],
[if test -z "$GCC"; then
fp_cv_have_gcc='no'
AC_MSG_WARN([You would be better off with gcc, perhaps it is already installed, but not in your PATH?])
else
fp_cv_have_gcc='yes'
gcc_version_str="`$CC -v 2>&1 | grep 'version ' | sed -e 's/.*version [[^0-9]]*\([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\).*/\1\.\2/g' `"
FP_COMPARE_VERSIONS([$gcc_version_str], [-lt], [2.0],
[AC_MSG_ERROR([Need at least gcc version 2.0 (2.95.3 recommend)])])
fi])
AC_SUBST([HaveGcc], [`echo $fp_cv_have_gcc | sed 'y/yesno/YESNO/'`])
AC_SUBST([GccVersion], [`gcc --version | grep mingw | cut -f 3 -d ' '`])
])# FP_HAVE_GCC
# FP_GCC_NEEDS_NO_OMIT_LFPTR
# --------------------------
# Some OSs (Mandrake Linux, in particular) configure GCC with
# -momit-leaf-frame-pointer on by default. If this is the case, we need to turn
# it off for mangling to work. The test is currently a bit crude, using only the
# version number of gcc. Defines HAVE_GCC_MNO_OMIT_LFPTR.
AC_DEFUN([FP_GCC_NEEDS_NO_OMIT_LFPTR],
[AC_REQUIRE([FP_HAVE_GCC])
AC_CACHE_CHECK([whether gcc needs -mno-omit-leaf-frame-pointer], [fp_cv_gcc_needs_no_omit_lfptr],
[FP_COMPARE_VERSIONS([$gcc_version_str], [-ge], [3.2],
[fp_cv_gcc_needs_no_omit_lfptr=yes],
[fp_cv_gcc_needs_no_omit_lfptr=no])])
if test "$fp_cv_gcc_needs_no_omit_lfptr" = "yes"; then
AC_DEFINE([HAVE_GCC_MNO_OMIT_LFPTR], [1], [Define to 1 if gcc supports -mno-omit-leaf-frame-pointer.])
fi])# FP_GCC_NEEDS_NO_OMIT_LFPTR
ghc/configure.ac
View file @
f30908b6
...
...
@@ -2,11 +2,24 @@
AC_INIT([The Glorious Glasgow Haskell Compilation System], [6.3], [glasgow-haskell-bugs@haskell.org], [ghc])
AC_CONFIG_SRCDIR([ghc.spec.in])
# duplicate from ../configure.ac
AC_ARG_WITH([ghc],
[AC_HELP_STRING([--with-ghc=ARG],
[Use ARG as the path to GHC [default=autodetect]])],
[WithGhc="$withval"],
[if test "$GHC" = ""; then
AC_PATH_PROG([GHC], [ghc])
fi
WithGhc="$GHC"])
AC_SUBST([WithGhc])
FP_SETUP_PROJECT_INFO
# Hmmm, we fix the RPM release number to 1 here... Is this convenient?
AC_SUBST([release], [1])
FP_GCC_NEEDS_NO_OMIT_LFPTR
# Check whether this GHC has readline installed
FP_GHC_HAS_READLINE
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment