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]

Re: RFC: Static linking option.


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


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