Mailinglist Archive: opensuse (3666 mails)

< Previous Next >
Re: [SLE] What is the proper way to optimize compilations?
  • From: Danny Sauer <suse-linux-e.suselists@xxxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 15 Mar 2005 08:33:50 -0600
  • Message-id: <200503150833.50417.suse-linux-e.suselists@xxxxxxxxxxxxxxxxxxxx>
On Sunday 13 March 2005 06:58 am, Carlos E. R. wrote:
> Hi,
> I have a P-IV, and when I compile something I like to have it optimized
> for my cpu. The proper switch to give gcc would be "-march=pentium4".
> Can you suggest a better, and general, method?

Well, you could run Gentoo, but then you're compiling *everything*, not just
"something" (not too bad, on a quick machine, and the distro actually has
some benefits - but that's not what you asked). However, I've had pretty
good luck with just exporting CFLAGS="-march=pentium4" and
CXXFLAGS=$CFLAGS. Most automake-based programs will respect that.
Actually, I throw a "-Os -pipe" in there, too, but that's just me...

You can also set --host=i686-pc-linux-gnu if it's not being set correctly yb

--Danny, trying not to be a typical Gentoo fanboy... :)

< Previous Next >
Follow Ups