Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Dec 2011 20:10:49 +0000
From:      Alexander Best <arundel@freebsd.org>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        Kostik Belousov <kostikbel@gmail.com>, Garrett Cooper <yanegomi@gmail.com>, freebsd-current@freebsd.org, Benjamin Kaduk <kaduk@mit.edu>
Subject:   Re: [patch] Cleaning up amd64 kernel optimization options
Message-ID:  <20111223201049.GA854@freebsd.org>
In-Reply-To: <4EF4D0C0.7080808@FreeBSD.org>
References:  <4EF34E52.2040905@FreeBSD.org> <20111223005932.GA65042@freebsd.org> <25FBBF23-CDFA-429E-966D-A90409D8F2BD@gmail.com> <201112230937.08971.jhb@freebsd.org> <20111223160032.GA18839@freebsd.org> <4EF4B46E.7000405@FreeBSD.org> <20111223175504.GK50300@deviant.kiev.zoral.com.ua> <4EF4D0C0.7080808@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Fri Dec 23 11, Dimitry Andric wrote:
> On 2011-12-23 18:55, Kostik Belousov wrote:
> >On Fri, Dec 23, 2011 at 06:03:42PM +0100, Dimitry Andric wrote:
> ...
> >>The only thing my patch makes sure of, is that amd64 does the same thing
> >>as all other arches, e.g.: compile with a low optimization settings for
> >>debug (-O, which is equivalent to -O1), compile with arch-specific high
> >>optimization settings for release (-O2 plus whatever is required for the
> >>arch, or lower if optimization breaks things).
> >
> >Release is built with -g for long time, this is where the symbol files
> >in /boot/kernel comes from.
> 
> Ah, that is done via 'makeoptions DEBUG=-g' in the kernel configuration
> file, right?  I didn't realize that was kept in for a release.  But even
> in that case, amd64 is somehow different from the other arches, which
> all get compiled with -O instead.
> 
> If people prefer that to stay as it is, I'll change the diff so only
> -frename-registers gets removed when clang is used, as clang does not
> support this flag.

i think you should go ahead with the changes:

1) get amd64 in line with the other archs when debugging was requested (turning
   the default optimisation from -O2 to -O)
2) only specify -frename-registers on amd64, when gcc is the requested compiler

i'd say: commit it. :)

...sorry we got carried away, but optimisation flags tend to trigger a lot of
discussion. ;)

cheers.
alex



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111223201049.GA854>