This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] testsuite fix for math tests on darwin


Hi,

darwin has some C99 math functions in the libmx instead of libm, so we should add the -lmx to the tests where we need these functions.
The attached patch fixes three failures of the libstdc++ suite.
Unfortunately I did not find the cabsl in libmx.


Ok for main?

Andreas

2004-06-06 Andreas Tobler <a.tobler@schweiz.ch>

	* testsuite/26_numerics/c_math_dynamic.cc: Add -lmx for C99 functions
	on target darwin.
	* testsuite/26_numerics/complex_value.cc: Likewise.
	* testsuite/26_numerics/complex/pow.cc: Likewise.

Index: testsuite/26_numerics/c_math_dynamic.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/26_numerics/c_math_dynamic.cc,v
retrieving revision 1.2
diff -u -r1.2 c_math_dynamic.cc
--- testsuite/26_numerics/c_math_dynamic.cc	23 Sep 2003 20:02:52 -0000	1.2
+++ testsuite/26_numerics/c_math_dynamic.cc	6 Jun 2004 13:15:18 -0000
@@ -29,6 +29,7 @@
 
 // { dg-do link }
 // { dg-options "-D_XOPEN_SOURCE" { target *-*-freebsd* } }
+// { dg-options "-lmx" { target powerpc-apple-darwin7* } }
 
 #include <cmath>
 
Index: testsuite/26_numerics/complex_value.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/26_numerics/complex_value.cc,v
retrieving revision 1.6
diff -u -r1.6 complex_value.cc
--- testsuite/26_numerics/complex_value.cc	4 Mar 2004 23:29:41 -0000	1.6
+++ testsuite/26_numerics/complex_value.cc	6 Jun 2004 13:15:18 -0000
@@ -20,6 +20,8 @@
 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 // USA.
 
+// { dg-options "-lmx" { target powerpc-apple-darwin7* } }
+
 #include <complex>
 #include <testsuite_hooks.h>
 
Index: testsuite/26_numerics/complex/pow.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/26_numerics/complex/pow.cc,v
retrieving revision 1.1
diff -u -r1.1 pow.cc
--- testsuite/26_numerics/complex/pow.cc	10 Mar 2004 09:16:12 -0000	1.1
+++ testsuite/26_numerics/complex/pow.cc	6 Jun 2004 13:15:18 -0000
@@ -1,5 +1,6 @@
 // PR libbstdc++/10689
 // Origin: Daniel.Levine@jhuaph.edu
+// { dg-options "-lmx" { target powerpc-apple-darwin7* } }
 
 #include <complex>
 #include <testsuite_hooks.h>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]