FreeBSD 6

Nikolas Britton nikolas.britton at gmail.com
Wed Jul 27 17:01:06 GMT 2005


On 7/27/05, Kövesdán Gábor <gabor.kovesdan at t-hosting.hu> wrote:
> Nikolas Britton wrote:
> 
> >On 7/26/05, Kövesdán Gábor <gabor.kovesdan at t-hosting.hu> wrote:
> >
> >
> >>Nikolas Britton wrote:
> >>
> >>
> >>
> >>>Is it just me or is -O2 now the default for kernel builds? What about
> >>>-Os, safe to use?
> >>>
> >>>
> >>>
> >>>
> >>>
> >>So is it for me. But if I specify some CFLAGS, for example -O3
> >>-march=athlon64, the
> >>building fails, but CFLAGS mustn't affect the kernel compiling process
> >>afaik. There is
> >>COPTFLAGS for that reason. I've also made a PR about this new, unwanted
> >>behaviour,
> >>but haven't got any answers so yet.
> >>
> >>
> >>
> >
> >You are right, COPTCLAGS is for the kernel only. -O3 is not officially
> >supported for CFLAGS or COPTFLAGS. If you use -O3 for CFLAGS it will
> >break some ports. Also from my experience using anything higher then
> >CPUTYPE=p2 will break ports (like gstreamer).
> >
> >This is what I normally add to my make.conf file:
> >CPUTYPE=p2
> >CFLAGS= -Os -pipes
> >COPTFLAGS= -Os -pipes
> >#CXXFLAGS= don't remember what I set this too, don't use it a lot.
> >
> >If I want a port to build with different settings I just tell it to
> >inline... make CPUTYPE=p4 install clean etc.
> >
> >
> >
> Yes, I know -O3 isn't supported for either, but I didn't mean ports. The
> kernel building
> fails with this:
> CFLAGS=-O3 -march=athlon64
> #COPTFLAGS=-O3 -march=athlon64   <-This is commenred out!
> And this breaks the kernel compiling. See this:
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=83995

Isn't their a way to overide any setting in make.conf by putting it (
-O flags ) inside the kernel config file, I seem to remember doing
something like that in the passed. Or you could do it all inline again
like: nice -20 make -j2 CYPUTYPE=p4 "CFLAGS= -Os -pipe"
KERNCONF=ME_COLONEL buildkernel


More information about the freebsd-questions mailing list