← Back to team overview

openjdk team mailing list archive

Re: OpenJDK 8 & GCC 5

 

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...

James
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

Attachment: signature.asc
Description: This is a digitally signed message part