# AMD II x2 245 and gcc optimization ?



## zero (Jan 1, 2010)

Hello,

Why can't we set a correct gcc optimization in make.conf ?
We can see full listing on http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html but some keywords are not compatible.
For example, the AMD II x2 245 supports MMX, 3DNow!, SSE, SSE2, SSE3, SSE4a, ABM, AMD64, AMD-V, EVM, so I should use "amdfam10/barcelona" but i can't, when I try to compile, It says "configure: error: C compiler cannot create executables"


----------



## mk (Jan 1, 2010)

first make optimization of your code itself then look for compiler optimization.


----------



## Speedy (Jan 1, 2010)

If your compiler cannot take amdfam10 or barcelona then it's too old.


----------



## Speedy (Jan 1, 2010)

http://gcc.gnu.org/onlinedocs/gcc-4...2d64-Options.html#i386-and-x86_002d64-Options

Above is what GCC-4.2.4 can take.


----------



## zero (Jan 1, 2010)

Indeed.. I'm using 4.2.1
Thank for your help.


----------



## oliverh (Jan 1, 2010)

>Why can't we set a correct gcc optimization in make.conf ?

Why? Because your compiler doesn't support it? Why shouldn't you do it? Because you gain less to none performance, but lots of compatibility issues. Next time you have a problem, whether it's in Linux or FreeBSD, everbody will tell you the following: does this problem persist without optimization?


----------



## Speedy (Jan 1, 2010)

-m options are really not to blame.
See eighth post in this thread (by zyko):

http://forums.gentoo.org/viewtopic-t-807591-highlight-.html


----------



## zero (Jan 1, 2010)

oliverh said:
			
		

> Because you gain less to none performance



It was true few years ago, but anymore now.
Concerning the compatibility, I know and I take the risk.


----------



## phoenix (Jan 3, 2010)

All the values that you can put into /etc/make.conf for CPUTYPE are listed in /usr/share/examples/etc/make.conf.

Don't try to circumvent the system, as bad things will happen.


----------



## Speedy (Jan 3, 2010)

> Don't try to circumvent the system, as bad things will happen.


In real life, system (as a general concept) is circumvented all the time, and bad things happen all the time, too. Why FreeBSD should be an exception? :beergrin


----------

