Magellan Linux

Annotation of /trunk/ghc/patches/ghc-6.12.2-libm-detection.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1041 - (hide annotations) (download)
Wed May 5 16:59:42 2010 UTC (14 years, 1 month ago) by niro
File size: 1791 byte(s)
patches for ghc

1 niro 1041 Fri Dec 4 23:40:12 EET 2009 Sergei Trofimovich <slyfox@inbox.ru>
2     * configure.ac: fix libm checks (Trac #3730)
3    
4     libbfd pulled libm as dependency and broke LIBM= detection.
5    
6     Patch moves libm in library tests as early as possible.
7     Thanks to asuffield for suggesting such a simple fix.
8     Thanks to Roie Kerstein and Renato Gallo for finding
9     and tracking down the issue.
10    
11     http://bugs.gentoo.org/show_bug.cgi?id=293208
12     http://hackage.haskell.org/trac/ghc/ticket/3730
13     diff -rN -u old-ghc/configure.ac new-ghc/configure.ac
14     --- old-ghc/configure.ac 2009-12-04 23:51:06.135605014 +0200
15     +++ new-ghc/configure.ac 2009-12-04 23:51:06.344604339 +0200
16     @@ -713,18 +713,22 @@
17     AC_DEFINE([HAVE_MINGWEX], [1], [Define to 1 if you have the mingwex library.])
18     fi
19    
20     -dnl ** check whether this machine has BFD and liberty installed (used for debugging)
21     -dnl the order of these tests matters: bfd needs liberty
22     -AC_CHECK_LIB(iberty, xmalloc)
23     -AC_CHECK_LIB(bfd, bfd_init)
24     -
25     dnl ** check for math library
26     +dnl Keep that check as early as possible.
27     +dnl as we need to know whether we need libm
28     +dnl for math functions or not
29     +dnl (see http://hackage.haskell.org/trac/ghc/ticket/3730)
30     AC_CHECK_FUNC(atan,[fp_libm_not_needed=yes;LIBM=],[fp_libm_not_needed=dunno])
31     if test x"$fp_libm_not_needed" = xdunno; then
32     AC_CHECK_LIB([m], [atan], [LIBS="-lm $LIBS"; LIBM="-lm"],[LIBM=])
33     fi
34     AC_SUBST([LIBM])
35    
36     +dnl ** check whether this machine has BFD and liberty installed (used for debugging)
37     +dnl the order of these tests matters: bfd needs liberty
38     +AC_CHECK_LIB(iberty, xmalloc)
39     +AC_CHECK_LIB(bfd, bfd_init)
40     +
41     dnl ################################################################
42     dnl Check for libraries
43     dnl ################################################################