On 2015-12-15 19:52, James Cowgill wrote: > Hi, > > On Tue, 2015-12-15 at 12:42 +0100, Aurelien Jarno wrote: > > OpenJDK 8 doesn't compile with GCC 5 on mips, presumably due to the > > switch to the FPXX ABI [1]: > > > > > /bin/bash ../../../../libtool --mode=compile mipsel-linux-gnu-gcc-5 -DHAVE_CONFIG_H -I. -I../../../../../jamvm/src/os/linux/mips -I../../../../src -I../../../../src -D_FORTIFY_SOURCE=2 -I../../../../src -g -fstack-protector-strong -Wformat -Werror=format-security -O3 -MT callNative.lo -MD -MP -MF .deps/callNative.Tpo -c -o callNative.lo ../../../../../jamvm/src/os/linux/mips/callNative.S > > > libtool: compile: mipsel-linux-gnu-gcc-5 -DHAVE_CONFIG_H -I. -I../../../../../jamvm/src/os/linux/mips -I../../../../src -I../../../../src -D_FORTIFY_SOURCE=2 -I../../../../src -g -fstack-protector-strong -Wformat -Werror=format-security -O3 -MT callNative.lo -MD -MP -MF .deps/callNative.Tpo -c ../../../../../jamvm/src/os/linux/mips/callNative.S -fPIC -DPIC -o .libs/callNative.o > > > ../../../../../jamvm/src/os/linux/mips/callNative.S: Assembler messages: > > > ../../../../../jamvm/src/os/linux/mips/callNative.S:161: Error: float register should be even, was 1 > > > Makefile:298: recipe for target 'callNative.lo' failed > > > > It is now built again with GCC 4.9, but we will eventually need to build > > it with GCC 5. Therefore if someone has time to look at it, it would be > > nice to provide patch. > > I've attached a completely and utterly untested patch which might > work... > Thanks for the patch. The only concern with this patch is that it increases the alignment requirement of a double from 32-bit from 64-bit. OTOH, it's what the ABI requires. > diff -u -ur a/src/os/linux/mips/callNative.S b/src/os/linux/mips/callNative.S > --- a/src/os/linux/mips/callNative.S 2012-05-17 22:01:47.000000000 +0100 > +++ b/src/os/linux/mips/callNative.S 2015-12-15 19:46:03.679022719 +0000 > @@ -157,8 +157,7 @@ > > ret_double: > #ifdef __mips_hard_float > - swc1 $f0,0($8) > - swc1 $f1,4($8) > + sdc1 $f0,0($8) > addu $8,8 > j return > #endif I have tried to build openjdk-8 with this patch on mipsel. It builds fine and I haven't seen any regression in the testsuite. Matthias, could you please add this patch in the next openjdk-8 upload and switch again to GCC 5? Note that mipsel is currently still trying to use GCC 5 due to a typo in the debian/rules file. Thanks, Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net
Attachment:
signature.asc
Description: PGP signature