Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Jul 2005 00:52:54 -0000
From:      des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        FreeBSD ports <ports@freebsd.org>, Michael Johnson <ahze@ahze.net>, current@freebsd.org
Subject:   Re: HEADS UP: Ports are not ready for CFLAGS=-O2 in 6.0
Message-ID:  <xzpk6sz3oj1.fsf@dwp.des.no>
In-Reply-To: <20041105221020.GA39140@xor.obsecurity.org> (Kris Kennaway's message of "Fri, 5 Nov 2004 14:10:20 -0800")
References:  <20041102222000.GA65845@xor.obsecurity.org> <639522fe041103144732ea6683@mail.gmail.com> <1099522198.59328.4.camel@blueheron.ahze.net> <200411050919.09547.freebsd.nospam@mekanix.dk> <20041105215220.GA32961@xor.obsecurity.org> <7CBFDBE9-2F75-11D9-8D06-000A958C81C6@ahze.net> <20041105221020.GA39140@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Kris Kennaway <kris@obsecurity.org> writes:
> On Fri, Nov 05, 2004 at 04:56:03PM -0500, Michael Johnson wrote:
> > Is there a list of what's broke with -O2 in ports anywhere?
> Some of the bugs are probably silent.  For example, different versions
> of gcc sometimes have bugs at higher optimization levels or with
> certain CPUTYPE values.

As far as we know, that is not the case for FreeBSD 5.3 and 6.0.

> -O2 will also cause build errors in other ways, e.g. if functions in a
> library are improperly declared static and not referenced internally
> (but are referenced externally by another application trying to link
> with the library), since -O2 may optimize them out completely.

That's crap.  You can't reference a static symbol outside your own
compilation unit.  That's the whole point with declaring it static.

The problem with arj is that it uses a tool to embed a checksum in
each binary, and the placeholder for that checksum was declared static
but never referenced, so gcc optimized it out and the tool couldn't
find it.

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"




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