https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69310
--- Comment #8 from Jack Howarth <howarth.at.gcc at gmail dot com> --- (In reply to torvald from comment #7) > Does this patch fix the issue on Darwin? > https://gcc.gnu.org/ml/gcc-patches/2016-01/msg01452.html The proposed patch for libstdc++-v3/src/c++11/cow-stdexcept.cc is incomplete. You missed the additional required change of... @@ -385,7 +387,7 @@ } \ void \ _ZGTtNSt##NAME##C2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE( \ - CLASS*, const std::__sso_string&) __attribute__((alias \ + CLASS*, const std::__sso_string&) __attribute__((weak, alias \ ("_ZGTtNSt" #NAME \ "C1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE"))); \ void \ Note however that the compilation of libstdc++-v3/src/c++11/cow-stdexcept.cc on x86_64-apple-darwin15 does produce warnings of the form... warning: alias definitions not supported in Mach-O; ignored and then the bootstrap fails later at... make[3]: Nothing to be done for `all'. /sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/./prev-gcc/xg++ -B/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/./prev-gcc/ -B/sw/lib/gcc6/x86_64-apple-darwin15.4.0/bin/ -nostdinc++ -B/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/prev-x86_64-apple-darwin15.4.0/libstdc++-v3/src/.libs -B/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/prev-x86_64-apple-darwin15.4.0/libstdc++-v3/libsupc++/.libs -I/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/prev-x86_64-apple-darwin15.4.0/libstdc++-v3/include/x86_64-apple-darwin15.4.0 -I/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/prev-x86_64-apple-darwin15.4.0/libstdc++-v3/include -I/sw/src/fink.build/gcc6-6.0.0-1/gcc-6-20160119/libstdc++-v3/libsupc++ -L/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/prev-x86_64-apple-darwin15.4.0/libstdc++-v3/src/.libs -L/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/prev-x86_64-apple-darwin15.4.0/libstdc++-v3/libsupc++/.libs -g -O2 -gtoggle -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE -static-libstdc++ -static-libgcc -Wl,-no_pie -o build/genpreds \ build/genpreds.o build/rtl.o build/read-rtl.o build/ggc-none.o build/vec.o build/min-insn-modes.o build/gensupport.o build/print-rtl.o build/hash-table.o build/read-md.o build/errors.o .././libiberty/libiberty.a Undefined symbols for architecture x86_64: "__ITM_RU1", referenced from: _txnal_cow_string_C1_for_exceptions(void*, char const*, void*) in libstdc++.a(cow-stdexcept.o) "__ITM_RU8", referenced from: _txnal_cow_string_c_str(void const*) in libstdc++.a(cow-stdexcept.o) _txnal_sso_string_c_str(void const*) in libstdc++.a(cow-stdexcept.o) _txnal_cow_string_D1(void*) in libstdc++.a(cow-stdexcept.o) transaction clone for std::logic_error::logic_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libstdc++.a(cow-stdexcept.o) transaction clone for std::logic_error::what() const in libstdc++.a(cow-stdexcept.o) transaction clone for std::domain_error::domain_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libstdc++.a(cow-stdexcept.o) transaction clone for std::invalid_argument::invalid_argument(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libstdc++.a(cow-stdexcept.o) ... "__ITM_addUserCommitAction", referenced from: _txnal_cow_string_D1(void*) in libstdc++.a(cow-stdexcept.o) "__ITM_memcpyRnWt", referenced from: transaction clone for std::logic_error::logic_error(char const*) in libstdc++.a(cow-stdexcept.o) transaction clone for std::logic_error::logic_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libstdc++.a(cow-stdexcept.o) transaction clone for std::domain_error::domain_error(char const*) in libstdc++.a(cow-stdexcept.o) transaction clone for std::domain_error::domain_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libstdc++.a(cow-stdexcept.o) transaction clone for std::invalid_argument::invalid_argument(char const*) in libstdc++.a(cow-stdexcept.o) transaction clone for std::invalid_argument::invalid_argument(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in libstdc++.a(cow-stdexcept.o) transaction clone for std::length_error::length_error(char const*) in libstdc++.a(cow-stdexcept.o) ... "__ITM_memcpyRtWn", referenced from: _txnal_cow_string_C1_for_exceptions(void*, char const*, void*) in libstdc++.a(cow-stdexcept.o) "transaction clone for operator delete(void*)", referenced from: transaction clone for std::logic_error::~logic_error() in libstdc++.a(cow-stdexcept.o) transaction clone for std::domain_error::~domain_error() in libstdc++.a(cow-stdexcept.o) transaction clone for std::invalid_argument::~invalid_argument() in libstdc++.a(cow-stdexcept.o) transaction clone for std::length_error::~length_error() in libstdc++.a(cow-stdexcept.o) transaction clone for std::out_of_range::~out_of_range() in libstdc++.a(cow-stdexcept.o) transaction clone for std::runtime_error::~runtime_error() in libstdc++.a(cow-stdexcept.o) transaction clone for std::range_error::~range_error() in libstdc++.a(cow-stdexcept.o) ... "transaction clone for operator new[](unsigned long)", referenced from: _txnal_cow_string_C1_for_exceptions(void*, char const*, void*) in libstdc++.a(cow-stdexcept.o) ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make[3]: *** [build/genpreds] Error 1 make[2]: *** [all-stage2-gcc] Error 2 make[1]: *** [stage2-bubble] Error 2 make: *** [bootstrap] Error 2