http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-29 09:29:39 UTC --- Ah, you're right. My patch is mostly to fix -static-libasan or even non-static-libasan - to make sure it comes early and thus override what it thinks it actually overrides. For -static or -static-libstdc++ to work, you'd need --wrap=XXX ld options (and differently built libasan_static.a), but it'd be a mess. dlsym can't work in that case. We error for -static -fsanitize=address, we could similarly error for -static-libstdc++ -fsanitize=address combination.