Patchwork PR testsuite/55440: Filter out -fsanitize=address from PLUGINCFLAGS

login
register
mail settings
Submitter H.J. Lu
Date Nov. 22, 2012, 11:07 p.m.
Message ID <20121122230754.GA27942@gmail.com>
Download mbox | patch
Permalink /patch/201223/
State New
Headers show

Comments

H.J. Lu - Nov. 22, 2012, 11:07 p.m.
Hi,

When GCC is compiled with -fsanitize=address, we passs
-fsanitize=address to PLUGINCFLAGS.  We either can't find libasan at
build-time or run-time.  This patch filter-outs -fsanitize=address
from PLUGINCFLAGS.  OK to install?

Thanks.


H.J.
---
2012-11-22  H.J. Lu  <hongjiu.lu@intel.com>
 
	PR testsuite/55440
	* Makefile.in (PLUGINCFLAGS): Filter out -fsanitize=address.

Patch

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 88b29ea..154a0fb 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -329,7 +329,8 @@  enable_lto = @enable_lto@
 
 # Compiler and flags needed for plugin support
 PLUGINCC = @CXX@
-PLUGINCFLAGS = @CXXFLAGS@
+# Filter out -fsanitize=address
+PLUGINCFLAGS = $(filter-out -fsanitize=address,@CXXFLAGS@)
 
 # Libs and linker options needed for plugin support
 PLUGINLIBS = @pluginlibs@