https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66848
--- Comment #16 from Jeremy Huddleston Sequoia <jeremyhu at macports dot org> --- (In reply to Jack Howarth from comment #14) > I finally got around to rebuilding the Apple open source release of > libunwind-35.3 from 10.10.5 under Xcode 7 on 10.10.5. The results are rather > interesting as the default build is a Debug one compiled at -O0. The debug > build of libunwind.dylib produces a binary which exhibits the same breakage > in the boehm-gc test suite binaries built on darwin14 as is seen on darwin15 > with the optimized system libunwind.dylib. This makes it much more likely > that the issue isn't an optimization bug in Apple Clang 7.0 but rather a > linker bug in Xcode 7. I don't see how you come to that conclusion. All I see are these data points: libunwind-35.3 built against the 10.10 SDK with Xcode6-era clang and Xcode6-era linker produces a libunwind.dylib that does not exhibit this problem. libunwind-35.3 built against the 10.11 SDK with Xcode7-era clang and Xcode7-era linker produces a libunwind.dylib that exhibits this problem. I suggest you try using the Xcode 7 linker with the Xcode 6 compiler and 10.10 SDK. If you hypothesis is correct, it should fail. You can do that by just copying Xcode7's linker to Xcode6.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld (make sure you backup the old one of course). > Unfortunately, it is impossible to test that by > linking the Xcode 7 build under the Xcode 6 linker because the Xcode 7 build > uses the 10.11 SDK on 10.10 which needs a linkage on libc++abi.tbd and thus > requires the new linker with the .tbd support. Well then I suggest you similarly test using the Xcode 7 compiler with the Xcode 7 linker and the 10.10 SDK to rule out the SDK as a factor and then test using the Xcode 7 compiler with the Xcode 6 linker and the 10.10 SDK. > FYI, The .tbd files are new "text-based stub libraries", that provide a much > more compact version of the stub libraries for use in the SDK, and help to > significantly reduce its download size.