summaryrefslogtreecommitdiff
path: root/lto-plugin
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-17 12:25:25 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-17 12:25:25 +0000
commitf945635a3df2255e39e20d3b696520de808c5759 (patch)
tree47cfcc6b2ff22d34b1cb69c133eaa143f2c4117d /lto-plugin
parent478532eb6ce5146124ce550550d3c903c95bc497 (diff)
PR sanitizer/56781
lto-plugin/ * Makefile.am (CFLAGS, LDFLAGS): Filter out -fsanitize=address. (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS, liblto_plugin_la_DEPENDENCIES): Prefer ../libiberty/noasan/libiberty.a over ../libiberty/pic/libiberty.a if the former exists. * Makefile.in: Regenerated. libiberty/ * maint-tool: Also emit rule for noasan/ subdirectory. * configure.ac (NOASANFLAG): Set and substitute. * Makefile.in: Regenerated. (NOASANFLAG): Set. (all, $(TARGETLIB), mostlyclean): Handle noasan subdir like pic subdir. (stamp-noasandir): New goal. * configure: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209476 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'lto-plugin')
-rw-r--r--lto-plugin/ChangeLog7
-rw-r--r--lto-plugin/Makefile.am11
-rw-r--r--lto-plugin/Makefile.in11
3 files changed, 23 insertions, 6 deletions
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog
index a8015423b308..75a1f8f6076b 100644
--- a/lto-plugin/ChangeLog
+++ b/lto-plugin/ChangeLog
@@ -1,6 +1,13 @@
2014-04-17 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/56781
+ * Makefile.am (CFLAGS, LDFLAGS): Filter out -fsanitize=address.
+ (liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS,
+ liblto_plugin_la_DEPENDENCIES): Prefer ../libiberty/noasan/libiberty.a
+ over ../libiberty/pic/libiberty.a if the former exists.
+ * Makefile.in: Regenerated.
+
+ PR sanitizer/56781
* Makefile.am (LTLDFLAGS, liblto_plugin_la_LINK): New variables.
* Makefile.in: Regenerated.
diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am
index 507e0273fb44..bbb92f980335 100644
--- a/lto-plugin/Makefile.am
+++ b/lto-plugin/Makefile.am
@@ -11,6 +11,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS)
AM_CFLAGS = @ac_lto_plugin_warn_cflags@
AM_LDFLAGS = @ac_lto_plugin_ldflags@
AM_LIBTOOLFLAGS = --tag=disable-static
+override CFLAGS := $(filter-out -fsanitize=address,$(CFLAGS))
+override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
libexecsub_LTLIBRARIES = liblto_plugin.la
gcc_build_dir = ../$(host_subdir)/gcc
@@ -22,13 +24,16 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
liblto_plugin_la_SOURCES = lto-plugin.c
liblto_plugin_la_LIBADD = \
- $(if $(wildcard ../libiberty/pic/libiberty.a),$(Wc)../libiberty/pic/libiberty.a,)
+ $(if $(wildcard ../libiberty/noasan/libiberty.a),$(Wc)../libiberty/noasan/libiberty.a, \
+ $(if $(wildcard ../libiberty/pic/libiberty.a),$(Wc)../libiberty/pic/libiberty.a,))
# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS
liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
$(lt_host_flags) -module -bindir $(libexecsubdir) \
- $(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
+ $(if $(wildcard ../libiberty/noasan/libiberty.a),, \
+ $(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a))
liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
- ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
+ ../libiberty/noasan/libiberty.a),../libiberty/noasan/libiberty.a, \
+ $(if $(wildcard ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,))
liblto_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(liblto_plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in
index 3739866d7a14..6e2fcc62a736 100644
--- a/lto-plugin/Makefile.in
+++ b/lto-plugin/Makefile.in
@@ -239,15 +239,18 @@ Wc = -Wc,
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
liblto_plugin_la_SOURCES = lto-plugin.c
liblto_plugin_la_LIBADD = \
- $(if $(wildcard ../libiberty/pic/libiberty.a),$(Wc)../libiberty/pic/libiberty.a,)
+ $(if $(wildcard ../libiberty/noasan/libiberty.a),$(Wc)../libiberty/noasan/libiberty.a, \
+ $(if $(wildcard ../libiberty/pic/libiberty.a),$(Wc)../libiberty/pic/libiberty.a,))
# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS
liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
$(lt_host_flags) -module -bindir $(libexecsubdir) \
- $(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
+ $(if $(wildcard ../libiberty/noasan/libiberty.a),, \
+ $(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a))
liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
- ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
+ ../libiberty/noasan/libiberty.a),../libiberty/noasan/libiberty.a, \
+ $(if $(wildcard ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,))
liblto_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -539,6 +542,8 @@ uninstall-am: uninstall-libexecsubLTLIBRARIES
pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-libexecsubLTLIBRARIES
+override CFLAGS := $(filter-out -fsanitize=address,$(CFLAGS))
+override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
all-local: $(in_gcc_libs)