[oe] Building ubuntu/gcc-4_2-branch to get GCJ for arm EABI

Matthijs van de Water matthijs.van.de.water at gmail.com
Mon Apr 14 16:32:01 UTC 2008


>  >  Please report your results.
>  The build has just failed on glibc-intermediate with a linking error:
>  cannot find -lgcc_eh. I'll look into that now.
I solved this: I was missing a BINV="4.2.3" in my new ubuntu.inc file.
I also needed to specify a "--disable-sjlj-exceptions" as EXTRA_OECONF
and found out that the EXTRA_OECONF from the .inc files in gcc are
overwritten. I patched gcc-configure-common.inc to fix that (I'll
submit a bugreport about this later):
--- meta/packages/gcc/gcc-configure-common.inc       (revision)
+++ meta/packages/gcc/gcc-configure-common.inc       (working copy)
@@ -13,7 +13,8 @@ JAVA_sh3 ?= ""
 FORTRAN ?= ",f77"
 LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"

-EXTRA_OECONF = "${@['--enable-clocale=generic',
''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
+EXTRA_OECONF ?= ""
+EXTRA_OECONF += "${@['--enable-clocale=generic',
''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
                 --with-gnu-ld \
                 --enable-shared \
                 --enable-target-optspace \

This time the build successfully generated everything, including a GCJ
cross-compiler. It looks to be working, I'll report back after I've
run some tests with it.
I did need >512MB of memory while building and compiling libjava took
quite a while...

This leads me to think that it would be best to generate a special BB
file and package for GCJ, so that it does not have to be built always
and does not go into the SDK by default. libgcj.so and especially
libgcj.a are huge, I would not want them in my SDK by default. For my
embedded use, I'll also be modifying libgcj to trim down the size and
I'll probably be rebuilding it quite often while doing that. All the
more reason to split it out of the generic gcc-cross, although I'm not
sure how feasible that is and how to go about that.
Anyone have any ideas about that?

>  Have a look at gcc-4.2.2.inc. As you there are many patches applied
>  which for e.g. ARM. It is likely that you need to have those for your
>  GCC recipe, too.
Yes, all of those are applied.

>  Which perhaps it makes sense then to get everything working from GCJ
>  4.3.0 onwards. AFAIK this release contains all the ARM GCJ stuff we need
>  and we can ask Andrew Haley if important GCJ patches have been
>  introduced after the 4.3.0 release.
>
>  GCC 4.3.0 support in OE is still in its infancy and requires some
>  workarounds. Keep an eye on this list for news about that.
Sounds like a good idea for OE in general; I'll be sticking to 4.2.3
for my application however. Once 4.3.0 starts working, I'll see if I
can make the JAVA stuff work on that. The memory usage of the GCJ
compiler while building libjava is a concern though: I couldn't get
things compiled on my machine with 1GB of RAM. Only after putting 1GB
of extra RAM in my machine, I was able to compile nicely... On
dedicated build servers it might work with 1GB of RAM, but this is a
concern.

Regards,
Matthijs




More information about the Openembedded-devel mailing list