This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Force MessagesBundle.properties into a statically-built executable (was Re: LibGCJ static linking trouble)
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: Thomas Womack <twomack at globalphasing dot com>, Andrew Haley <aph at redhat dot com>
- Cc: java at gcc dot gnu dot org
- Date: Thu, 16 Nov 2006 09:36:26 -0600
- Subject: Force MessagesBundle.properties into a statically-built executable (was Re: LibGCJ static linking trouble)
- Reply-to: gnustuff at thisiscool dot com
Hi All,
>It's the usual static linking problem: you're going to have to find
>out some way to force MessagesBundle.properties to be included in your
>executable or....
FWIW: I do this (for my MinGW cross build - so you'll have to extrapolate):
export PATH=/datal/gcc/build/crossgcc/bin:$PATH
cd /datal/gcc/build/wingcc_build/i686-pc-mingw32/libjava/
find . -name '*.o' | fgrep properties | xargs i686-pc-mingw32-ar rvcs /tmp/libgcj_properties.a
i686-pc-mingw32-ranlib /tmp/libgcj_properties.a
mv /tmp/libgcj_properties.a /datal/gcc/build/wingcc/i686-pc-mingw32/lib/
(I could have done this directly in /datal/gcc/build/wingcc/i686-pc-mingw32/lib/ -
I'm just blindly cutting and pasting here.)
Then edit libgcj.spec, changing this:
-lgcj %{static-libgcj:-call_shared}
to this:
-lgcj --whole-archive -lgcj_properties --no-whole-archive %{static-libgcj:-call_shared}
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/