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 writes:
 > 
 > 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.

Hmm.  I think I need to edit that page.

 > 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

This is wrong.  You're using $(GCJ) to do the link.

That's not what the page says.

Andrew.


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