[ubsan] Add bootstrap-ubsan.mk

Marek Polacek polacek@redhat.com
Tue Jul 30 14:42:00 GMT 2013


This adds the bootstrap-ubsan.mk file so that
--with-build-config=bootstrap-ubsan be possible.  I doesn't work yet,
though :(.

Tested x86_64-pc-linux-gnu, applying to ubsan branch.

diff --git a/config/ChangeLog.ubsan b/config/ChangeLog.ubsan
new file mode 100644
index 0000000..f7a2125
--- /dev/null
+++ b/config/ChangeLog.ubsan
@@ -0,0 +1,3 @@
+2013-07-30  Marek Polacek  <polacek@redhat.com>
+
+	* bootstrap-ubsan.mk: New.
diff --git a/config/bootstrap-ubsan.mk b/config/bootstrap-ubsan.mk
new file mode 100644
index 0000000..10543f6
--- /dev/null
+++ b/config/bootstrap-ubsan.mk
@@ -0,0 +1,7 @@
+# This option enables -fsanitize=undefined for stage2 and stage3.
+
+STAGE2_CFLAGS += -fsanitize=undefined
+STAGE3_CFLAGS += -fsanitize=undefined
+POSTSTAGE1_LDFLAGS += -fsanitize=undefined -static-libubsan \
+		      -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/
\
+
-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ubsan/.libs

	Marek



More information about the Gcc-patches mailing list