Page 1 of 1

Question for optimizing source installs on Slackware

Posted: Wed Sep 13, 2006 1:29 am
by Wally Balljacker
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?

Posted: Wed Sep 13, 2006 2:23 am
by adam
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

Posted: Wed Sep 13, 2006 3:27 am
by Wally Balljacker
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?

Posted: Wed Sep 13, 2006 4:35 am
by adam
you could put "export CFLAGS=' -march=pentium4 -O2 ' " in your distro's startup scripts.

Posted: Wed Sep 13, 2006 6:46 am
by CptnObvious999
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.