This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


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

Force MessagesBundle.properties into a statically-built executable (was Re: LibGCJ static linking trouble)


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/





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