aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer/configure.ac
diff options
context:
space:
mode:
authorWei Mi <wmi@google.com>2012-11-12 15:53:47 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2012-11-12 16:53:47 +0100
commitf35db108b96cac4fd3f2b62024ed93ac006ff932 (patch)
tree78af479c74cf29780202765e911b12f4bf192001 /libsanitizer/configure.ac
parent25ae50273ad2801ecc262ba75fa8bac0c4e0001b (diff)
downloadgcc-f35db108b96cac4fd3f2b62024ed93ac006ff932.zip
gcc-f35db108b96cac4fd3f2b62024ed93ac006ff932.tar.gz
gcc-f35db108b96cac4fd3f2b62024ed93ac006ff932.tar.bz2
Import the asan runtime library into GCC tree
This patch imports the runtime library in the GCC tree, ensures that -lasan is passed to the linker when -faddress-sanitizer is used and sets up the build system accordingly. ChangeLog: * configure.ac: Add libsanitizer to target_libraries. * Makefile.def: Ditto. * configure: Regenerate. * Makefile.in: Regenerate. * libsanitizer: New directory for asan runtime. Contains an empty tsan directory. gcc/ChangeLog: * gcc.c (LINK_COMMAND_SPEC): Add -laddress-sanitizer to link command if -faddress-sanitizer is on. libsanitizer: Initial checkin: migrate asan runtime from llvm. From-SVN: r193441
Diffstat (limited to 'libsanitizer/configure.ac')
-rw-r--r--libsanitizer/configure.ac42
1 files changed, 42 insertions, 0 deletions
diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac
new file mode 100644
index 0000000..3f186c2
--- /dev/null
+++ b/libsanitizer/configure.ac
@@ -0,0 +1,42 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.68])
+AC_INIT(package-unused, version-unused, libsanitizer)
+AC_CONFIG_SRCDIR([include/sanitizer/common_interface_defs.h])
+AC_CONFIG_AUX_DIR(.)
+AM_INIT_AUTOMAKE(foreign)
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_CXX
+AM_PROG_AS
+
+AC_LIBTOOL_DLOPEN
+AM_PROG_LIBTOOL
+
+AC_SUBST(enable_shared)
+AC_SUBST(enable_static)
+
+#AM_ENABLE_MULTILIB(, ..)
+target_alias=${target_alias-$host_alias}
+AC_SUBST(target_alias)
+
+toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+toolexeclibdir='$(libdir)'
+AC_SUBST(toolexecdir)
+AC_SUBST(toolexeclibdir)
+
+AC_CONFIG_FILES([Makefile])
+
+AC_CONFIG_FILES(AC_FOREACH([DIR], [interception sanitizer_common asan], [DIR/Makefile ]),
+ [cat > vpsed$$ << \_EOF
+s!`test -f '$<' || echo '$(srcdir)/'`!!
+_EOF
+ sed -f vpsed$$ $ac_file > tmp$$
+ mv tmp$$ $ac_file
+ rm vpsed$$
+ echo 'MULTISUBDIR =' >> $ac_file
+])
+
+AC_OUTPUT