diff mbox

[libjava] Support 64-bit multilib for i?86-linux

Message ID ydd62hkqs11.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Dec. 13, 2011, 5:51 p.m. UTC
This is the last patch necessary to have a full-blown
i686-unknown-linux-gnu --enable-targets=all configuration to work.  It
requires

	http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01011.html

and fixes a compilation failure compiling the 64-bit libgcj multilib:

$ /var/gcc/regression/trunk/2.6.18-gcc-gas-gld-32/build/./gcc/xgcc -shared-libgcc -B/var/gcc/regression/trunk/2.6.18-gcc-gas-gld-32/build/./gcc -nostdinc++ -L/var/gcc/regression/trunk/2.6.18-gcc-gas-gld-32/build/i686-unknown-linux-gnu/64/libstdc++-v3/src -L/var/gcc/regression/trunk/2.6.18-gcc-gas-gld-32/build/i686-unknown-linux-gnu/64/libstdc++-v3/src/.libs -B/vol/gcc/i686-unknown-linux-gnu/bin/ -B/vol/gcc/i686-unknown-linux-gnu/lib/ -isystem /vol/gcc/i686-unknown-linux-gnu/include -isystem /vol/gcc/i686-unknown-linux-gnu/sys-include -m64 -DHAVE_CONFIG_H -I. -I/vol/gcc/src/hg/trunk/local/libjava -I./include -I./gcj -I/vol/gcc/src/hg/trunk/local/libjava -Iinclude -I/vol/gcc/src/hg/trunk/local/libjava/include -I/vol/gcc/src/hg/trunk/local/libjava/classpath/include -Iclasspath/include -I/vol/gcc/src/hg/trunk/local/libjava/classpath/native/fdlibm -I/vol/gcc/src/hg/trunk/local/libjava/../boehm-gc/include -I../boehm-gc/include -I/vol/gcc/src/hg/trunk/local/libjava/libltdl -I/vol/gcc/src/hg/trunk/local/libjava/libltdl -I/vol/gcc/src/hg/trunk/local/libjava/.././libjava/../libgcc -I/vol/gcc/src/hg/trunk/local/libjava/../zlib -I/vol/gcc/src/hg/trunk/local/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enum -D_FILE_OFFSET_BITS=64 -ffloat-store -fomit-frame-pointer -Usun -Wextra -Wall -D_GNU_SOURCE -DPREFIX=\"/vol/gcc\" -DTOOLEXECLIBDIR=\"/vol/gcc/lib/../lib64\" -DJAVA_HOME=\"/vol/gcc\" -DBOOT_CLASS_PATH=\"/vol/gcc/share/java/libgcj-4.7.0.jar\" -DJAVA_EXT_DIRS=\"/vol/gcc/share/java/ext\" -DGCJ_ENDORSED_DIRS=\"/vol/gcc/share/java/gcj-endorsed\" -DGCJ_VERSIONED_LIBDIR=\"/vol/gcc/lib/../lib64/gcj-4.7.0-13\" -DPATH_SEPARATOR=\":\" -DECJ_JAR_FILE=\"\" -DLIBGCJ_DEFAULT_DATABASE=\"/vol/gcc/lib/../lib64/gcj-4.7.0-13/classmap.db\" -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL=\"gcj-4.7.0-13/classmap.db\" -fno-omit-frame-pointer -g -O2 -D_GNU_SOURCE -m64 -MT prims.lo -MD -MP -MF .deps/prims.Tpo -c /vol/gcc/src/hg/trunk/local/libjava/prims.cc  -fPIC -DPIC -o .libs/prims.o
/vol/gcc/src/hg/trunk/local/libjava/prims.cc: In function 'void _Jv_catch_fpe(int, siginfo_t*, void*)':
/vol/gcc/src/hg/trunk/local/libjava/prims.cc:192:3: error: 'REG_EIP' was not declared in this scope
/vol/gcc/src/hg/trunk/local/libjava/prims.cc:192:3: error: 'REG_EAX' was not declared in this scope
/vol/gcc/src/hg/trunk/local/libjava/prims.cc:192:3: error: 'REG_EDX' was not declared in this scope

It applies the same technique already used for the 32-bit multilib in
the x86_64-*-linux* configuration.

It allowed the i686-unknown-linux-gnu bootstrap to finish successfully
and bootstrapped without regressions on x86_64-unknown-linux-gnu.

Ok for mainline?

	Rainer


2011-12-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* configure.ac (i?86-*-linux*): Set SIGNAL_HANDLER_AUX.
	* configure: Regenerate.
	* include/i386-signal.h: Wrap in __i386__, include
	java-signal-aux.h otherwise.

Comments

Andrew Haley Dec. 13, 2011, 6:24 p.m. UTC | #1
On 12/13/2011 05:51 PM, Rainer Orth wrote:
> 2011-12-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	* configure.ac (i?86-*-linux*): Set SIGNAL_HANDLER_AUX.
> 	* configure: Regenerate.
> 	* include/i386-signal.h: Wrap in __i386__, include
> 	java-signal-aux.h otherwise.

OK, thanks.

Andrew.
diff mbox

Patch

diff --git a/libjava/configure.ac b/libjava/configure.ac
--- a/libjava/configure.ac
+++ b/libjava/configure.ac
@@ -1737,6 +1737,7 @@  case "${host}" in
     ;;
  i?86-*-linux*)
     SIGNAL_HANDLER=include/i386-signal.h
+    SIGNAL_HANDLER_AUX=include/x86_64-signal.h
     ;;
 # ia64-*)
 #    SYSDEP_SOURCES=sysdep/ia64.c
diff --git a/libjava/include/i386-signal.h b/libjava/include/i386-signal.h
--- a/libjava/include/i386-signal.h
+++ b/libjava/include/i386-signal.h
@@ -1,7 +1,8 @@ 
 // i386-signal.h - Catch runtime signals and turn them into exceptions
 // on an i386 based Linux system.
 
-/* Copyright (C) 1998, 1999, 2001, 2002, 2006, 2007  Free Software Foundation
+/* Copyright (C) 1998, 1999, 2001, 2002, 2006, 2007, 2011
+   Free Software Foundation
 
    This file is part of libgcj.
 
@@ -10,6 +11,8 @@  Libgcj License.  Please consult the file
 details.  */
 
 
+#ifdef __i386__
+
 #ifndef JAVA_SIGNAL_H
 #define JAVA_SIGNAL_H 1
 
@@ -165,3 +168,11 @@  while (0)
 
 #endif /* JAVA_SIGNAL_H */
   
+#else /* __i386__ */
+
+/* This is for the 64-bit subsystem on i386.  */
+
+#define sigcontext_struct sigcontext
+#include <java-signal-aux.h>
+
+#endif /* __i386__ */