WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Setting LDFLAGS  (Read 2502 times)

Offline qopit

  • Jr. Member
  • **
  • Posts: 81
Setting LDFLAGS
« on: June 20, 2012, 11:38:15 AM »
The wiki page on 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?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10965
Re: Setting LDFLAGS
« Reply #1 on: June 20, 2012, 11:58:12 AM »
Such overriding would be a bug in the project. Most packages correctly append it to whatever flags they need.
The only barriers that can stop you are the ones you create yourself.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Setting LDFLAGS
« Reply #2 on: June 20, 2012, 12:18:14 PM »
Does it mean we can expect numpy.tcz soon? It would be great! :)
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline qopit

  • Jr. Member
  • **
  • Posts: 81
Re: Setting LDFLAGS
« Reply #3 on: June 20, 2012, 12: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).