This is the mail archive of the
java-prs@sourceware.cygnus.com
mailing list for the Java project.
Re: libgcj/226: Fails to compile: "implicit declaration of function`int __builtin_expect(...)"
- To: tromey at cygnus dot com
- Subject: Re: libgcj/226: Fails to compile: "implicit declaration of function`int __builtin_expect(...)"
- From: "Gregory R. Warnes" <warnes at biostat dot washington dot edu>
- Date: 18 May 2000 22:00:00 -0000
- Cc: java-prs at sourceware dot cygnus dot com,
- Reply-To: "Gregory R. Warnes" <warnes at biostat dot washington dot edu>
The following reply was made to PR libgcj/226; it has been noted by GNATS.
From: "Gregory R. Warnes" <warnes@biostat.washington.edu>
To: Tom Tromey <tromey@cygnus.com>
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: libgcj/226: Fails to compile: "implicit declaration of function
`int __builtin_expect(...)"
Date: Thu, 18 May 2000 21:54:24 +0000 (GMT)
Just to save time, the relevant portion of the libc configure script is
----begin quote----
echo $ac_n "checking for __builtin_expect""... $ac_c" 1>&6
echo "configure:2845: checking for __builtin_expect" >&5
if eval "test \"`echo '$''{'libc_cv_gcc_builtin_expect'+set}'`\" =
set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
#line 2850 "configure"
int foo (int a)
{
a = __builtin_expect (a, 10);
return a == 10 ? 0 : 1;
}
EOF
if { ac_try='${CC-cc} $CFLAGS -nostdlib -nostartfiles
-o conftest conftest.c -lgcc >&5'; { (eval
echo configure:2858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_builtin_expect=yes
else
libc_cv_gcc_builtin_expect=no
fi
rm -f conftest*
fi
echo "$ac_t""$libc_cv_gcc_builtin_expect" 1>&6
if test "$libc_cv_gcc_builtin_expect" = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_BUILTIN_EXPECT 1
EOF
fi
----end quote----
On Thu, 18 May 2000, Tom Tromey wrote:
TT>> >>>>> "Gregory" == Gregory R Warnes <warnes@biostat.washington.edu> writes:
TT>>
TT>> Gregory> It would probably be a good idea to add an autoconf test for
TT>> Gregory> __builtin_expect .
TT>>
TT>> I agree, and that's what I'm planning to do.
TT>> I might be able to get to it today.
TT>> We'll see. It depends on how my current project goes.
TT>>
TT>> Tom
TT>>