[patch] testsuite fix for math tests on darwin
Andrew Pinski
pinskia@physics.uc.edu
Wed Jun 9 16:49:00 GMT 2004
>
>
> >This was basically discussed recently: someone (at Apple) needs to
> >fix the gcc driver on Darwin so that it passes -lmx automatically
> >to the linker. Ortherwise, we get nth annoying instances of the same problem.
>
> Yes, I agree.
>
> It looks, however, that some of this has already crept in.
>
> less linkage.m4
>
> dnl Check libmx
> AC_CHECK_LIB(mx, sqrtf, libmx="-lmx")
> dnl ac_save_LIBS="$LIBS"
> LIBS="$LIBS $libmx"
>
> It would be nice to have this done one way.
That is still needed unless just as -lm check above is needed.
No the testsuite failures are coming from the fact the dejgnu adds
-lm to the link line which causes g++ not to add -lmx because there
is a check in the driver for -lmx when there should not be as this
would not be constaint with gfortran and would be bad behavior where
on other targets where the MATH_LIBRARY was named different also.
So this patch which removes that check for -lm and also removes it for
-lmath, these look like they were done before MATH_LIBRARY was around
so they become redundent.
Bootstrapped on powerpc-apple-darwin with no regressions and those test
cases passes now.
Thanks,
Andrew Pinski
ChangeLog:
* g++spec.c (lang_specific_driver): Remove check for -lm
and -lmath when check it see if it was the math library.
Patch:
Index: g++spec.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/g++spec.c,v
retrieving revision 1.41
diff -u -p -r1.41 g++spec.c
--- g++spec.c 4 Dec 2003 06:07:03 -0000 1.41
+++ g++spec.c 9 Jun 2004 16:40:47 -0000
@@ -136,10 +136,7 @@ lang_specific_driver (int *in_argc, cons
{
library = -1;
}
- else if (strcmp (argv[i], "-lm") == 0
- || strcmp (argv[i], "-lmath") == 0
- || strcmp (argv[i], MATH_LIBRARY) == 0
- )
+ else if (strcmp (argv[i], MATH_LIBRARY) == 0)
{
args[i] |= MATHLIB;
need_math = 0;
More information about the Libstdc++
mailing list