[PATCH] libstdc++ detect libmx for darwin C99 functions

Andrew Pinski pinskia@physics.uc.edu
Fri Apr 23 17:30:00 GMT 2004


On Darwin the C99 math functions are in a library called libmx
(Do not ask me why).

This patch detects the library and gets rid of most of the need
of libmath in libstdc++.


OK? Bootstrapped on powerpc-apple-darwin7.3.0, powerpc-apple-darwin6.8,
and i686-pc-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:
	* linkage.m4 (GLIBCXX_CHECK_MATH_SUPPORT): Check for libmx also.

Patch:
Index: linkage.m4
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/linkage.m4,v
retrieving revision 1.2.2.5
diff -u -p -r1.2.2.5 linkage.m4
--- linkage.m4	4 Mar 2004 15:40:42 -0000	1.2.2.5
+++ linkage.m4	23 Apr 2004 17:26:17 -0000
@@ -404,6 +404,11 @@ AC_DEFUN([GLIBCXX_CHECK_MATH_SUPPORT], [
    ac_save_LIBS="$LIBS"
    LIBS="$LIBS $libm"

+  dnl Check libmx
+  AC_CHECK_LIB(mx, sqrtf, libmx="-lmx")
+  dnl ac_save_LIBS="$LIBS"
+  LIBS="$LIBS $libmx"
+
    dnl Check to see if certain C math functions exist.
    GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(isinf)
    GLIBCXX_CHECK_MATH_DECL_AND_LINKAGE_1(isnan)

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix.libmx.txt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20040423/7e47ffb1/attachment.txt>


More information about the Libstdc++ mailing list