The attached patch eliminates the boehm-gc and associated libjava test suite failures on darwin15 due to the recompilation of the system libunwind.dylib with Apple clang 7.0. The new optimizations in Apple Clang 7.0 introduced by...
http://llvm.org/viewvc/llvm-project?view=revision&revision=226751 resulted in the movement by the linker of symbols from __bss into __data which exposed a latent bug in the boehm-gc 6.6 release used in FSF gcc. This bug doesn't exist in the more recent boehm-gc 7.2 or later releases. Until the exact change from 6.6 to 7.2 that suppresses this bug is identified or FSF gcc's boehm-gc is rebased on the 7.2 version or later, the simple fix to suppress this issue on darwin is to enforce 16-bit alignment in boehm-gc/include/private/gcconfig.h for that target. The attached change applied to current gcc trunk has been confirmed to bootstrap on x86_64-apple-darwin[13,14,15] without regressions in the boehm-gc and libjava test suites. Note that on darwin15, the build must be installed before testing when the default System Integrity Protection mode is enabled as that prevents DYLD_LIBRARY_PATH from being passed along to helper processes. Okay for gcc trunk and back ports to gcc-5-branch and gcc-4_9-branch? Jack
PR66848.patch
Description: Binary data