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

From: Dag-Erling Smørgrav (des_at_des.no)
Date: 11/05/04

  • Next message: Kris Kennaway: "Re: HEADS UP: Ports are not ready for CFLAGS=-O2 in 6.0"
    To: Kris Kennaway <kris@obsecurity.org>
    Date: Fri, 05 Nov 2004 23:43:30 +0100
    
    

    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

    -- 
    Dag-Erling Smørgrav - 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"
    

  • Next message: Kris Kennaway: "Re: HEADS UP: Ports are not ready for CFLAGS=-O2 in 6.0"

    Relevant Pages

    • Re: HEADS UP: Ports are not ready for CFLAGS=-O2 in 6.0
      ... >> Some of the bugs are probably silent. ... You can't reference a static symbol outside your own ... so gcc optimized it out and the tool couldn't ...
      (freebsd-current)
    • Re: [PATCH] Kobjects: drop child->parent ref at unregistration
      ... Alan Stern wrote: ... reference to request_queue, which is the child of a gendisk, which is ... It's possible that this change will cause a few bugs to surface, ...
      (Linux-Kernel)
    • Re: Undefined symbols in 2.6.11-rc5-mm1
      ... but that reference is within the same compilation unit as the ... Then Fedora-devel had an update to gcc 4.0, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: DJGPP 2.04
      ... existing malloc package, and my replacement nmalloc. ... I'll take a look - should I reference this list or DJ-Workers for ... needed to handle the later gcc versions. ... At any rate you can pick up the nmalloc system (I ...
      (comp.os.msdos.djgpp)
    • FreeBSD 5.2 v/s FreeBSD 4.9 MFLOPS performance (gcc3.3.3 v/s gcc2.9.5)
      ... no kernel tweaks, everything vanilla right out of the box. ... now all I have to do is figure out the gcc 3.3.3 switches to make it run ... FLOPS C Program ... Area: Reference = 0.50000000000000000 ...
      (freebsd-hackers)