===================================================================
@@ -22,6 +22,12 @@ AC_CANONICAL_SYSTEM
target_alias=${target_alias-$host_alias}
AC_SUBST(target_alias)
+case "$host" in
+ *-*-darwin*) MACH_OVERRIDE=true ;;
+ *) MACH_OVERRIDE=false ;;
+esac
+AM_CONDITIONAL(USING_MACH_OVERRIDE, $MACH_OVERRIDE)
+
AM_INIT_AUTOMAKE(foreign)
AM_ENABLE_MULTILIB(, ..)
===================================================================
@@ -11,7 +11,11 @@ interception_files = \
interception_mac.cc \
interception_win.cc
-libinterception_la_SOURCES = $(interception_files)
+if USING_MACH_OVERRIDE
+libinterception_la_SOURCES = $(interception_files) mach_override/mach_override.c
+else
+libinterception_la_SOURCES = $(interception_files)
+endif
# 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
===================================================================
@@ -22,6 +22,8 @@
case "${target}" in
x86_64-*-linux* | i?86-*-linux*)
;;
+ x86_64-*-darwin* | i?86-*-darwin*)
+ ;;
*)
UNSUPPORTED=1
;;
===================================================================
@@ -180,6 +180,8 @@ extern GTY(()) int darwin_ms_struct;
%{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} \
%{fopenmp|ftree-parallelize-loops=*: \
%{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } } \
+ %{faddress-sanitizer: \
+ %{static|static-libgcc|static-libstdc++|static-libgfortran: -framework CoreFoundation libasan.a%s; : -framework CoreFoundation -lasan } } \
%{fgnu-tm: \
%{static|static-libgcc|static-libstdc++|static-libgfortran: libitm.a%s; : -litm } } \
%{!nostdlib:%{!nodefaultlibs:\