Static Linking Problems


Blah

Wanna Be Programmer
Joined
Dec 18, 2003
Messages
3,253
Age
31
Location
Oregon, USA
Website
Visit site
I need to compile the Fine Free File program for a project I'm doing. I can get it to dynamically link, but when I add -static to LDFLAGS nothing changes when I make clean && make. I can modify the makefile to get it to statically link with its own library, libmagic, but libc and libz remain dynamically linked.

I am using the Open2x toolchain with libs compiled fresh from the SVN.

edit: Perhaps LIBTOOL isn't playing nice.
 

Blah

Wanna Be Programmer
Joined
Dec 18, 2003
Messages
3,253
Age
31
Location
Oregon, USA
Website
Visit site
It was libtool! Add -static to your LDFLAGS and -all-static to your libtool options (ie *_la_LDFLAGS or *_LDADD).

But I haven't tested the binary yet. (I'll report back in a minute)

It works! and its 1.64mb (someday Open2x will make me really happy with its dynamic linking and whatnot)
 
Top