On Wed, Oct 21, 2015 at 05:56:42PM +0300, Maxim Ostapenko wrote: > Hi, > > recent libsanitizer merge ( > https://gcc.gnu.org/ml/gcc-patches/2015-10/msg01851.html) broke bootstrap on > x86_64-apple-darwin14 because for Darwin sanitizer libs shouldn't be linked > with -lrt flag. Also, right now, libubsan links with -lc++abi for Darwin, > that is wrong, because we don't want to link against system clang++'s C++ > library (Dominique, am I right here?). This patch fixes bootstrap by adding > additional check to determine if we really need librt for sanitizer_common > into configure script and removes -lc++abi flag for UBSan on Darwin. > > Tested on x86_64-linux-gnu, how does it look?
Ok with me if it is ok with the Darwin maintainers. > libsanitizer/ChangeLog: > > 2015-10-21 Maxim Ostapenko <m.ostape...@partner.samsung.com> > > PR bootstrap/68041 > > * configure.ac (link_sanitizer_common): Link against librt only if it > contains shm_open, required by sanitizers. > (CXX_ABI_NEEDED): Remove variable. > * configure: Regenerate. > * ubsan/Makefile.am (libubsan_la_LIBADD): Do not add -lc++abi anymore. > * ubsan/Makefile.in: Regenerate. Jakub