On Fri, Feb 7, 2014 at 11:09 AM, Ian Lance Taylor <i...@google.com> wrote: > On Fri, Feb 7, 2014 at 9:06 AM, Misty De Meo <mistyde...@gmail.com> wrote: >> Revision 192853 added a new test for availability of _Unwind_GetIPInfo >> in the system unwinder to the configure script of libbacktrace: >> http://repo.or.cz/w/official-gcc.git/commitdiff/a4a5a77adfc9c28d6963e5ae054c997d57cfc7fa >> It was apparently added to fix a bug building with GCC 4.0 on Mac OS X >> 10.5. >> >> This is one of a few checks for that function (there's also one in the >> top-level configure script). Unfortunately, while the other tests have >> special handling for Mac OS X 10.4, this new test does not take it >> into account. >> >> In 10.4, _Unwind_GetIPInfo is not exported in the system unwinder. >> Trying to build a test program will succeed, but will fail to link due >> to the symbol being undefined. The test added to libbacktrace's >> configure used AC_COMPILE_IFELSE, which meant it didn't try to link >> and erroneously flagged _Unwind_GetIPInfo as usable. This led to build >> errors when linking. >> >> This small patch changes configure to use AC_LINK_IFELSE, which fixes >> the issue on OS X 10.4. I've been able to build GCC successfully. >> >> GCC 4.8 and 4.9 are affected by this issue. >> >> A bug report is filed for this as #58710 >> (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58710). >> >> diff --git libbacktrace/configure.ac libbacktrace/configure.ac >> index 28b2a1c..e0e0e08 100644 >> --- libbacktrace/configure.ac >> +++ libbacktrace/configure.ac >> @@ -144,7 +144,7 @@ else >> ac_save_CFFLAGS="$CFLAGS" >> CFLAGS="$CFLAGS -Werror-implicit-function- >> declaration" >> AC_MSG_CHECKING([for _Unwind_GetIPInfo]) >> - AC_COMPILE_IFELSE( >> + AC_LINK_IFELSE( >> [AC_LANG_PROGRAM( >> [#include "unwind.h" >> struct _Unwind_Context *context; > > > This is OK with a ChangeLog entry for 4.8 branch and mainline.
Thanks. Is this sufficient? 2014-02-07 Misty De Meo <mi...@brew.sh> target/PR58710 * configure.ac: Use AC_LINK_IFELSE in check for _Unwind_GetIPInfo. * configure: Regenerate.