]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++-v3: Update VTV vars for libtool link commands [PR99172]
authorCaroline Tice <cmtice@google.com>
Fri, 12 Mar 2021 15:34:36 +0000 (07:34 -0800)
committerCaroline Tice <cmtice@google.com>
Mon, 15 Mar 2021 16:22:45 +0000 (09:22 -0700)
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.

libstdc++-v3/ChangeLog
libstdc++-v3/src/Makefile.am
libstdc++-v3/src/Makefile.in

index 6834a90ff9e92eaa5a31eaf4f2978417bf39a236..296dc680675f2591db1bf472216316415ed5f995 100644 (file)
@@ -1,3 +1,12 @@
+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
index 78e788cccb373e000b9c2319547a6936810f8be3..16f4cc6eff4ad4ff9eefe1986f0b7198f2753f06 100644 (file)
@@ -214,12 +214,14 @@ compatibility-condvar.o: compatibility-condvar.cc
 # 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
index 684b7aee16b12b8022ff96069116c04b758302ca..4df5c829a7fb443c8acbeea771b0064796cc2697 100644 (file)
@@ -578,12 +578,13 @@ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) $(lt_host_flags)
 # 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