diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-17 12:25:25 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-17 12:25:25 +0000 |
commit | f945635a3df2255e39e20d3b696520de808c5759 (patch) | |
tree | 47cfcc6b2ff22d34b1cb69c133eaa143f2c4117d /lto-plugin | |
parent | 478532eb6ce5146124ce550550d3c903c95bc497 (diff) | |
download | gcc-f945635a3df2255e39e20d3b696520de808c5759.tar.gz |
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/ChangeLog | 7 | ||||
-rw-r--r-- | lto-plugin/Makefile.am | 11 | ||||
-rw-r--r-- | lto-plugin/Makefile.in | 11 |
3 files changed, 23 insertions, 6 deletions
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog index a8015423b30..75a1f8f6076 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 507e0273fb4..bbb92f98033 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 3739866d7a1..6e2fcc62a73 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) |