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: Add Newlib effective-target, XFAIL libstdc++ test


This patch adds an effective target keyword for Newlib, as we already
have for uClibc.  The first application is to XFAIL
c99_classification_amcros_c.cc in the libstdc++ testsuite, which fails
because Newlib defines isgreater() as a macro in <math.h>.  (This same
issue applies to uClibc and GLIBC targets, apparently.)

I plan to commit this in 24 hours, if there are no objections.

--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

2007-02-22  Mark Mitchell  <mark@codesourcery.com>

	* testsuite/26_numerics/cmath/c99_classification_macros_c.cc:
	XFAIL for Newlib targets.

2007-02-22  Mark Mitchell  <mark@codesourcery.com>

	* lib/target-supports.exp (check_effective_target_newlib): New
	function.

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	(revision 163611)
+++ gcc/testsuite/lib/target-supports.exp	(working copy)
@@ -1615,6 +1615,14 @@ proc check_effective_target_uclibc {} {
     }]
 }
 
+# Return true if this is a Newlib target.
+
+proc check_effective_target_newlib {} {
+    return [check_no_compiler_messages newlib object {
+	#include <newlib.h>
+    }]
+}
+
 # Return 1 if
 #   (a) this is a uClibc target; and
 #   (a) an error of a few ULP is expected in string to floating-point
Index: libstdc++-v3/testsuite/26_numerics/cmath/c99_classification_macros_c.cc
===================================================================
--- libstdc++-v3/testsuite/26_numerics/cmath/c99_classification_macros_c.cc	(revision 163611)
+++ libstdc++-v3/testsuite/26_numerics/cmath/c99_classification_macros_c.cc	(working copy)
@@ -27,8 +27,8 @@
 // invalidate any other reasons why the executable file might be covered by
 // the GNU General Public License.
 
-// { dg-do compile { xfail { { *-*-linux* *-*-darwin* } || uclibc } } }
-// { dg-excess-errors "" { target { { *-*-linux* *-*-darwin* } || uclibc } } }
+// { dg-do compile { xfail { { *-*-linux* *-*-darwin* } || { uclibc || newlib } } } }
+// { dg-excess-errors "" { target { { *-*-linux* *-*-darwin* } || { uclibc || newlib } } } }
 
 #include <math.h>
 


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