This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

4.0.2/4.1 PATCH: Support amd64 libffi on Solaris 10/x86


Building mainline (or the 4.0 branch) on Solaris 10/x86 with amd64 support,
I noticed that amd64 binaries with libjava failed to link, e.g.

Undefined			first referenced
 symbol  			    in file
ffi_prep_raw_closure                ./.libs/libgcj.so
ffi_prep_cif_machdep                ./.libs/libgcj.so
ffi_call                            ./.libs/libgcj.so
ffi_raw_call                        ./.libs/libgcj.so
ld: fatal: Symbol referencing errors. No output written to .libs/grmiregistry
collect2: ld returned 1 exit status
make[5]: *** [grmiregistry] Error 1

This happens because the i386-pc-solaris2.10 configuration with -m64
doesn't define __i386__, but only __x86_64__, so it must be handled as
x86-64.  The following trivial patch does this and causes the libffi
testsuite to (almost) successfully pass both for -m32 and -m64:

		=== libffi tests ===


Running target unix

		=== libffi Summary for unix ===

# of expected passes		219
# of unsupported tests		2

Running target unix/-m64
FAIL: libffi.special/unwindtest.cc execution test

		=== libffi Summary for unix/-m64 ===

# of expected passes		217
# of unexpected failures	1
# of unsupported tests		2

		=== libffi Summary ===

# of expected passes		436
# of unexpected failures	1
# of unsupported tests		4

Bootstrapped without regressions on i386-pc-solaris2.10 (both 4.0 branch
and mainline).  Ok for mainline and the 4.0 branch once it reopens?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Mon Jun  6 20:34:55 2005  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* configure.ac: Treat i*86-*-solaris2.10 and up as X86_64.
	* configure: Regenerate.
	
Index: libffi/configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/libffi/configure.ac,v
retrieving revision 1.14
diff -u -p -r1.14 configure.ac
--- libffi/configure.ac	18 May 2005 01:49:40 -0000	1.14
+++ libffi/configure.ac	6 Jun 2005 14:27:23 -0000
@@ -42,6 +42,7 @@ AM_CONDITIONAL(TESTSUBDIR, test -d $srcd
 TARGETDIR="unknown"
 case "$host" in
 i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
+i*86-*-solaris2.1[[0-9]]*) TARGET=X86_64; TARGETDIR=x86;;
 i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
 i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
 i*86-*-freebsd* | i*86-*-kfreebsd*-gnu) TARGET=X86; TARGETDIR=x86;;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]