Re: Solved: libstdc++ problem with recent CURRENT

2002-05-30 Thread Martin Blapp


hi Peter,

> To be sure we're all on the same page, simply uncommenting stubs.c solves
> your problem with no libm changes, right?

Exactly.

Martin


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Solved: libstdc++ problem with recent CURRENT

2002-05-30 Thread Peter Wemm

Martin Blapp wrote:
> If we add this patch, we should also add the bits in libm:
> 
> #ifndef HAVE_SQRTL
> long double
> sqrtl(long double x)
> {
>   return  sqrt((double) x);
> }
> #endif
[..]
> or we just compile stubs.c in and the gcc provided bits.
> But I guess we would also not to link against libm then.
> 
> root@fuchur:/usr/src# diff -ruN gnu/lib/libstdc++/Makefile.orig
> gnu/lib/libstdc++/Makefile
> --- gnu/lib/libstdc++/Makefile.orig Thu May 30 23:35:38 2002
> +++ gnu/lib/libstdc++/Makefile  Thu May 30 23:32:19 2002
> @@ -32,7 +32,7 @@
> valarray-inst.cc ext-inst.cc
> 
>  # C parts of math
> -SRCS+= nan.c signbit.c signbitf.c signbitl.c # stubs.c
> +SRCS+= nan.c signbit.c signbitf.c signbitl.c stubs.c
> 
>  # Embedded copy of libsupc++
>  SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc \
> 
> But now it's working ...

You know, I think I'd rather activate the stubs.c file than patch libm.
If libm is going to provide real "long double" functions, then it should
provide real ones, not faked lower precision ones.

stubs.c fills in the blanks for the parts that libm doesn't provide,
according to config.h.  We can even add ifdefs to the config.h file if we
have some arches that provide the long double versions and others that do
not.

To be sure we're all on the same page, simply uncommenting stubs.c solves
your problem with no libm changes, right?

Cheers,
-Peter
--
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Solved: libstdc++ problem with recent CURRENT

2002-05-30 Thread Martin Blapp


Seems I was wrong. Uhm. It's late here... Anyway, I've really
running it now.

If we add this patch, we should also add the bits in libm:

#ifndef HAVE_SQRTL
long double
sqrtl(long double x)
{
  return  sqrt((double) x);
}
#endif

#ifndef HAVE_COSL
long double
cosl(long double x)
{
  return cos((double) x);
}
#endif

#ifndef HAVE_SINL
long double
sinl(long double x)
{
  return sin((double) x);
}
#endif

or we just compile stubs.c in and the gcc provided bits.
But I guess we would also not to link against libm then.

root@fuchur:/usr/src# diff -ruN gnu/lib/libstdc++/Makefile.orig
gnu/lib/libstdc++/Makefile
--- gnu/lib/libstdc++/Makefile.orig Thu May 30 23:35:38 2002
+++ gnu/lib/libstdc++/Makefile  Thu May 30 23:32:19 2002
@@ -32,7 +32,7 @@
valarray-inst.cc ext-inst.cc

 # C parts of math
-SRCS+= nan.c signbit.c signbitf.c signbitl.c # stubs.c
+SRCS+= nan.c signbit.c signbitf.c signbitl.c stubs.c

 # Embedded copy of libsupc++
 SRCS+= del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc \

But now it's working ...

root@fuchur:/usr/src/gnu/lib/libstdc++# nm /usr/lib/libstdc++.a | grep cosl
002a T cosl
root@fuchur:/usr/src/gnu/lib/libstdc++# nm /usr/lib/libstdc++.a | grep sqrtl
016c T sqrtl
root@fuchur:/usr/src/gnu/lib/libstdc++# nm /usr/lib/libstdc++.a | grep sinl
0134 T sinl

Martin Blapp, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
--
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 061 826 93 00: +41 61 826 93 01
PGP: 
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
--



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Solved: libstdc++ problem with recent CURRENT

2002-05-30 Thread Martin Blapp


http://people.freebsd.org/~mbr/patches/patch-libstd++::config.h

This patch fixes the problem.

--- gnu/lib/libstdc++/c++config.h.orig  Wed May 29 02:45:51 2002
+++ gnu/lib/libstdc++/c++config.h   Thu May 30 22:49:07 2002
@@ -420,7 +420,7 @@
 /* #undef _GLIBCPP_HAVE_COSHL */

 /* Define if you have the cosl function.  */
-/* #undef _GLIBCPP_HAVE_COSL */
+#define _GLIBCPP_HAVE_COSL 1

 /* Define if you have the drand48 function.  */
 #define _GLIBCPP_HAVE_DRAND48 1
@@ -612,13 +612,13 @@
 /* #undef _GLIBCPP_HAVE_SINHL */

 /* Define if you have the sinl function.  */
-/* #undef _GLIBCPP_HAVE_SINL */
+#define _GLIBCPP_HAVE_SINL 1

 /* Define if you have the sqrtf function.  */
 #define _GLIBCPP_HAVE_SQRTF 1

 /* Define if you have the sqrtl function.  */
-/* #undef _GLIBCPP_HAVE_SQRTL */
+#define _GLIBCPP_HAVE_SQRTL 1

 /* Define if you have the strtof function.  */
 /* #undef _GLIBCPP_HAVE_STRTOF */
--- gnu/lib/libstdc++/config.h.orig Fri May 10 10:54:42 2002
+++ gnu/lib/libstdc++/config.h  Thu May 30 22:45:01 2002
@@ -343,7 +343,7 @@
 /* #undef HAVE_COSHL */

 /* Define if you have the cosl function.  */
-/* #undef HAVE_COSL */
+#define HAVE_COSL 1

 /* Define if you have the drand48 function.  */
 #define HAVE_DRAND48 1
@@ -535,13 +535,13 @@
 /* #undef HAVE_SINHL */

 /* Define if you have the sinl function.  */
-/* #undef HAVE_SINL */
+#define HAVE_SINL 1

 /* Define if you have the sqrtf function.  */
 #define HAVE_SQRTF 1

 /* Define if you have the sqrtl function.  */
-/* #undef HAVE_SQRTL */
+#define HAVE_SQRTL 1

 /* Define if you have the strtof function.  */
 /* #undef HAVE_STRTOF */

Martin

Martin Blapp, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
--
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 061 826 93 00: +41 61 826 93 01
PGP: 
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
--


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message