@@ -1,3 +1,8 @@
+2013-07-29 Marek Polacek <polacek@redhat.com>
+
+ * common.opt (static-libubsan): New option.
+ * doc/invoke.texi: Document -static-libubsan.
+
2013-07-24 Marek Polacek <polacek@redhat.com>
* ubsan.c (struct ubsan_typedesc): Improve comment.
@@ -2580,6 +2580,9 @@ Driver
static-libtsan
Driver
+static-libubsan
+Driver
+
symbolic
Driver
@@ -452,7 +452,7 @@ Objective-C and Objective-C++ Dialects}.
@gccoptlist{@var{object-file-name} -l@var{library} @gol
-nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol
-s -static -static-libgcc -static-libstdc++ @gol
--static-libasan -static-libtsan @gol
+-static-libasan -static-libtsan -static-libubsan @gol
-shared -shared-libgcc -symbolic @gol
-T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol
-u @var{symbol}}
@@ -10102,6 +10102,15 @@ option is not used, then this links against the shared version of
driver to link @file{libtsan} statically, without necessarily linking
other libraries statically.
+@item -static-libubsan
+When the @option{-fsanitize=undefined} option is used to link a program,
+the GCC driver automatically links against @option{libubsan}. If
+@file{libubsan} is available as a shared library, and the @option{-static}
+option is not used, then this links against the shared version of
+@file{libubsan}. The @option{-static-libubsan} option directs the GCC
+driver to link @file{libubsan} statically, without necessarily linking
+other libraries statically.
+
@item -static-libstdc++
When the @command{g++} program is used to link a C++ program, it
normally automatically links against @option{libstdc++}. If