Mailinglist Archive: opensuse (3666 mails)

< Previous Next >
Re: [SLE] Re: What is the proper way to optimize compilations?
  • From: "Carlos E. R." <robin1.listas@xxxxxxxxxx>
  • Date: Thu, 24 Mar 2005 01:39:00 +0100 (CET)
  • Message-id: <Pine.LNX.4.58.0503240112010.10344@xxxxxxxxxxxxxxxx>

The Thursday 2005-03-24 at 00:31 +0100, Philipp Thomas wrote:

> >"--build=i786-pc-linux-gnu --host=i786-pc-linux-gnu".
> You can only pass to configure what config.sub accepts, as this is the
> script that configure will call if you pass it an explicit triple.

Ah. That explains the strange results I got when I simply gave it
"--build=pentium4". It didn't complain! O:-)

> I just checked, and current versions of config.sub do accept
> pentium4-suse-linux but return i787-suse-linux-gnu.

I see. I have just tried now:

~> ./config.sub pentium4-suse-linux-gnu
~> ./config.sub pentium4

> If you would like configure to set CFLAGS/CXXFLAGS automatically, you
> would do something like:
> case $build_cpu in
> i787|pentium4)
> CFLAGS="-march=pentium4 -mcpu=pentium4 $CFLAGS"
> ;;
> esac

In the configure script? Well, yes, it is much cleaner than my hack, it
doesn't hard-code it and would work for different runs. Right. Point taken :-)

> >Humm. Then perhaps I only need to give "--build"? Ah, I'm getting a
> >headache...
> It's really easy, as you don't ever want to cross-compile: Simply use
> --build :)


> >Yeap, that is what I always did (although I hack configure itself, not the
> >files you mention), as I wasn't sure how to get what I wanted. I can live
> >with hacks as I don't distribute my compilations O:-)
> Never-the-less I'd recommend getting familiar with the autotools
> (autoconf, automake, libtool) as it helps with such tasks. It's far
> easier to tweak configure.{in|ac} and then run autoconf to regenerate
> configure.

I'll have a look. There are so many things to learn, aside from "real"

For example: I can understand that each source contains its own
configure script, and guessing the .in/.ac files too, because the serve
to generate the first one. But I would have thought that files like
configure.guess or .sub could be common to each installation.... either
they are tailored for each program, or they are in continuous
development and they can't trust them to be valid for each case. It
complicates a central configuration.

> >Ok, I see there is not a common way for all compilations, it depends on
> >each case.
> Yes, that's the state of affairs, unless you want to switch to something
> like gentoo.

I'm not so adventurous ;-)

Carlos Robinson

< Previous Next >
Follow Ups