[Bug java/12784] New: Add flag to request static libgcj.a when invoking gcj

jsturm at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Oct 27 02:53:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12784

           Summary: Add flag to request static libgcj.a when invoking gcj
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsturm at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org

It's useful but inconvenient to produce gcj-compiled executables linked to a
static libgcj.a archive, but dynamic libc etc.

The typical workarounds are:

- Configure with --disable-shared
- Remove libgcj.so from $prefix/lib
- Use -static and forgo a dynamic libc

A dynamic libgcj should remain the default, as it is recommended and will become
easier to deploy as the binary compatibility ABI is inplemented and libgcj.so
becomes prepackaged on popular distributions.

One suggestion is to name this flag -static-libgcj, similar to gcc's -static-libgcc.



More information about the Gcc-bugs mailing list