Add bootstrap-asan.mk
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 12 Dec 2012 13:45:37 +0000 (13:45 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 12 Dec 2012 13:45:37 +0000 (13:45 +0000)
* bootstrap-asan.mk: New file.

config/ChangeLog
config/bootstrap-asan.mk [new file with mode: 0644]

index 56dc9b3bad6f9cbd8119fbc2e3932e0a8eec0a9f..ed6fc878b27db7d982660207b3f2f44f692b98c2 100644 (file)
@@ -1,3 +1,7 @@
+2012-11-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * bootstrap-asan.mk: New file.
+
 2012-11-04  Thomas Schwinge  <thomas@codesourcery.com>
 
        * dfp.m4 (enable_decimal_float): Enable for i?86*-*-gnu*.
diff --git a/config/bootstrap-asan.mk b/config/bootstrap-asan.mk
new file mode 100644 (file)
index 0000000..d37a9da
--- /dev/null
@@ -0,0 +1,6 @@
+# This option enables -fsanitize=address for stage2 and stage3.
+
+STAGE2_CFLAGS += -fsanitize=address
+STAGE3_CFLAGS += -fsanitize=address
+POSTSTAGE1_LDFLAGS += -fsanitize=address -static-libasan \
+                     -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/.libs