Date: Sun, 28 Feb 2010 22:37:27 +0800 From: Aaron Lewis <aaron.lewis1989@gmail.com> To: Paul B Mahol <onemda@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Compiler Flags problem with core2 CPU Message-ID: <4B8A7FA7.1070200@gmail.com> In-Reply-To: <3a142e751002280624w6f38d297o65b88301b3e5f8d@mail.gmail.com> References: <4B8A63D5.90104@gmail.com> <3a142e751002280624w6f38d297o65b88301b3e5f8d@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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@gmail.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B8A7FA7.1070200>