Compiler Flags problem with core2 CPU

Paul B Mahol onemda at
Sun Feb 28 14:24:26 UTC 2010

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.

More information about the freebsd-questions mailing list