public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kai Ruottu <kai.ruottu@wippies.com>
To: Mao Ito <mito2@wisc.edu>
Cc: gcc@gcc.gnu.org
Subject: Re: About ARM-cross-compile
Date: Wed, 11 Apr 2012 08:00:00 -0000	[thread overview]
Message-ID: <4F8539FB.7060104@wippies.com> (raw)
In-Reply-To: <76f09f692093.4f7657e5@wiscmail.wisc.edu>

30.3.2012 19:03, Mao Ito kirjoitti:

> I got stuck on a problem.
> Actually, I could install "arm-eabi" cross-compiler for c, c++.
> The problem is about "arm-eabi-gcj" (i.e. for Java). "arm-elf" version
 > cross-compiler was successfully installed for c, c++, Java. But,
 > after that, I realized that my simulator does not accept OABI
 > binary code (i.e. binary code "arm-elf" compiler generates).
 > So, I need to install "arm-eabi" version cross-compiler because
 > the simulator can accept EABI binary code.
>
> So, recently, I was struggling to install "arm-eabi-gcj" into my
 > laptop. The problem is about "libgcj.jar" file.

Usually people don't build java for their compiler collection, only C
and C++, when the target is an embedded system like '*-elf' or your
chosen 'arm-eabi'. So these cases may be fully or somehow unsupported
:-(

Usually the problem isn't in getting '$target-gcj' or 'jc1' at all!
So your first claim, 'problem is about "arm-eabi-gcj"', sounds
untrue, this and the real Java compiler 'jc1' should succeed easily.
But using them to create 'libjava' ('--enable-libgcj') may be a big
problem and your second claim is more believable...

If looking at your "libjava arm-eabi" case via net search, the:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32340

will appear. For curiosity I looked how well the recent gcc-4.6.3
works with the arm-eabi target. Some of the suggested fixes must
still be installed and producing 'libffi' enabled (compiling libjava
needs 'ffi.h', the only way was to fix 'configure' and remove
'target-libffi' from 'nonconfigdirs' in the 'arm-eabi' case). But
after these fixes the build still stopped at :

libtool: compile:  /home/src/gcc-4.6.3/build/./gcc/xgcc -shared-libgcc 
-B/home/src/gcc-4.6.3/build/./gcc -nostdinc++ 
-L/home/src/gcc-4.6.3/build/arm-eabi/libstdc++-v3/src 
-L/home/src/gcc-4.6.3/build/arm-eabi/libstdc++-v3/src/.libs -nostdinc 
-B/home/src/gcc-4.6.3/build/arm-eabi/newlib/ -isystem 
/home/src/gcc-4.6.3/build/arm-eabi/newlib/targ-include -isystem 
/home/src/gcc-4.6.3/newlib/libc/include 
-B/home/src/gcc-4.6.3/build/arm-eabi/libgloss/arm 
-L/home/src/gcc-4.6.3/build/arm-eabi/libgloss/libnosys 
-L/home/src/gcc-4.6.3/libgloss/arm -B/opt/cross/arm-eabi/bin/ 
-B/opt/cross/arm-eabi/lib/ -isystem /opt/cross/arm-eabi/include -isystem 
/opt/cross/arm-eabi/sys-include -DHAVE_CONFIG_H -I. -I../../../libjava 
-I./include -I./gcj -I../../../libjava -Iinclude 
-I../../../libjava/include -I../../../libjava/classpath/include 
-Iclasspath/include -I../../../libjava/classpath/native/fdlibm 
-I../../../libjava/../boehm-gc/include -I../boehm-gc/include 
-I../../../libjava/.././libjava/../gcc -I../../../libjava/../zlib 
-fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enum 
-D_FILE_OFFSET_BITS=64 -Wextra -Wall -D_GNU_SOURCE 
-DPREFIX=\"/opt/cross\" 
-DTOOLEXECLIBDIR=\"/opt/cross/lib/gcc/arm-eabi/4.6.3\" 
-DJAVA_HOME=\"/opt/cross\" 
-DBOOT_CLASS_PATH=\"/opt/cross/share/java/libgcj-4.6.3.jar\" 
-DJAVA_EXT_DIRS=\"/opt/cross/share/java/ext\" 
-DGCJ_ENDORSED_DIRS=\"/opt/cross/share/java/gcj-endorsed\" 
-DGCJ_VERSIONED_LIBDIR=\"/opt/cross/lib/gcj-4.6.3-12\" 
-DPATH_SEPARATOR=\":\" -DECJ_JAR_FILE=\"\" 
-DLIBGCJ_DEFAULT_DATABASE=\"/opt/cross/lib/gcj-4.6.3-12/classmap.db\" 
-DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL=\"gcj-4.6.3-12/classmap.db\" -g -Os 
-MT java/net/natVMInetAddress.lo -MD -MP -MF 
java/net/.deps/natVMInetAddress.Tpo -c java/net/natVMInetAddress.cc -o 
java/net/natVMInetAddress.o
java/net/natVMInetAddress.cc:12:1: error: 'jstring' does not name a type
java/net/natVMInetAddress.cc:18:1: error: 'jbyteArray' does not name a type
java/net/natVMInetAddress.cc:24:1: error: 'jstring' does not name a type
java/net/natVMInetAddress.cc:30:1: error: 'JArray' does not name a type
java/net/natVMInetAddress.cc:36:1: error: 'jbyteArray' does not name a type
make[3]: *** [java/net/natVMInetAddress.lo] Virhe 1
make[3]: Poistutaan hakemistosta 
"/home/src/gcc-4.6.3/build/arm-eabi/libjava"

My interest ended here :-(  Continuing from this could be your
homework...

With gcc-4.7.0 the situation could be even worse :

/bin/bash ../../libtool --tag=CC   --mode=compile 
/home/src/gcc-4.7.0/build/./gcc/xgcc -B/home/src/gcc-4.7.0/build/./gcc/ 
-nostdinc -B/home/src/gcc-4.7.0/build/arm-eabi/newlib/ -isystem 
/home/src/gcc-4.7.0/build/arm-eabi/newlib/targ-include -isystem 
/home/src/gcc-4.7.0/newlib/libc/include 
-B/home/src/gcc-4.7.0/build/arm-eabi/libgloss/arm 
-L/home/src/gcc-4.7.0/build/arm-eabi/libgloss/libnosys 
-L/home/src/gcc-4.7.0/libgloss/arm -B/opt/cross/arm-eabi/bin/ 
-B/opt/cross/arm-eabi/lib/ -isystem /opt/cross/arm-eabi/include -isystem 
/opt/cross/arm-eabi/sys-include    -DHAVE_CONFIG_H -I. 
-I../../../../../../libjava/classpath/native/fdlibm -I../../include 
-fexceptions -fasynchronous-unwind-tables -g -Os -MT dtoa.lo -MD -MP -MF 
.deps/dtoa.Tpo -c -o dtoa.lo 
../../../../../../libjava/classpath/native/fdlibm/dtoa.c
libtool: compile: not configured to build any kind of library
libtool: compile: See the libtool documentation for more information.
libtool: compile: Fatal configuration error.
make[5]: *** [dtoa.lo] Virhe 1

> I could download "libgcj-4.1.2-51.el5.x86_64.rpm" from this web-site
> The problem is that this is RPM file so that I need to get
 > "RPM-GPG-KEY" for this rpm file to unlock it.

How the previous is related to getting the Java toolchain for
'arm-eabi'?  Seemingly one can compile an existing '.jar' file
(some target-independent bytecode?) for some specific architecture
with its own '$target-gcj'. Here the goal could be compiling a
libgcj made for Linux/x86_64 for 'arm-eabi'?  I would expect a
'libgcj' made for some target being very target-dependent and
not a '.jar' file at all :-(

      reply	other threads:[~2012-04-11  8:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7740cb0e388e.4f75d63d@wiscmail.wisc.edu>
     [not found] ` <779095a81e23.4f75d6b6@wiscmail.wisc.edu>
     [not found]   ` <7750c79d54c4.4f75d6f2@wiscmail.wisc.edu>
     [not found]     ` <76f0823d7ee4.4f75d72f@wiscmail.wisc.edu>
     [not found]       ` <7740ec137866.4f75d76b@wiscmail.wisc.edu>
     [not found]         ` <7750862741a4.4f75d7a8@wiscmail.wisc.edu>
     [not found]           ` <7700f10752fc.4f75d7e4@wiscmail.wisc.edu>
     [not found]             ` <7790d1a67e8c.4f75d821@wiscmail.wisc.edu>
     [not found]               ` <76f0ed17c7.4f75d85e@wiscmail.wisc.edu>
     [not found]                 ` <772099264fd7.4f75d89a@wiscmail.wisc.edu>
     [not found]                   ` <7780fabd1db0.4f75d8d7@wiscmail.wisc.edu>
     [not found]                     ` <7780b82c72af.4f75d913@wiscmail.wisc.edu>
     [not found]                       ` <7780d01759db.4f75d950@wiscmail.wisc.edu>
2012-03-30 16:04                         ` Mao Ito
2012-04-11  8:00                           ` Kai Ruottu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F8539FB.7060104@wippies.com \
    --to=kai.ruottu@wippies.com \
    --cc=gcc@gcc.gnu.org \
    --cc=mito2@wisc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).