diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2012-11-17 20:31:06 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2012-11-17 12:31:06 -0800 |
commit | 7e8d1b2d1ef3ab73a6123b0fa5000e4675752d97 (patch) | |
tree | 2d820ab7aa3aa6203fee051f0c0d85dc991da942 /gcc/doc | |
parent | 295d875ce02f75bf3485027a91642a2c31ab01e4 (diff) | |
download | gcc-7e8d1b2d1ef3ab73a6123b0fa5000e4675752d97.zip gcc-7e8d1b2d1ef3ab73a6123b0fa5000e4675752d97.tar.gz gcc-7e8d1b2d1ef3ab73a6123b0fa5000e4675752d97.tar.bz2 |
Add -static-libasan option to the GCC driver
* common.opt (static-libasan): New option.
* gcc.c (LIBASAN_SPEC): New macro.
(LINK_COMMAND_SPEC): Replace -lasan with LIBASAN_SPEC.
* doc/invoke.texi: Document -static-libasan.
From-SVN: r193589
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b3abc09..885bf66 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -452,8 +452,8 @@ Objective-C and Objective-C++ Dialects}. @xref{Link Options,,Options for Linking}. @gccoptlist{@var{object-file-name} -l@var{library} @gol -nostartfiles -nodefaultlibs -nostdlib -pie -rdynamic @gol --s -static -static-libgcc -static-libstdc++ -shared @gol --shared-libgcc -symbolic @gol +-s -static -static-libgcc -static-libasan -static-libstdc++ @gol +-shared -shared-libgcc -symbolic @gol -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol -u @var{symbol}} @@ -9937,6 +9937,15 @@ for the languages used in the program, or using the option @option{-shared-libgcc}, such that it is linked with the shared @file{libgcc}. +@item -static-libasan +When the @option{-faddress-sanitizer} option is used to link a program, +the GCC driver automatically links against @option{libasan}. If +@file{libasan} is available as a shared library, and the @option{-static} +option is not used, then this links against the shared version of +@file{libasan}. The @option{-static-libasan} option directs the GCC +driver to link @file{libasan} 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 |