public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Advice on compiling GCJ for ARM
@ 2010-09-21  3:17 Josh Marinacci
  2010-09-21  8:55 ` Andrew Haley
  0 siblings, 1 reply; 7+ messages in thread
From: Josh Marinacci @ 2010-09-21  3:17 UTC (permalink / raw)
  To: java

I've been trying off and on for a week to build a GCJ compiler for webOS, a Linux variant on ARM, with very little success.  On the bright side I've started to learn more about how the GCC build system works. :) My host machine is Mac OSX 10.6.4, Snow Leopard. I've been able to get GCJ for Mac OSX (darwin) working (though with a few issues), but I can't the cross compiler to even finish compiling.


So my first question is really just a request for advice:  what version of GCC should I start with? Which one is likely to give me the most success? Recent 4.5 builds?  

Second, should I be using glibc or newlib?  

Thanks for any help. If there's already some prebuilt GCJ for ARM binaries I'm willing to try those as well.

Thanks!
	Josh

Blasting forth in three part harmony!

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

* Re: Advice on compiling GCJ for ARM
  2010-09-21  3:17 Advice on compiling GCJ for ARM Josh Marinacci
@ 2010-09-21  8:55 ` Andrew Haley
  2010-09-21 14:18   ` Josh Marinacci
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Haley @ 2010-09-21  8:55 UTC (permalink / raw)
  To: Josh Marinacci; +Cc: java

On 21/09/10 04:14, Josh Marinacci wrote:

> I've been trying off and on for a week to build a GCJ compiler for
> webOS, a Linux variant on ARM, with very little success.  On the
> bright side I've started to learn more about how the GCC build
> system works. :) My host machine is Mac OSX 10.6.4, Snow
> Leopard. I've been able to get GCJ for Mac OSX (darwin) working
> (though with a few issues), but I can't the cross compiler to even
> finish compiling.

Works for me.  You have to build with the right options.  My setup is

  $ /home/aph/gcc/gcc-4_5-branch/configure --prefix=/home/aph/x-arm/install --target=arm-linux-gnueabi --with-sysroot=/home/aph/x-arm/rootfs-f12/ --with-headers=/home/aph/x-arm/chroot-arm/usr/include/ -disable-libssp --disable-libgomp --disable-libmudflap --disable-multilib --disable-static --disable-sjlj-exceptions --enable-languages=java

> So my first question is really just a request for advice: what
> version of GCC should I start with? Which one is likely to give me
> the most success? Recent 4.5 builds?
> 
> Second, should I be using glibc or newlib?  

glibc.

Andrew.

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

* Re: Advice on compiling GCJ for ARM
  2010-09-21  8:55 ` Andrew Haley
@ 2010-09-21 14:18   ` Josh Marinacci
  2010-09-22  8:09     ` Andrew Haley
  0 siblings, 1 reply; 7+ messages in thread
From: Josh Marinacci @ 2010-09-21 14:18 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java


On Sep 21, 2010, at 4:55 AM, Andrew Haley wrote:

> On 21/09/10 04:14, Josh Marinacci wrote:
> 
>> I've been trying off and on for a week to build a GCJ compiler for
>> webOS, a Linux variant on ARM, with very little success.  On the
>> bright side I've started to learn more about how the GCC build
>> system works. :) My host machine is Mac OSX 10.6.4, Snow
>> Leopard. I've been able to get GCJ for Mac OSX (darwin) working
>> (though with a few issues), but I can't the cross compiler to even
>> finish compiling.
> 
> Works for me.  You have to build with the right options.  My setup is
> 
>  $ /home/aph/gcc/gcc-4_5-branch/configure --prefix=/home/aph/x-arm/install --target=arm-linux-gnueabi --with-sysroot=/home/aph/x-arm/rootfs-f12/ --with-headers=/home/aph/x-arm/chroot-arm/usr/include/ -disable-libssp --disable-libgomp --disable-libmudflap --disable-multilib --disable-static --disable-sjlj-exceptions --enable-languages=java

what version of gcc & glibc are you using?

> 
>> So my first question is really just a request for advice: what
>> version of GCC should I start with? Which one is likely to give me
>> the most success? Recent 4.5 builds?
>> 
>> Second, should I be using glibc or newlib?  
> 
> glibc.
> 
> Andrew.

Blasting forth in three part harmony!

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

* Re: Advice on compiling GCJ for ARM
  2010-09-21 14:18   ` Josh Marinacci
@ 2010-09-22  8:09     ` Andrew Haley
  2010-09-22 15:05       ` Josh Marinacci
  2010-09-22 18:51       ` Dr Andrew John Hughes
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Haley @ 2010-09-22  8:09 UTC (permalink / raw)
  To: Josh Marinacci; +Cc: java

On 21/09/10 15:18, Josh Marinacci wrote:
> 
> On Sep 21, 2010, at 4:55 AM, Andrew Haley wrote:
> 
>> On 21/09/10 04:14, Josh Marinacci wrote:
>>
>>> I've been trying off and on for a week to build a GCJ compiler for
>>> webOS, a Linux variant on ARM, with very little success.  On the
>>> bright side I've started to learn more about how the GCC build
>>> system works. :) My host machine is Mac OSX 10.6.4, Snow
>>> Leopard. I've been able to get GCJ for Mac OSX (darwin) working
>>> (though with a few issues), but I can't the cross compiler to even
>>> finish compiling.
>>
>> Works for me.  You have to build with the right options.  My setup is
>>
>>  $ /home/aph/gcc/gcc-4_5-branch/configure --prefix=/home/aph/x-arm/install --target=arm-linux-gnueabi --with-sysroot=/home/aph/x-arm/rootfs-f12/ --with-headers=/home/aph/x-arm/chroot-arm/usr/include/ -disable-libssp --disable-libgomp --disable-libmudflap --disable-multilib --disable-static --disable-sjlj-exceptions --enable-languages=java
> 
> what version of gcc

