HEADS UP: Ports are not ready for CFLAGS=-O2 in 6.0

Kris Kennaway kris at obsecurity.org
Fri Nov 5 14:58:04 PST 2004


On Fri, Nov 05, 2004 at 11:43:30PM +0100, Dag-Erling Sm?rgrav wrote:
> Kris Kennaway <kris at 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.

Yeah, but in the context of ports we have to think about 4.x too, and
other supported old releases.

> > -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.

Sorry, that's the case I was thinking of.  I hadn't analyzed the
failure in detail.

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20041105/8aacb150/attachment.bin


More information about the freebsd-ports mailing list