ObjFW  Diff

Differences From Artifact [fe25322d35]:

  • File configure.ac — part of check-in [f2a8bdf254] at 2013-05-25 11:40:28 on branch trunk — Switch back to backtrace().

    The reason is that __builtin_frame_address(n) for n > 0 seems to just
    crash on most platforms when -fomit-stack-pointer is specified, which
    seems to be the default for many platforms on -O2. The documentation
    says that __builtin_frame_address() should return NULL in case it can't
    get the frame, but it seems to crash instead.

    Therefore, this commit reverts to using backtrace() from execinfo.h, if
    available. However, as __builtin_frame_address() seems to always work on
    PPC (even with -fomit-frame-pointer) and seems to be the only way to get
    a backtrace on the Wii, this is still used if backtrace() is unavailable
    and __ppc__ defined. (user: js, size: 23054) [annotate] [blame] [check-ins using]

To Artifact [c5958dcc8b]:


748
749
750
751
752
753
754
755
756






757
758
759
760
761
762
763
esac
AS_IF([test x"$have_processes" = x"yes"], [
	AC_SUBST(OFPROCESS_M, "OFProcess.m")
	AC_DEFINE(OF_HAVE_PROCESSES, 1, [Whether we have processes])
])

AC_DEFUN([CHECK_BUILTIN_RETURN_ADDRESS], [
	AC_MSG_CHECKING(for __builtin_return_address)
	AC_TRY_LINK([], [






		__builtin_return_address(1);
	], [
		AC_MSG_RESULT(yes)
		AC_DEFINE(HAVE_BUILTIN_RETURN_ADDRESS, 1,
			[Whether we have __builtin_return_address])
	], [
		AC_MSG_RESULT(no)







|
|
>
>
>
>
>
>







748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
esac
AS_IF([test x"$have_processes" = x"yes"], [
	AC_SUBST(OFPROCESS_M, "OFProcess.m")
	AC_DEFINE(OF_HAVE_PROCESSES, 1, [Whether we have processes])
])

AC_DEFUN([CHECK_BUILTIN_RETURN_ADDRESS], [
	AC_MSG_CHECKING(for working __builtin_return_address)
	AC_TRY_LINK([
		#if defined(__ppc__) || defined(__PPC__)
		/* __builtin_return_address() is known to work correctly */
		#else
		# error
		#endif
	], [
		__builtin_return_address(1);
	], [
		AC_MSG_RESULT(yes)
		AC_DEFINE(HAVE_BUILTIN_RETURN_ADDRESS, 1,
			[Whether we have __builtin_return_address])
	], [
		AC_MSG_RESULT(no)