RFC: Static linking option.
Bryce McKinlay
mckinlay@redhat.com
Thu Mar 2 20:32:00 GMT 2006
David Daney wrote:
> I have been thinking about adding an option to gcj to cause it to link
> against a static libgcj. Probably something like '-static-libgcj' and
> '-shared-libgcj' similar to the libgcc options of similar names.
>
> There are two ways to do it that I have thought of:
>
> 1) Wrap -lgcj with -non_shared and -call_shared when generating the
> linker command line. No library rename necessary, but may only work
> with GNU binutils.
>
> 2) Rename libgcj.a to libgcj_static.a. Then pass -lgcj_static to the
> linker. Probably more portable, but requires changing the build
> process to generate the static library with a different name.
I think this is a good idea - "-static-libgcj" would be marginally more
sane than using "-static". Either approach sounds reasonable to me. It
is just a question of what is easier/cleaner to implement.
Bryce
More information about the Java
mailing list