From: DiskMan <nobody@thewheel.com>
Subject: Re: compiling, optimization
Date: Sun, 16 Apr 2006 22:30:59 GMT [thread overview]
Message-ID: <pan.2006.04.16.22.30.45.343754@thewheel.com> (raw)
In-Reply-To: e1dp24$fbe$1@news.lth.se
On Mon, 10 Apr 2006 16:11:13 +0200, Levente wrote:
> Hello
>
> I have a question on the topic of config files and CFLAGS...
> ...it can be set on various places:
> 1. the softwares own source directory with
> "make configure" or poking by hand
> 2. in some files in /etc, such as /etc/make.conf...
> 3. globally with export CFLAGS=...
>
> Now, I want to define CFLAGS so that it has higher authority than
> anything, kind of like the word of GOD...
> - Is there a way to define CFLAGS and other compiler related
> flags so they override anything in any file?
> - Does the globally defined (env var) CFALGS have higher authority
> than the various config files?
> - What manual covers this?
>
> wbr
> /levente
Like other poster stated, thats how you can change you CFLAGS setting..
you can also export them as well. When you get to know your CFLAGS, you
can take optimization to the next level... compiling everything
specifically for your processor ;-)
CFLAGS="-O3 -finline -fstrict-aliasing -fomit-frame-pointer -mtune=<cpu>
-mieee -pipe" ./configure
The "-mieee" turns on precision math, with out it some programs will
either crash or generate a floating point error... Most run just fine
without it thought.
The "-finline" for on lining of functions and the like
"-fstrict-aliasing" generates faster code as well [similar to
-ansi_alias with Compaq C"
You can also specify the Compiler and PreProcessor:
*for GCC
CC=gcc CXX=g++ CPP=cpp
*for Compaq C
CC=ccc CXX=cxx
Will L G
prev parent reply other threads:[~2006-04-16 22:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-10 14:11 compiling, optimization Levente
2006-04-11 18:13 ` juhana paavola
2006-04-11 19:58 ` Måns Rullgård
2006-04-16 22:30 ` DiskMan [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox