Compiler Flags problem with core2 CPU
Giorgos Keramidas
keramida at ceid.upatras.gr
Tue Mar 2 19:45:18 UTC 2010
On Sun, 28 Feb 2010 20:38:45 +0800, Aaron Lewis <aaron.lewis1989 at 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 ?
>
> And is that useful to let gcc select cpu specified asm code ?
See the section "3.17.14 Intel 386 and AMD x86-64 Options" in the gcc
Info manual. It contains a full list of the supported CPU-TYPE values
for the -mtune=CPU-TYPE option. The -march=CPU-TYPE option accepts the
same CPU types:
`-march=CPU-TYPE'
Generate instructions for the machine type CPU-TYPE. The
choices for CPU-TYPE are the same as for `-mtune'. Moreover,
specifying `-march=CPU-TYPE' implies `-mtune=CPU-TYPE'.
More information about the freebsd-questions
mailing list