• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

-falign-functions=

From http://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/Optimize-Options.html
-falign-functions
-falign-functions=n
Align the start of functions to the next power-of-two greater than n, skipping up to n bytes. For instance, -falign-functions=32 aligns functions to the next 32-byte boundary, but -falign-functions=24 would align to the next 32-byte boundary only if this can be done by skipping 23 bytes or less.

-fno-align-functions and -falign-functions=1 are equivalent and mean that functions will not be aligned.

Some assemblers only support this flag when n is a power of two; in that case, it is rounded up.

If n is not specified or is zero, use a machine-dependent default.

Enabled at levels -O2, -O3.

From my understanding it is a way to optomize code by aligning it to your processors instruction pipe. For whatever reason, -Os disables it... so I would think it does/can increase the soze of the code produced. I use it by calling -O3, not calling it directly. Maybe someone else can give a better idea of what a proper direct setting might be.
 
Yeah I was wondering what I should set it to for a PIII 450 MHz. Thanks for the reply.
 
I'd assume a Gentoo user, since most other Linux distributions don't have the user specify CFLAGS, unless they were changing the makefile of a program.

Shouldn't go too overboard and use everything in the GCC optimization flags list. They increase compile times, some programs tend not to compile with aggressive timings (i.e. OpenOffice.org and Ximian OpenOffice), and sometimes, aggressive CFLAGS don't give you much of an improvement.

For a Pentium 3, I'd say
Code:
CFLAGS="-march=pentium3 -O2 -fomit-frame-pointer -pipe"

Not much different from what they give you by default, only difference is the -march=pentium3 flag.

O3 enables two more things, -finline-functions or something, and some other thing (real helpful huh? I can't remember).

This is a safe middle road for CFLAGS that is pretty safe, and takes advantage of stuff in the P3 (SSE and MMX).
 
I generally stick with the default FreeBSD flags. Lots of times on the mailing lists we get questions about things not building and find out that the person isn't using the default compiler flags. Once they switch back to the defaults things magically build and run just fine.
 
HHunt said:
Yeah. Set CPUTYPE to p3 and don't touch CFLAGS.
Oh, BAH!

My whole system is compiled
Code:
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -ffast-math -mfpmath=sse,387 -msse -finline-functions -falign-functions=16 -falign-labels=1 -falign-loops=16 -falign-jumps=16 -frename-registers
Keep in mind that is for an Athlon-XP. I know some of them are redundant, but it's been working fine this way for over a year, and I'm too lazy to go changing now.
 
I just built with CFLAGS="-march=pentium3 -O3 -fomit-frame-pointer -pipe" on a P3 750 without any problems.
 
I had some random breakage in compiling world back in 5.1 if I was to aggressive, so I dropped down to
-O -pipe -march=athlon-xp
(default for my CPUTYPE), and haven't bothered to up it again. To each his own, I guess. :D
 
Well if everyone is showing theirs, I have to show mine ;)

Code:
CFLAGS="-O3 -march=pentium4 -funroll-loops -fomit-frame-pointer -ftracer -fprefetch-loop-arrays -pipe"

They are pretty aggressive, but came about after reading and discussing on a 40 some page forum discussion with general users and developers. Indeed they are stable for me, I have not had a single program fail to compile because of them.

Back on to the original topic... I am guessing because no one has really answered, and I have never actually seen -falign-functions directly called for a specific app, I would assume you could avoid it. Unless you are ussing O3/O2, in which case I am guessing it is set to an optimal level for your defined march?
 
Back
Top