This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix libjava failure on powerpc64-linux
On Tue, Feb 10, 2004 at 11:41:34AM +0000, Andrew Haley wrote:
> Alan Modra writes:
> > I finally found out why powerpc64 libjava tests were failing (See
> > http://gcc.gnu.org/ml/gcc-patches/2004-01/msg02462.html), and would have
> > a lot sooner if the sigaction syscall return value had been checked.
> > The powerpc64 linux kernel only provides a sigaction call for 32 bit
> > processes, something I wasn't aware of. 64 bit processes are supposed
> > to use rt_sigaction, so the syscall didn't manage to install a handler.
> >
> > gcc/ChangeLog
> > * config/rs6000/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Don't
> > bump retaddr here.
> >
> > libjava/ChangeLog
> > * include/powerpc-signal.h: Revert 2004-01-21 change.
> > (INIT_SEGV, INIT_FPE): Provide powerpc64 versions. Check return
> > from syscall for ppc32 versions.
> >
> > Regtested powerpc64-linux. OK mainline and 3.4?
>
> Thanks. What were the libgcj test results?
All passed except for FAIL: linking simple, which was there before.
The log shows:
simple.java: In class `simple':
simple.java: In method `simple.main(java.lang.String[])':
simple.java:5: internal compiler error: Segmentation fault
While if I compile and run the test by hand:
$ CLASSPATH=.. /home/alan/build/ppc/gcc64-curr/powerpc64-linux/libjava/testsuite/../libtool --tag=GCJ --mode=link /home/alan/build/ppc/gcc64-curr/gcc/gcj -B/home/alan/build/ppc/gcc64-curr/gcc/ --encoding=UTF-8 -B/home/alan/build/ppc/gcc64-curr/powerpc64-linux/./libjava/ /src/gcc-current/libjava/testsuite/libjava.jar/simple.jar -no-install --main=simple -g -L/home/alan/build/ppc/gcc64-curr/powerpc64-linux/./libjava/.libs -lm -o simple
/home/alan/build/ppc/gcc64-curr/gcc/gcj -B/home/alan/build/ppc/gcc64-curr/gcc/ --encoding=UTF-8 -B/home/alan/build/ppc/gcc64-curr/powerpc64-linux/./libjava/ /src/gcc-current/libjava/testsuite/libjava.jar/simple.jar --main=simple -g -o simple -L/home/alan/build/ppc/gcc64-curr/powerpc64-linux/./libjava/.libs -lm
$ LD_LIBRARY_PATH=../.libs:../../../gcc ./simple
hi
$
A bit of a worry, but then, this is mainline..
> Can we not use rt_sigaction for both 32- and 64-bit processes?
Yes. Hmm, maybe not. Early 2.x kernels supported ppc32 but didn't have
rt_sigaction.
--
Alan Modra
IBM OzLabs - Linux Technology Centre