On Fri, Dec 09, 2011 at 10:03:47AM -0500, Jack Howarth wrote: > On Fri, Dec 09, 2011 at 02:09:54PM +0000, Iain Sandoe wrote: > > > > On 8 Dec 2011, at 20:55, Iain Sandoe wrote: > >> ... but, I'll bow out at this juncture - > > > > OK, I lied :-) > > > > The boehm-gc tests pass for m32 and m64 with "-fpie/-fPIE" on both x86 > > Darwin9 (XC3.1.4) and x86_64 Darwin10 (XC3.2.5); > > I'm building with XC3.2.6 to check that too. > > > > So I think you need to debug what is actually failing on Darwin11. > > > > Iain > > Iain, > I did a bit of experimentation with Xcode 4.2 on 10.6.8 and 10.7.2 with the > failing gctest test case. > > 1) On 10.6.8 using Xcode 4.2 and a previous gcc trunk build, if I do a 'make > clean' > in > /sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/x86_64-apple-darwin10.8.0/boehm-gc > after editing the Makefile there to have... > > CFLAGS = -g -O2 -Wl,-pie > > and then manually rebuild the gctest case with the same flags, it runs fine > on darwin10 > but segfaults on darwin11. Interestingly, I can get it to run without > crashing on darwin11 > if I run it within gdb. > > 2) On 10.7.2 using Xcode 4.2 and a previous gcc trunk build, if I do a 'make > clean' in > /sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/x86_64-apple-darwin11.2.0/boehm-gc > after editing the Makefile there to have... > > CFLAGS = -g -O2 -mmacosx-version-min=10.6 -Wl,-pie > > and then manually rebuild the gctest case with the same flags, the resulting > binary still crashes > on darwin11 but runs fine on darwin10. FYI, I also copied libgcjgc.1.dylib > from the appropriate > build and set DYLD_LIBRARY_PATH as required in each case. > I am assuming these observations suggest that we are seeing a new bug in > the darwin11 unwinder. > I'll open a radar for this tonight with a standalone test case based on > gctest that the darwin > linker developer can walk through the darwin11 unwinder. > Jack
Iain, FYI, I checked my radar reports and I had already opened Problem ID: 9603795, "Lion linker breaks boehm-gc", in July. The original report only compared the stock linkages on darwin10 and darwin11. I've updated the report with a stand-alone test case built using Xcode 4.2 under darwin11 with -mmacosx-version-min=10.6 -Wl,-pie that crashes on darwin11 but not darwin10. This with with the observation that -mmacosx-version-min=10.6 -Wl,-pie builds a copy under Xcode 4.2 on darwin10 that likewise fails on darwin11 but not darwin10 eliminates the linker as the cause of the issue. Jack