This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Bug on Solaris 2.7 (no fabsf)
- To: java-discuss at sourceware dot cygnus dot com
- Subject: Bug on Solaris 2.7 (no fabsf)
- From: Martin Kahlert <martin dot kahlert at infineon dot com>
- Date: Thu, 11 Jan 2001 14:00:35 +0100
- Reply-To: martin dot kahlert at infineon dot com
Hi,
the math library of Solaris 2.7 doesn't contain fabsf.
I did this:
*** natMath.cc Sat Dec 2 01:28:44 2000
--- natMath_new.cc Thu Jan 11 13:46:36 2001
***************
*** 27,33 ****
#include "fdlibm.h"
! extern "C" float fabsf (float);
jdouble java::lang::Math::cos(jdouble x)
{
--- 27,35 ----
#include "fdlibm.h"
! #include <math.h>
!
! /* extern "C" float fabsf (float); */
jdouble java::lang::Math::cos(jdouble x)
{
***************
*** 96,102 ****
jfloat java::lang::Math::abs(jfloat x)
{
! return (jfloat)::fabsf((float)x);
}
jdouble java::lang::Math::rint(jdouble x)
--- 98,104 ----
jfloat java::lang::Math::abs(jfloat x)
{
! return (jfloat)::fabs((double)x);
}
jdouble java::lang::Math::rint(jdouble x)
And after this (and an added #include <locale.h> into natSystem.cc this compilation
script worked:
#!/bin/sh
prefix=/home/kahlert/GCC
PATH=${prefix}/bin:$PATH
export PATH
../configure --prefix=${prefix} --enable-languages=c++,f77,java --enable-threads=posix \
--enable-libstdcxx-v3 --disable-new-gxx-abi --with-gnu-as --with-gnu-ld
gmake
gmake install
Unfortunately the resulting gcj complains about an unknown encoding:
~/Hello: gcj -o main --main=hello hello.java
hello.java:0: unknown encoding: `646'
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
I hope, this report is helpful a bit,
Martin.
--
The early bird gets the worm. If you want something else for
breakfast, get up later.