4.5 branch: more or less 4.5.1.

> & glibc are you using?

Hmmm, dunno.  Whatever is in Fedora 12: glibc-2.11.2-1.

Andrew.

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

* Re: Advice on compiling GCJ for ARM
  2010-09-22  8:09     ` Andrew Haley
@ 2010-09-22 15:05       ` Josh Marinacci
  2010-09-23 12:02         ` Andrew Haley
  2010-09-22 18:51       ` Dr Andrew John Hughes
  1 sibling, 1 reply; 7+ messages in thread
From: Josh Marinacci @ 2010-09-22 15:05 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

> 4.5 branch: more or less 4.5.1.
> 
>> & glibc are you using?
> 
> Hmmm, dunno.  Whatever is in Fedora 12: glibc-2.11.2-1.

Ah, so you are compiling against a premade glibc for your target OS. That was the part I was missing.  Last night I finally got it to work by compiling just binutils & gcc 4.5.1 w/ gmp, mpc, &  mpfr linked in.  I can now create a hello world app that runs on the real device, using static linking.  Dynamic linking still fails, though. When I copy the lib directory to the device, change LD_LIBRARY_PATH to point to it, then run the dynamically linked executable it complains that the lib elf is the wrong version.  So something is still wonky, but I'm very happy to have gotten this far.

- Josh


Blasting forth in three part harmony!

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

* Re: Advice on compiling GCJ for ARM
  2010-09-22  8:09     ` Andrew Haley
  2010-09-22 15:05       ` Josh Marinacci
@ 2010-09-22 18:51       ` Dr Andrew John Hughes
  1 sibling, 0 replies; 7+ messages in thread
From: Dr Andrew John Hughes @ 2010-09-22 18:51 UTC (permalink / raw)
  To: Andrew Haley; +Cc: Josh Marinacci, java

On 22 September 2010 09:09, Andrew Haley <aph@redhat.com> wrote:
> On 21/09/10 15:18, Josh Marinacci wrote:
>>
>> On Sep 21, 2010, at 4:55 AM, Andrew Haley wrote:
>>
>>> On 21/09/10 04:14, Josh Marinacci wrote:
>>>
>>>> I've been trying off and on for a week to build a GCJ compiler for
>>>> webOS, a Linux variant on ARM, with very little success.  On the
>>>> bright side I've started to learn more about how the GCC build
>>>> system works. :) My host machine is Mac OSX 10.6.4, Snow
>>>> Leopard. I've been able to get GCJ for Mac OSX (darwin) working
>>>> (though with a few issues), but I can't the cross compiler to even
>>>> finish compiling.
>>>
>>> Works for me.  You have to build with the right options.  My setup is
>>>
>>>  $ /home/aph/gcc/gcc-4_5-branch/configure --prefix=/home/aph/x-arm/install --target=arm-linux-gnueabi --with-sysroot=/home/aph/x-arm/rootfs-f12/ --with-headers=/home/aph/x-arm/chroot-arm/usr/include/ -disable-libssp --disable-libgomp --disable-libmudflap --disable-multilib --disable-static --disable-sjlj-exceptions --enable-languages=java
>>
>> what version of gcc
>
> 4.5 branch: more or less 4.5.1.
>
>> & glibc are you using?
>
> Hmmm, dunno.  Whatever is in Fedora 12: glibc-2.11.2-1.
>
> Andrew.
>

Running /lib/libc.so.6 will tell you :-)
-- 
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8

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

* Re: Advice on compiling GCJ for ARM
  2010-09-22 15:05       ` Josh Marinacci
@ 2010-09-23 12:02         ` Andrew Haley
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Haley @ 2010-09-23 12:02 UTC (permalink / raw)
  To: Josh Marinacci; +Cc: java

On 22/09/10 16:05, Josh Marinacci wrote:
>> 4.5 branch: more or less 4.5.1.
>>
>>> & glibc are you using?
>>
>> Hmmm, dunno.  Whatever is in Fedora 12: glibc-2.11.2-1.
> 
> Ah, so you are compiling against a premade glibc for your target
> OS. That was the part I was missing.

That's always the easiest way to do it.  Build gcc against a system
that works, and you have a complete cross-gcc.  You can use that
cross-gcc to make your target OS; that way you have a fully working
cross-gcc from the start.

Andrew.

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

end of thread, other threads:[~2010-09-23 12:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-21  3:17 Advice on compiling GCJ for ARM Josh Marinacci
2010-09-21  8:55 ` Andrew Haley
2010-09-21 14:18   ` Josh Marinacci
2010-09-22  8:09     ` Andrew Haley
2010-09-22 15:05       ` Josh Marinacci
2010-09-23 12:02         ` Andrew Haley
2010-09-22 18:51       ` Dr Andrew John Hughes

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).