[patch darwin] PR41245, addendum to PR41224, PR41237, comment on 41296

IainS developer@sandoe-acoustics.co.uk
Mon Sep 7 13:41:00 GMT 2009


Rather than re-open PR41224 or 41237:

the current 'fix' effectively disables object comparison on darwin -  
which is undesirable, as can be seen from the darwin8 situation.

===

my analysis is this:

(1) 'strip' does *not* remove dwarf debugging sections from Darwin  
mach-o objects (although it does seem to remove stabs).
Whether this is a bug in 'strip' is essentially a moot point to  
darwin8 and darwin9 (since active development is on darwin10).

(2) for all systems:
  the configure test that is used to remove "bootstrap-debug" if  
compare-debug fails is performed (AFAICT) using the bootstrap compiler.
The bootstrap compiler might well generate objects with different  
characteristics to the configured gcc build.

This is the problem I had, initially, on darwin8 where the bootstrap  
compiler produces stabs (thus the config test passes)  but I  
configure gcc to produce dwarf (necessary for m64 binaries) thus the  
stage 2/3 compare was failing.

(3) The following command works to strip both stabs and dwarf debug  
sections from darwin8/9 mach-o; it also removes local symbols which,  
clearly, can differ.
  "ld -r -x -S xxx.o -o xxx.o.stripped"

(4) the patch attached restores functionality to compare-debug for  
darwin9 and allows darwin8 to bootstrap with stabs
  (dwarf2 is still showing the failures in PR41296).

bootstrap and confirmed that 'compare-debug' is active on:

powerpc-apple-darwin8 (default debug)
powerpc-apple-darwin9, i686-apple-darwin9.

please cc me in replies as I'm not subscribed to this list,
Iain

** P.S.
IMO a user-requested check/default should either complete or abort  
the configure/build.
I am not keen on the bootstrap-debug being dropped silently (or  
relying on checking thousands of lines of output to spot the  
occurrance).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmpdbg.diff
Type: application/octet-stream
Size: 587 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090907/bbb6b244/attachment.obj>
-------------- next part --------------




More information about the Gcc-patches mailing list