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: LibGCJ static linking trouble


Thomas Womack wrote:

Hello all.


I'm following the instructions in
 http://gcc.gnu.org/wiki/Statically%20linking%20libgcj
for compiling things so that they don't need libgcj.so at runtime.

The final link-it-all-together line in my makefile is (remove carriage returns as needed)

$(EXECOUT)/%: %-adaptor.o globalphasing/maketnt/%.o $(maketntlibs) $(javalibs)
$(GCJ) -o $(EXECOUT)/$* $^ -shared-libgcc -Wl,-non_shared -lgcj -Wl,-call_shared -lsupc++ -Wl,--as-needed -lz -lgcc_s -lpthread -lc -lm -ldl -Wl,--no-as-needed



You will notice that the Wiki suggested linking using gcc and not gcj. The recommendation still stands.




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