From: Bart Van Assche Date: Fri, 8 Oct 2010 15:54:57 +0000 (+0000) Subject: Only enable CFI annotations when __GCC_HAVE_DWARF2_CFI_ASM is defined. This should... X-Git-Tag: svn/VALGRIND_3_6_0~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8cadb97c9059258951e3b93190ab4dbe010b86a;p=thirdparty%2Fvalgrind.git Only enable CFI annotations when __GCC_HAVE_DWARF2_CFI_ASM is defined. This should work for all platforms, all gcc versions and with and without -fno-dwarf2-cfi-asm / -fno-asynchronous-unwind-tables. Thanks to Jakub Jelinek for the hint. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11415 --- diff --git a/include/valgrind.h b/include/valgrind.h index d2d54a98e0..4896018ea8 100644 --- a/include/valgrind.h +++ b/include/valgrind.h @@ -1221,11 +1221,9 @@ typedef Oh .. and this all needs to be conditionalised so that it is unchanged from before this commit, when compiled with older gccs - that don't support __builtin_frame_address. And also, skip - it on Darwin (at least for the moment) since I can't figure out - how to do the .cfi directives there. + that don't support __builtin_frame_address. */ -#if defined(__GNUC__) && !defined(PLAT_amd64_darwin) +#if defined(__GCC_HAVE_DWARF2_CFI_ASM) # define __FRAME_POINTER \ ,"r"(__builtin_frame_address(0)) # define VALGRIND_CFI_PROLOGUE \