diff options
author | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-25 10:30:25 +0000 |
---|---|---|
committer | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-25 10:30:25 +0000 |
commit | 08de21a489d65c6f29b3aa2df9082ece34a183ac (patch) | |
tree | 9216240eb09617c83cf72cd69f1d6971f33b581d /libgcc | |
parent | 1d093889eda4e3f58d8eec813224343555bbe93e (diff) | |
download | linaro-gcc-08de21a489d65c6f29b3aa2df9082ece34a183ac.tar.gz linaro-gcc-08de21a489d65c6f29b3aa2df9082ece34a183ac.tar.bz2 linaro-gcc-08de21a489d65c6f29b3aa2df9082ece34a183ac.zip |
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*}.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230865 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 9 | ||||
-rw-r--r-- | libgcc/Makefile.in | 13 | ||||
-rw-r--r-- | libgcc/config.host | 3 |
3 files changed, 21 insertions, 4 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 6653fedcd06..dcd11a23516 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,12 @@ +2015-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * 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. + 2015-11-23 Szabolcs Nagy <szabolcs.nagy@arm.com> PR target/68059 diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index 527d87b0310..6b0b3f22512 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -1006,17 +1006,22 @@ endif ifeq ($(enable_vtable_verify),yes) # These are used in vtable verification; see comments in source files for # more details. + +# Override -finhibit-size-directive to avoid mismatch between libgcc and libvtv +# compilations. +VTV_CFLAGS = $(CRTSTUFF_T_CFLAGS_S) -fno-inhibit-size-directive + vtv_start$(objext): $(srcdir)/vtv_start.c - $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) -c $(srcdir)/vtv_start.c + $(crt_compile) $(VTV_CFLAGS) -c $(srcdir)/vtv_start.c vtv_end$(objext): $(srcdir)/vtv_end.c - $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) -c $(srcdir)/vtv_end.c + $(crt_compile) $(VTV_CFLAGS) -c $(srcdir)/vtv_end.c vtv_start_preinit$(objext): $(srcdir)/vtv_start_preinit.c - $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) -c $(srcdir)/vtv_start_preinit.c + $(crt_compile) $(VTV_CFLAGS) -c $(srcdir)/vtv_start_preinit.c vtv_end_preinit$(objext): $(srcdir)/vtv_end_preinit.c - $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) -c $(srcdir)/vtv_end_preinit.c + $(crt_compile) $(VTV_CFLAGS) -c $(srcdir)/vtv_end_preinit.c endif ifeq ($(CUSTOM_CRTIN),) diff --git a/libgcc/config.host b/libgcc/config.host index b63cc36d277..9a58beb7847 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -294,6 +294,9 @@ case ${host} in ;; esac fi + if test x$enable_vtable_verify = xyes; then + extra_parts="$extra_parts vtv_start.o vtv_end.o vtv_start_preinit.o vtv_end_preinit.o" + fi ;; *-*-uclinux*) extra_parts="crtbegin.o crtend.o" |