WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Compiling Corepure64 Extensions  (Read 4295 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11094
Compiling Corepure64 Extensions
« on: November 12, 2012, 10:03:08 PM »
To compile extensions, please use:

CFLAGS="-mtune=generic -Os -pipe"
CXXFLAGS="-mtune=generic -Os -pipe -fno-exceptions -fno-rtti"

Note that "-fno-exceptions -fno-rtti" will not work for all extensions - gtkmm and similar for example - but will result in smaller output when it does work.

..and you can try:

CC="gcc -flto -fuse-linker-plugin"
CXX="g++ -flto -fuse-linker-plugin"

..which doesn't always compile, but results in smaller output when it does work.

Apologies to the maintainers of x86 extensions whose *.info files were copied and pressed into service for the x86_64 repo. You are of course welcome to take over the maintenance of the relevant x86_64 extension if you so wish.

Note that x86 extensions that do not contain 32-bit binaries - font extensions for example - should work on x86_64.

gordon64

  • Guest
Re: Compiling Corepure64 Extensions
« Reply #1 on: June 28, 2015, 06:57:58 PM »
Hi Juanito

I am just starting to compile for 64 bit and found this thread.

and wiki entry has this quote
http://wiki.tinycorelinux.net/wiki:creating_extensions

Quote
export CFLAGS="-mtune=generic -Os -pipe"
export CXXFLAGS="-mtune=generic -Os -pipe"
export LDFLAGS="-Wl,-O1"

as I have never compiled 64 bit in the past can you when you get a chance state what is your preferred first compile options please. I read your post as meaning

try your first set without the LDFLAGS and if that fails then try your next set.

cheers

PS I was called aus9 in the past.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11094
Re: Compiling Corepure64 Extensions
« Reply #2 on: June 29, 2015, 12:09:42 AM »
I'm usually using:
Code: [Select]
CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --blah --blah.

Sometimes "-flto -fuse-linker-plugin" doesn't work and has to be removed and sometimes "-fno-exceptions -fno-rtti" has to be removed. I am usually not using LDFLAGS.

You can see what has been used at:

http://tinycorelinux.net/6.x/x86_64/tcz/src

Welcome back  :)

gordon64

  • Guest
Re: Compiling Corepure64 Extensions
« Reply #3 on: June 29, 2015, 09:20:23 PM »
thanks for link....actually I had been perusing an earlier release.

sorry to harp on this but I want to get it correct. Do you have any objection to this TCZ build entry?

Code: [Select]
export CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe"
export CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti"
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

I added pkgconfig stuff to force ./configure not to need any pkgconfig entry in the ./configure line if that makes sense?
To save you reading other post I am looking at man-db over the next few days with luck
« Last Edit: June 29, 2015, 09:21:56 PM by gordon64 »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11094
Re: Compiling Corepure64 Extensions
« Reply #4 on: June 29, 2015, 11:52:00 PM »
You don't need to use the pkgconfig line, it was set when pkgconfig was compiled.

gordon64

  • Guest
Re: Compiling Corepure64 Extensions
« Reply #5 on: August 28, 2015, 04:21:34 PM »
thanks for that

Moderators, can you make this a sticky please?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Compiling Corepure64 Extensions
« Reply #6 on: August 28, 2015, 04:31:02 PM »
This is not supposed to be a blog.  It would be better for you to create a wiki entry.