aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2015-11-25 10:30:25 +0000
committerRainer Orth <ro@gcc.gnu.org>2015-11-25 10:30:25 +0000
commite5ef217c3e12ddab9e50843ce322702e8b9d1686 (patch)
tree9216240eb09617c83cf72cd69f1d6971f33b581d /libstdc++-v3
parent70927cae316077708327bfe545a1464c7affe331 (diff)
downloadgcc-e5ef217c3e12ddab9e50843ce322702e8b9d1686.zip
gcc-e5ef217c3e12ddab9e50843ce322702e8b9d1686.tar.gz
gcc-e5ef217c3e12ddab9e50843ce322702e8b9d1686.tar.bz2
Port libvtv to Solaris
libstdc++-v3: * acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY) <solaris2*>: Use -Wl,-R in VTV_CXXLINKFLAGS. * configure: Regenerate. * testsuite/18_support/bad_exception/23591_thread-1.c: Use -fvtable-verify=none on Solaris 12+. libgcc: * Makefile.in (VTV_CFLAGS): New variable. (vtv_start$(objext), vtv_end$(objext), vtv_end$(objext)) (vtv_start_preinit$(objext), vtv_end_preinit$(objext)): Use it. * config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file. Add vtv_start.o, vtv_end.o, vtv_start_preinit.o, vtv_end_preinit.o to extra_parts if $enable_vtable_verify = yes. libvtv: * configure.tgt (*-*-solaris2.[1-9]*): Declare supported. * configure.ac: Call AC_USE_SYSTEM_EXTENSIONS. <*-*-solaris2*>: Check for init priority support. Check for getexecname, __fortify_fail, _obstack_begin. (VTV_NO_OBSTACK): New conditional. * configure: Regenerate. * Makefile.am [VTV_NO_OBSTACK] (obstack.c): Use new condition. Create empty config.h * Makefile.in: Regenerate. * vtv_rts.cc [HAVE_GETEXECNAME] (program_invocation_name): New variable. (read_section_offset_and_length) [HAVE_GETEXECNAME]: Set it. (dl_iterate_phdr_callback) [HAVE_GETEXECNAME]: Set it. (__fortify_fail): Wrap in HAVE___FORTIFY_FAIL [!HAVE___FORTIFY_FAIL]: Provide non-Cygwin implementation. (read_section_offset_and_length): Assert sh_size >= VTV_PAGE_SIZE. (iterate_modules): Fix typo. Use VTV_PAGE_SIZE. (dl_iterate_phdr_callback): Fix typo. Use VTV_PAGE_SIZE. (__VLTChangePermission): Fix typos. include: * vtv-change-permission.h (VTV_PAGE_SIZE) [__sun__ && __svr4__ && __sparc__]: Define. gcc: * config/sol2.h (SUPPORTS_INIT_PRIORITY): Move up. (STARTFILE_VTV_SPEC, ENDFILE_VTV_SPEC): Define. (STARTFILE_SPEC): Use %(startfile_vtv). (ENDFILE_SPEC): Use %(endfile_vtv). (SUBTARGET_EXTRA_SPECS): Handle STARTFILE_VTV_SPEC, ENDFILE_VTV_SPEC. * gcc.c (LINK_COMMAND_SPEC): Move VTABLE_VERIFICATION_SPEC after %{L*}. From-SVN: r230865
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog9
-rw-r--r--libstdc++-v3/acinclude.m44
-rwxr-xr-xlibstdc++-v3/configure4
-rw-r--r--libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c2
4 files changed, 18 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 428e213..2236cfb 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,12 @@
+2015-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * acinclude.m4 (GLIBCXX_ENABLE_VTABLE_VERIFY) <solaris2*>: Use
+ -Wl,-R in VTV_CXXLINKFLAGS.
+ * configure: Regenerate.
+
+ * testsuite/18_support/bad_exception/23591_thread-1.c: Use
+ -fvtable-verify=none on Solaris 12+.
+
2015-11-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): New test.
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 312b1fd..75e4667 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -2628,6 +2628,10 @@ AC_DEFUN([GLIBCXX_ENABLE_VTABLE_VERIFY], [
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"
;;
+ solaris2*)
+ VTV_CXXFLAGS="-fvtable-verify=std -Wl,-u_vtable_map_vars_start,-u_vtable_map_vars_end"
+ VTV_CXXLINKFLAGS="-L${toplevel_builddir}/libvtv/.libs -Wl,-R -Wl,${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"
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 86e66e1..868ac31 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -18041,6 +18041,10 @@ $as_echo "$enable_vtable_verify" >&6; }
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"
;;
+ solaris2*)
+ VTV_CXXFLAGS="-fvtable-verify=std -Wl,-u_vtable_map_vars_start,-u_vtable_map_vars_end"
+ VTV_CXXLINKFLAGS="-L${toplevel_builddir}/libvtv/.libs -Wl,-R -Wl,${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"
diff --git a/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c b/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c
index c460ca9..25dde7f 100644
--- a/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c
+++ b/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c
@@ -1,5 +1,5 @@
// { dg-require-sharedlib "" }
-// { dg-options "-g -O2 -pthread -ldl -x c -fvtable-verify=none" { target *-*-linux* *-*-gnu* } }
+// { dg-options "-g -O2 -pthread -ldl -x c -fvtable-verify=none" { target *-*-linux* *-*-gnu* *-*-solaris2.1[2-9]* } }
// Copyright (C) 2005-2015 Free Software Foundation, Inc.
//