https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112397
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Something like this, but I don't know what condition to use to check if the
target is darwin:
--- a/libstdc++-v3/libsupc++/Makefile.am
+++ b/libstdc++-v3/libsupc++/Makefile.am
@@ -132,6 +132,14 @@ atomicity_file =
${glibcxx_srcdir}/$(ATOMICITY_SRCDIR)/atomicity.h
atomicity.cc: ${atomicity_file}
$(LN_S) ${atomicity_file} ./atomicity.cc || true
+if ???
+# See PR 112397
+new_opvnt.lo: new_opvnt.cc
+ $(LTCXXCOMPILE) -fno-reorder-blocks-and-partition -I. -c $<
+new_opvnt.o: new_opvnt.cc
+ $(CXXCOMPILE) -fno-reorder-blocks-and-partition -I. -c $<
+endif
+
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after