This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

[Fwd: GCJ and ARM-ELF not cross compilable to native code]




-------- Original Message --------
Subject: 	GCJ and ARM-ELF not cross compilable to native code
Date: 	Fri, 8 Jul 2005 11:00:13 +0200
From: 	mdeuli@et-inf.fho-emden.de
To: 	bgat@billgatliff.com



GCJ and ARM-ELF not cross compilable to native code

Hello,

we compiled and installed gcj for i686 not cross. It worked fine.
We compiled and installed gcj for arm-elf cross. It produced .class-files.

We were not able to compile and install gcj for arm-elf cross to produce native
code.

We checked different combinations of versions of gcc, gcc-core, newlib and
binutils.

The "newest" combination that works is
binutils-2.14
gcc-3.3.1 with gcc-core-3.3.1
newlib-1.11

For building we used the script found at
http://www.zingo.org/handheld/build-crossgcc.sh originally by Bill Gatliff.
We received the following error message when compiling gcc-3.3.1 for arm as
cross producing native:

...
ava/.././libjava/../gcc -I../../../../gcc-3.3.1/libjava/../zlib -fno-rtti
-fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enum -I/usr/X11/include
-W -Wall -D_GNU_SOURCE -DPREFIX=\"/home/mdeuli/armgcc2/arm-elf\" -g -O2 -mthumb
-MD -MT java/io/natFile.lo -MF java/io/natFile.pp -c java/io/natFile.cc -o
java/io/natFile.o
java/io/natFile.cc: In member function `jboolean
  java::io::File::_access(__java_int)':
java/io/natFile.cc:54: error: `::access' undeclared (first use here)
java/io/natFile.cc: In member function `virtual java::lang::String*
  java::io::File::getCanonicalPath()':
java/io/natFile.cc:111: warning: unused variable `char buf2[((MAXPATHLEN - 1) +
  1)]'
java/io/natFile.cc: In member function `JArray<java::lang::Object*>*
  java::io::File::performList(java::io::FilenameFilter*,
  java::io::FileFilter*, java::lang::Class*)':
java/io/natFile.cc:142: warning: unused parameter `
  java::io::FilenameFilter*filter'
java/io/natFile.cc:142: warning: unused parameter `
  java::io::FileFilter*fileFilter'
java/io/natFile.cc:142: warning: unused parameter `
  java::lang::Class*result_type'
java/io/natFile.cc: In member function `jboolean
  java::io::File::performSetLastModified(__java_long)':
java/io/natFile.cc:261: warning: unused parameter `jlong time'
java/io/natFile.cc: In member function `jboolean
  java::io::File::performCreate()':
java/io/natFile.cc:294: error: `::close' undeclared (first use here)
java/io/natFile.cc: In member function `jboolean
  java::io::File::performDelete()':
...


We checked different scripts and compiler versions until gcc-4.0.0. The above mentioned combination is the one that proceeded furtherest.

Building gcc-core succeeded so we now have a arm-elf-gcj cross compiler without
libgcj. We tried
to compile java source using this cross compiler and a libgcj-3.3.4.jar using
--CLASSPATH.

That produced following error message:

user@host:~/gcjtest> ~/armgcc2/armelf4/bin/arm-elf-gcj
--CLASSPATH=./libgcj-3.3.4.jar -shared --main=Test Test.java -o Test
/home/mdeuli/armgcc2/armelf4/bin/../lib/gcc/arm-elf/3.4.4/../../../../arm-elf/lib/crt0.o:
In function `start':
: undefined reference to `memset'
/home/mdeuli/armgcc2/armelf4/bin/../lib/gcc/arm-elf/3.4.4/../../../../arm-elf/lib/crt0.o:
In function `start':
: undefined reference to `initialise_monitor_handles'
/home/mdeuli/armgcc2/armelf4/bin/../lib/gcc/arm-elf/3.4.4/../../../../arm-elf/lib/crt0.o:
In function `start':
: undefined reference to `exit'
/tmp/cc2flY8E.o: In function `main':
cckq7EG0.i:(.text+0x30): undefined reference to `JvRunMain'
cckq7EG0.i:(.text+0x40): undefined reference to `_Jv_Compiler_Properties'
/tmp/ccINY1tl.o: In function `Test::main(JArray<java::lang::String*>*)':
Test.java:(.text+0x38): undefined reference to `_Jv_InitClass'
Test.java:(.text+0x4c): undefined reference to `_Jv_InitClass'
Test.java:(.text+0xa0): undefined reference to `java::lang::System::class$'
Test.java:(.text+0xa8): undefined reference to `java::lang::System::out'
/tmp/ccINY1tl.o: In function `Test::Test()':
Test.java:(.text+0xcc): undefined reference to `java::lang::Object::Object()'
/tmp/ccINY1tl.o:(.data+0x38): undefined reference to
`java::lang::Object::finalize()'
/tmp/ccINY1tl.o:(.data+0x3c): undefined reference to
`java::lang::Object::hashCode()'
/tmp/ccINY1tl.o:(.data+0x40): undefined reference to
`java::lang::Object::equals(java::lang::Object*)'
/tmp/ccINY1tl.o:(.data+0x44): undefined reference to
`java::lang::Object::toString()'
/tmp/ccINY1tl.o:(.data+0x48): undefined reference to
`java::lang::Object::clone()'
/tmp/ccINY1tl.o:(.data+0x70): undefined reference to `vtable for
java::lang::Class'
/tmp/ccINY1tl.o:(.data+0x84): undefined reference to
`java::lang::Object::class$'
collect2: ld returned 1 exit status

We need native arm-elf code produced by gcj.
Does anyone know a solution to really produce that code ?


Greetings Markus


---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.



--
Bill Gatliff
bgat@billgatliff.com

It could have been an organically based disturbance of the brain --
perhaps a tumor or a metabolic deficiency -- but after a thorough
neurological exam it was determined that Byron was simply a jerk.
 -- Jeff Jahnke, runner-up
    7th Annual Bulwer-Lytton Bad Writing Contest


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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