Compiler Flags problem with core2 CPU

Aaron Lewis aaron.lewis1989 at
Sun Feb 28 14:37:40 UTC 2010

Really ? It's bad to use custom flags to compile kernel , why do you 
think so ?
I'd like to know more about this : )

So setting optimize compiler flags is only useful for userland stuff ?

Paul B Mahol wrote:
> On 2/28/10, Aaron Lewis <aaron.lewis1989 at> wrote:
>> Hi,
>>     I gonna recompile kernel for my core2 CPU , so i'd like to pass some
>> flags to gcc.
>>     Kinds of "-march=core2" , i tried to modify /etc/make.conf
>>     e.g    CFLAGS += -march=core2 -O20 -ffast-math -mfpmath=sse
>>     But it fails .. bad arch switch , core2 cpu is not supported ?
> It is bad idea to compile kernel with custom flags. And gcc in FreeBSD
> doesn't know about core2,
> use 'native' if you must.
>>     And is that useful to let gcc select cpu specified asm code ?
> Only for some userland stuff like openssl.

Best Regards,
Aaron Lewis - PGP: 0xA476D2E9
irc: A4r0n on freenode

More information about the freebsd-questions mailing list