This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Get rid of useless -fno-rtti for libubsan
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Yury Gribov <y dot gribov at samsung dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Viacheslav Garbuzov <v dot garbuzov at samsung dot com>, Evgeny Gavrin <e dot gavrin at samsung dot com>
- Date: Thu, 28 Nov 2013 12:31:24 +0100
- Subject: Re: [PATCH] Get rid of useless -fno-rtti for libubsan
- Authentication-results: sourceware.org; auth=none
- References: <5295A6EE dot 8050906 at samsung dot com> <20131128083701 dot GN892 at tucnak dot redhat dot com> <529728FE dot 4080407 at samsung dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Nov 28, 2013 at 03:29:02PM +0400, Yury Gribov wrote:
> > I wonder if this can't be done through
> > just adding -fno-rtti to AM_CXXFLAGS and say
> > ubsan_handlers_cxx.% ubsan_type_hash.% : AM_CXXFLAGS += -frtti
>
> Yup, that did the trick. Attaching modified patch.
> @@ -13,11 +13,13 @@ toolexeclib_LTLIBRARIES = libubsan.la
> ubsan_files = \
> ubsan_diag.cc \
> ubsan_handlers.cc \
> - ubsan_handlers_cxx.cc \
> - ubsan_type_hash.cc \
> ubsan_value.cc
>
> -libubsan_la_SOURCES = $(ubsan_files)
> +ubsan_cxx_files = \
> + ubsan_handlers_cxx.cc \
> + ubsan_type_hash.cc
> +
> +libubsan_la_SOURCES = $(ubsan_files) $(ubsan_cxx_files)
> libubsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la
> if !USING_MAC_INTERPOSE
> libubsan_la_LIBADD += $(top_builddir)/interception/libinterception.la
The above hunk is not needed anymore, is it?
Ok for trunk without that hunk (and with Makefile.in regenerated again).
> 2013-11-28 Jakub Jelinek <jakub@redhat.com>
> Yury Gribov <y.gribov@samsung.com>
>
> PR sanitizer/59106
> * ubsan/Makefile.am (AM_CXXFLAGS): Disable -frtti for files that
> don't need it.
> * ubsan/Makefile.in: Regenerated.
Jakub