This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH} Enable libsanitizer on darwin

   The attached patch assumes that mach_override/mach_override.h
and mach_override/mach_override.c has been imported by the libsanitizer
maintainers for use by darwin. The patch adds darwin to the supported
target list in configure.tgt and defines USING_MACH_OVERRIDE for darwin
in The definition of USING_MACH_OVERRIDE is used in as the test for appending mach_override/mach_override.c
to libinterception_la_SOURCES. Tested on x86_64-apple-darwin12 against
the mach_override/mach_override.h and mach_override/mach_override.c
from llvm compiler-rt 3.2 branch. While there is some noise on the
output of asan...

the functionality of asan appears to be intact. Okay for gcc trunk
after the libsanitizer maintainers import the missing mach_override/mach_override.h
and mach_override/mach_override.c files?
ps Note that this patch assumes that both mach_override.h and mach_override.c
reside in a mach_override subdirectory in interception as is the case in the
llvm's compiler-rt.


2012-11-14  Jack Howarth <>

	* configure.tgt: Add darwin to supported targets.
	* Define USING_MACH_OVERRIDE when on darwin.
	* interception/ Compile mach_override.c when
	* configure: Regenerated.
	* interception/ Likewise.

Index: libsanitizer/interception/
--- libsanitizer/interception/	(revision 193500)
+++ libsanitizer/interception/	(working copy)
@@ -11,7 +11,11 @@ interception_files = \ \
-libinterception_la_SOURCES = $(interception_files) 
+libinterception_la_SOURCES = $(interception_files) mach_override/mach_override.c
+libinterception_la_SOURCES = $(interception_files)
 # Work around what appears to be a GNU make bug handling MAKEFLAGS
 # values defined in terms of make variables, as is the case for CC and
Index: libsanitizer/
--- libsanitizer/	(revision 193500)
+++ libsanitizer/	(working copy)
@@ -17,6 +17,12 @@ AM_PROG_LIBTOOL
+case "$host" in
+  *-*-darwin*) MACH_OVERRIDE=true ;;
+  *) MACH_OVERRIDE=false ;;
Index: libsanitizer/configure.tgt
--- libsanitizer/configure.tgt	(revision 193500)
+++ libsanitizer/configure.tgt	(working copy)
@@ -20,7 +20,7 @@
 # Filter out unsupported systems.
 case "${target}" in
-  x86_64-*-linux* | i?86-*-linux*)
+  x86_64-*-linux* | i?86-*-linux* | *-*-darwin* )

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]