Date: Tue, 29 Aug 2000 17:47:10 +0000 From: rob <europax@home.com> To: Mike Meyer <mwm@mired.org> Cc: questions@freebsd.org Subject: Re: CFLAGS -O, if I am running a 686, does it automatically target my cpu? Message-ID: <39ABF71E.A3D8EF@home.com> References: <14764.5348.342064.352183@guru.mired.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike Meyer wrote: > > rob writes: > > I am curious about whether make automatically tells gcc to optimize to > > my machine's cpu, a 686, or does it optimize to a 386? Reading though > > the manuals, I can see that gcc can target a 686 or any other cpu, but I > > have no idea what happens when I use make to compile my system or a > > port. Rob. > > I vaguely recall that it optimizes for the *family*. However, the > interesting part is found in the -mcpu documentation: > > the compiler will not > generate any code that does not run on the i386 > without the -march=cpu type option being used. > > So you're going to be running 386 instructions on your machine unless > you set add a -march flag to the compile. > > On FreeBSD, you can set these in /etc/make.conf. Use CFLAGS for ports > and other userland code, and COPTFLAGS for the kernel. > > <mike Mike, thanks for the info. I thought about this after I did make world. Dohh! I wonder if optimizing for a 686 would have made any noticable difference anyway. I am going to try an interesting experiment and see if the -march=cpu option gives me a better mpg123 program. The mp3 performance that I have now is kind of marginal, but that may be due wholly to shared interupts on this laptop. Rob. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39ABF71E.A3D8EF>