From 049558ed481d2c43a77a13f7486dc403162d88ee Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 28 Nov 2013 13:20:23 +0100 Subject: re PR sanitizer/59106 (Failure to link against static libasan) 2013-11-28 Jakub Jelinek Yury Gribov PR sanitizer/59106 * ubsan/Makefile.am (AM_CXXFLAGS): Disable -frtti for files that don't need it. * ubsan/Makefile.in: Regenerated. Co-Authored-By: Yury Gribov From-SVN: r205482 --- libsanitizer/ChangeLog | 8 ++++++++ libsanitizer/ubsan/Makefile.am | 5 ++++- libsanitizer/ubsan/Makefile.in | 5 ++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index fd9b55d516f..028c52122df 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,3 +1,11 @@ +2013-11-28 Jakub Jelinek + Yury Gribov + + PR sanitizer/59106 + * ubsan/Makefile.am (AM_CXXFLAGS): Disable -frtti for files that + don't need it. + * ubsan/Makefile.in: Regenerated. + 2013-11-22 Jakub Jelinek PR sanitizer/59061 diff --git a/libsanitizer/ubsan/Makefile.am b/libsanitizer/ubsan/Makefile.am index e98984a757b..ce94eaacbde 100644 --- a/libsanitizer/ubsan/Makefile.am +++ b/libsanitizer/ubsan/Makefile.am @@ -4,7 +4,7 @@ AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) DEFS = -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros +AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros AM_CXXFLAGS += $(LIBSTDCXX_RAW_CXX_CXXFLAGS) ACLOCAL_AMFLAGS = -I m4 @@ -25,6 +25,9 @@ endif libubsan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDFLAGS) libubsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lpthread -ldl +# Use special rules for files that require RTTI support. +ubsan_handlers_cxx.% ubsan_type_hash.% : AM_CXXFLAGS += -frtti + # Work around what appears to be a GNU make bug handling MAKEFLAGS # values defined in terms of make variables, as is the case for CC and # friends when we are called from the top level Makefile. diff --git a/libsanitizer/ubsan/Makefile.in b/libsanitizer/ubsan/Makefile.in index 68125387540..314835885ff 100644 --- a/libsanitizer/ubsan/Makefile.in +++ b/libsanitizer/ubsan/Makefile.in @@ -240,7 +240,7 @@ AM_CPPFLAGS = -I $(top_srcdir) -I $(top_srcdir)/include # May be used by toolexeclibdir. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) AM_CXXFLAGS = -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic \ - -Wno-long-long -fPIC -fno-builtin -fno-exceptions \ + -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti \ -fomit-frame-pointer -funwind-tables -fvisibility=hidden \ -Wno-variadic-macros $(LIBSTDCXX_RAW_CXX_CXXFLAGS) ACLOCAL_AMFLAGS = -I m4 @@ -575,6 +575,9 @@ uninstall-am: uninstall-toolexeclibLTLIBRARIES tags uninstall uninstall-am uninstall-toolexeclibLTLIBRARIES +# Use special rules for files that require RTTI support. +ubsan_handlers_cxx.% ubsan_type_hash.% : AM_CXXFLAGS += -frtti + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: -- cgit v1.2.1