Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* compiling, optimization
@ 2006-04-10 14:11 Levente
  2006-04-11 18:13 ` juhana paavola
  2006-04-16 22:30 ` DiskMan
  0 siblings, 2 replies; 4+ messages in thread
From: Levente @ 2006-04-10 14:11 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: compiling, optimization
  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
  1 sibling, 1 reply; 4+ messages in thread
From: juhana paavola @ 2006-04-11 18:13 UTC (permalink / raw)


On 2006-04-10, Levente <tappatdjur@hotmail.com> 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

You can try like this:
$ CFLAGS="-O4 -mieee" make

-juhana


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: compiling, optimization
  2006-04-11 18:13 ` juhana paavola
@ 2006-04-11 19:58   ` Måns Rullgård
  0 siblings, 0 replies; 4+ messages in thread
From: Måns Rullgård @ 2006-04-11 19:58 UTC (permalink / raw)


juhana paavola <juhana.paavola@gmail.com> writes:

> On 2006-04-10, Levente <tappatdjur@hotmail.com> 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
>
> You can try like this:
> $ CFLAGS="-O4 -mieee" make

GCC has only three levels of optimization, anything higher is treated
as -O3.  Using -mieee is generally advisable on Alpha, unless it is
known that the application in question doesn't need it.  Those
applications that work without it will run faster if it is omitted.

-- 
M�ns Rullg�rd
mru@inprovide.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: compiling, optimization
  2006-04-10 14:11 compiling, optimization Levente
  2006-04-11 18:13 ` juhana paavola
@ 2006-04-16 22:30 ` DiskMan
  1 sibling, 0 replies; 4+ messages in thread
From: DiskMan @ 2006-04-16 22:30 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-04-16 22:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox