Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: qopit on June 20, 2012, 02:38:15 PM

Title: Setting LDFLAGS
Post by: qopit on June 20, 2012, 02:38:15 PM
The wiki page on creating extensions  (http://wiki.tinycorelinux.net/wiki:creating_extensions) currently indicates that we should set LDFLAGS="-Wl,-O1".

I have this set by default in my environment and it turned out to cause me some major pain when trying to compile python's numpy from scratch due to the fact that it overrides LDFLAGS used by python's distutils (I didn't know that).  unset'ing LDFLAGS resolved all my issues.

It got me wondering why that recommendation is there in the first place.  Does -O1 help a lot for tinycore extensions in some way?  I don't know if it is typical for an LDFLAGS environment variable to completely override a makefile's linker settings, rather than complement them, but if so... should it really be the recommended default?
Title: Re: Setting LDFLAGS
Post by: curaga on June 20, 2012, 02:58:12 PM
Such overriding would be a bug in the project. Most packages correctly append it to whatever flags they need.
Title: Re: Setting LDFLAGS
Post by: bmarkus on June 20, 2012, 03:18:14 PM
Does it mean we can expect numpy.tcz soon? It would be great! :)
Title: Re: Setting LDFLAGS
Post by: qopit on June 20, 2012, 03:21:05 PM
python-numpy is already there! :)

I just needed to compile my own against my own python install (I don't use the extension).