Question for optimizing source installs on Slackware

Hey drop us a line about the show. Feel free to ask questions, provide feedback and criticism, or just ramble on about anything your little heart desires.

Moderators: snarkout, Patrick, dann

Post Reply
User avatar
Wally Balljacker
Posts: 1227
Joined: Fri Jul 29, 2005 3:32 am
Location: University of Massachusetts - Lowell
Contact:

Question for optimizing source installs on Slackware

Post by Wally Balljacker » Wed Sep 13, 2006 1:29 am

I just compiled Celestia on Slack 11, and according to the package checkinstall created, it's compiled for i386. Would optimizing it for a Pentium 4 be as simple as ./configure -march=pentium4, or something similar?

User avatar
adam
Posts: 73
Joined: Sat Jun 03, 2006 4:43 pm
Location: Dora, Alabama

Post by adam » Wed Sep 13, 2006 2:23 am

you need to do something like

Code: Select all

CFLAGS=' -march=pentium4 -O2 ' ./configure 
the "-O2" is optional optimizations. and that's a capital o btw . :P
Image

User avatar
Wally Balljacker
Posts: 1227
Joined: Fri Jul 29, 2005 3:32 am
Location: University of Massachusetts - Lowell
Contact:

Post by Wally Balljacker » Wed Sep 13, 2006 3:27 am

adam wrote:you need to do something like

Code: Select all

CFLAGS=' -march=pentium4 -O2 ' ./configure 
the "-O2" is optional optimizations. and that's a capital o btw . :P
Is there a configuration file to place that in, like Gentoo's /etc/make.conf?

User avatar
adam
Posts: 73
Joined: Sat Jun 03, 2006 4:43 pm
Location: Dora, Alabama

Post by adam » Wed Sep 13, 2006 4:35 am

you could put "export CFLAGS=' -march=pentium4 -O2 ' " in your distro's startup scripts.
Image

User avatar
CptnObvious999
Posts: 798
Joined: Fri Jun 03, 2005 7:54 pm
Location: Maryland
Contact:

Post by CptnObvious999 » Wed Sep 13, 2006 6:46 am

The -pipe argument is supposed to help speed up compile time some. Also I would export it as CFLAGS and CXXFLAGS since IIRC CXXFLAGS would be used for C++ programs. I just added "export CFLAGS="-march=k8 -O2 -pipe -msse3" and "export CXXFLAGS="-march=k8 -O2 -pipe -msse3" (change to your C[XX]FLAGS obviously) to my .bashrc in my user home directory and root directory so anything I compile manually will use those flags.

Post Reply