This fixes PR 99172
Currently when GCC is configured with --enable-vtable-verify, the
libstdc++-v3 Makefiles add "-fvtable-verify=std
-Wl,-u_vtable_map_vars_start,-u_vtable_map_vars_end" to libtool link
commands. The "-fvtable-verify=std" piece causes alternate versions of
libtool (such as slibtool) to fail, unable to find "-lvtv" (GNU
libtool just removes that piece).
This patch updates the libstdc++-v3 Makefiles to not pass
"-fvtable-verify=std" to the libtool link commands.
+2021-03-15 Caroline Tice <cmtice@google.com>
+
+ PR libstdc++/99172
+ * src/Makefile.am (AM_CXXFLAGS_PRE, AM_CXXFLAGS): Add
+ AM_CXXFLAGS_PRE with the old definition of AM_CXXFLAGS; make
+ AM_CXXFLAGS to be AM_CXXFLAGS_PRE with '-fvtable-verify=std'
+ filtered out.
+ * src/Makefile.in: Regenerate.
+
2021-03-11 Patrick Palka <ppalka@redhat.com>
* src/c++17/floating_to_chars.cc: Simplify the file as if
# set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion calls for it.
-AM_CXXFLAGS = \
+AM_CXXFLAGS_PRE = \
-std=gnu++98 \
$(glibcxx_compiler_pic_flag) \
$(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
+AM_CXXFLAGS = $(filter-out -fvtable-verify=std,$(AM_CXXFLAGS_PRE))
+
# Libtool notes
# 1) In general, libtool expects an argument such as `--tag=CXX' when
# set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion calls for it.
-AM_CXXFLAGS = \
+AM_CXXFLAGS_PRE = \
-std=gnu++98 \
$(glibcxx_compiler_pic_flag) \
$(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
+AM_CXXFLAGS = $(filter-out -fvtable-verify=std,$(AM_CXXFLAGS_PRE))
# Libtool notes