This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: RFC: Static linking option.
- From: Bryce McKinlay <mckinlay at redhat dot com>
- To: David Daney <ddaney at avtrex dot com>
- Cc: java at gcc dot gnu dot org
- Date: Thu, 02 Mar 2006 15:32:23 -0500
- Subject: Re: RFC: Static linking option.
- References: <440750CD.6050502@avtrex.com>
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