The transition of libasan on darwin from using mach_override to the replacement mac function imposition code results in a non-functional static libasan (PR55599). The method now used needs a dynamic shared library and retaining a static libasan would require restoring the deprecated and unsupported mach_override code. The attached patch sets enable_static=no for darwin in libsanitizer/configure.ac and removes the static libasan support in gcc/config/darwin.h. Bootstrap and regression tested with asan.exp on x86_64-apple-darwin12. Okay for gcc trunk? Jack
gcc/
2012-12-05 Jack Howarth <howa...@bromo.med.uc.edu> PR 55599/sanitizer * config/darwin.h (LINK_COMMAND_SPEC_A): Remove static libasan support. libsanitizer/ 2012-12-05 Jack Howarth <howa...@bromo.med.uc.edu> PR 55599/sanitizer * configure.ac: Set enable_static=no on darwin. * configure: Regenerated. Index: libsanitizer/configure.ac =================================================================== --- libsanitizer/configure.ac (revision 194225) +++ libsanitizer/configure.ac (working copy) @@ -81,7 +81,7 @@ unset TSAN_SUPPORTED AM_CONDITIONAL(TSAN_SUPPORTED, [test "x$TSAN_SUPPORTED" = "xyes"]) case "$host" in - *-*-darwin*) MAC_INTERPOSE=true ;; + *-*-darwin*) MAC_INTERPOSE=true ; enable_static=no ;; *) MAC_INTERPOSE=false ;; esac AM_CONDITIONAL(USING_MAC_INTERPOSE, $MAC_INTERPOSE) Index: gcc/config/darwin.h =================================================================== --- gcc/config/darwin.h (revision 194224) +++ gcc/config/darwin.h (working copy) @@ -180,9 +180,7 @@ 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 } } \ - %{fsanitize=address: \ - %{static|static-libasan|static-libgcc|static-libgfortran: -framework CoreFoundation -lstdc++ libasan.a%s; \ - static-libstdc++: -framework CoreFoundation libstdc++.a%s libasan.a%s; : -framework CoreFoundation -lasan } } \ + %{fsanitize=address: -framework CoreFoundation -lasan } \ %{fgnu-tm: \ %{static|static-libgcc|static-libstdc++|static-libgfortran: libitm.a%s; : -litm } } \ %{!nostdlib:%{!nodefaultlibs:\