Description of problem: libgcj.a is needed to be able to have the gcj compiler work with the '-static-libgcj' parameter. libgjc.a is nowhere to be found on the filesystem. Version-Release number of selected component (if applicable): libgcj-4.8.1-1.fc19.x86_64 How reproducible: Every time. Steps to Reproduce: 1.Create a simple "hello world" type Java source file. 2.Compile with 'gcj -static-libgcj --main=HelloWorld ./HelloWorld.java -o Hello' 3.Witness the error. Actual results: [joel@f19 ~]$ gcj -static-libgcj ./HelloWorld.java -o Hello /usr/bin/ld: cannot find -lgcj collect2: error: ld returned 1 exit status Expected results: A binary that has statically linked with the libgcj libraries. Additional info: Building without the '-static-libgcj' works fine, but of course it now dynamically links to /lib64/libgcj.so.14 which is what we're trying to avoid.
Statically linking gcj doesn't really work, which is why we are intentionally not shipping libgcj.a. If you want to compile/link programs that don't depend on particular libgcj.so version, use -findirect-dispatch (both for compilation and linking).