WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Suggested compiler flags for compiling extensions?  (Read 3008 times)

Offline sihorton

  • Jr. Member
  • **
  • Posts: 58
Suggested compiler flags for compiling extensions?
« on: March 11, 2013, 01:07:25 PM »
The suggested compiler flags for compilation of the 32 bit extensions are as follows:-

export CFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export LDFLAGS="-Wl,-O1"

(See http://wiki.tinycorelinux.net/wiki:creating_extensions) what should we use when compiling for Corepure64?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Suggested compiler flags for compiling extensions?
« Reply #1 on: March 11, 2013, 08:15:18 PM »
CFLAGS="-mtune=generic -Os -pipe"
CXXFLAGS="-mtune=generic -Os -pipe -fno-exceptions -fno-rtti"

...and BTW you can use "...-fno-exceptions -fno-rtti"" with 32-bit extensions too. With both 32 and 64-bit it will fail in some cases.

Offline sihorton

  • Jr. Member
  • **
  • Posts: 58
Re: Suggested compiler flags for compiling extensions?
« Reply #2 on: March 12, 2013, 02:33:19 AM »
Thanks again Juanito!

I am working on building the nodejs extension for Corepure64 so I can use these compiler flags.

/Simon