This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, PR 66521,part 2] Fix warnings on darwin when bootstrapping with vtable verification enabled
- From: Caroline Tice <cmtice at google dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Caroline Tice <cmtice at google dot com>, egall at gwmail dot gwu dot edu
- Date: Tue, 11 Aug 2015 12:08:52 -0700
- Subject: [PATCH, PR 66521,part 2] Fix warnings on darwin when bootstrapping with vtable verification enabled
- Authentication-results: sourceware.org; auth=none
When bootstrapping on darwin with vtable verificaiton enabled,
libstdc++ is giving a lot of warnings due to a flag in
VTV_CXXLINKFLAGS that has a slightly different format for darwin than
for linux. This patch (actually contributed by Eric Gallager) fixes
the problem.
I have tested this patch by bootstrapping and running the entire
testsuite with no regressions. Is this OK to commit?
-- Caroline Tice
cmtice@google.com
Index: libstdc++-v3/acinclude.m4
===================================================================
--- libstdc++-v3/acinclude.m4 (revision 226760)
+++ libstdc++-v3/acinclude.m4 (working copy)
@@ -2325,14 +2325,19 @@
case ${target_os} in
cygwin*|mingw32*)
VTV_CXXFLAGS="-fvtable-verify=std -Wl,-lvtv,-u_vtable_map_vars_start,-u_vtable_map_vars_end"
+ VTV_CXXLINKFLAGS="-L${toplevel_builddir}/libvtv/.libs -Wl,--rpath -Wl,${toplevel_builddir}/libvtv/.libs"
vtv_cygmin=yes
;;
+ darwin*)
+ VTV_CXXFLAGS="-fvtable-verify=std -Wl,-u,_vtable_map_vars_start -Wl,-u,_vtable_map_vars_end"
+ VTV_CXXLINKFLAGS="-L${toplevel_builddir}/libvtv/.libs -Wl,-rpath,${toplevel_builddir}/libvtv/.libs"
+ ;;
*)
VTV_CXXFLAGS="-fvtable-verify=std -Wl,-u_vtable_map_vars_start,-u_vtable_map_vars_end"
+ VTV_CXXLINKFLAGS="-L${toplevel_builddir}/libvtv/.libs -Wl,--rpath -Wl,${toplevel_builddir}/libvtv/.libs"
;;
esac
VTV_PCH_CXXFLAGS="-fvtable-verify=std"
- VTV_CXXLINKFLAGS="-L${toplevel_builddir}/libvtv/.libs -Wl,--rpath -Wl,${toplevel_builddir}/libvtv/.libs"
else
VTV_CXXFLAGS=
VTV_PCH_CXXFLAGS=
Index: libstdc++-v3/configure
===================================================================
--- libstdc++-v3/configure (revision 226760)
+++ libstdc++-v3/configure (working copy)
@@ -17433,14 +17433,19 @@
case ${target_os} in
cygwin*|mingw32*)
VTV_CXXFLAGS="-fvtable-verify=std -Wl,-lvtv,-u_vtable_map_vars_start,-u_vtable_map_vars_end"
+ VTV_CXXLINKFLAGS="-L${toplevel_builddir}/libvtv/.libs -Wl,--rpath -Wl,${toplevel_builddir}/libvtv/.libs"
vtv_cygmin=yes
;;
+ darwin*)
+ VTV_CXXFLAGS="-fvtable-verify=std -Wl,-u,_vtable_map_vars_start -Wl,-u,_vtable_map_vars_end"
+ VTV_CXXLINKFLAGS="-L${toplevel_builddir}/libvtv/.libs -Wl,-rpath,${toplevel_builddir}/libvtv/.libs"
+ ;;
*)
VTV_CXXFLAGS="-fvtable-verify=std -Wl,-u_vtable_map_vars_start,-u_vtable_map_vars_end"
+ VTV_CXXLINKFLAGS="-L${toplevel_builddir}/libvtv/.libs -Wl,--rpath -Wl,${toplevel_builddir}/libvtv/.libs"
;;
esac
VTV_PCH_CXXFLAGS="-fvtable-verify=std"
- VTV_CXXLINKFLAGS="-L${toplevel_builddir}/libvtv/.libs -Wl,--rpath -Wl,${toplevel_builddir}/libvtv/.libs"
else
VTV_CXXFLAGS=
VTV_PCH_CXXFLAGS=