public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [libjava] Support 64-bit multilib for i?86-linux
@ 2011-12-13 17:51 Rainer Orth
  2011-12-13 18:25 ` Andrew Haley
  0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2011-12-13 17:51 UTC (permalink / raw)
  To: gcc-patches; +Cc: java-patches

[-- Attachment #1: Type: text/plain, Size: 3234 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: linx86-libgcj64.patch --]
[-- Type: text/x-patch, Size: 1176 bytes --]

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__ */

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [libjava] Support 64-bit multilib for i?86-linux
  2011-12-13 17:51 [libjava] Support 64-bit multilib for i?86-linux Rainer Orth
@ 2011-12-13 18:25 ` Andrew Haley
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Haley @ 2011-12-13 18:25 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches, java-patches

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-13 18:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-13 17:51 [libjava] Support 64-bit multilib for i?86-linux Rainer Orth
2011-12-13 18:25 ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).