Skip to content
Snippets Groups Projects
Commit f64f44e9 authored by John Ericson's avatar John Ericson Committed by Marge Bot
Browse files

Split libm check between top level and RTS

parent f399812c
No related branches found
No related tags found
No related merge requests found
......@@ -951,15 +951,9 @@ dnl Keep that check as early as possible.
dnl as we need to know whether we need libm
dnl for math functions or not
dnl (see https://gitlab.haskell.org/ghc/ghc/issues/3730)
AC_CHECK_LIB(m, atan, HaveLibM=YES, HaveLibM=NO)
if test $HaveLibM = YES
then
AC_DEFINE([HAVE_LIBM], [1], [Define to 1 if you need to link with libm])
AC_SUBST([UseLibm],[YES])
else
AC_SUBST([UseLibm],[NO])
fi
TargetHasLibm=$HaveLibM
AC_CHECK_LIB(m, atan, UseLibm=YES, UseLibm=NO)
AC_SUBST([UseLibm])
TargetHasLibm=$UseLibm
AC_SUBST(TargetHasLibm)
FP_BFD_FLAG
......
......@@ -33,6 +33,15 @@ GHC_CONVERT_PLATFORM_PARTS([host], [Host])
FPTOOLS_SET_PLATFORM_VARS([host], [Host])
FPTOOLS_SET_HASKELL_PLATFORM_VARS([Host])
dnl ** check for math library
dnl Keep that check as early as possible.
dnl as we need to know whether we need libm
dnl for math functions or not
dnl (see https://gitlab.haskell.org/ghc/ghc/issues/3730)
AS_IF(
[test "$CABAL_FLAG_libm" = 1],
[AC_DEFINE([HAVE_LIBM], [1], [Define to 1 if you need to link with libm])])
AS_IF([test "$CABAL_FLAG_libbfd" = 1], [FP_WHEN_ENABLED_BFD])
dnl ################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment