Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Zend/Zend.m4
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ uint64_t key = UINT64_C(0x9d7f71d2bd296364);
uintptr_t _a = 0;
uintptr_t _b = 0;
uintptr_t __attribute__((preserve_none)) fun(uintptr_t a, uintptr_t b) {
uintptr_t __attribute__((preserve_none,noinline,used)) fun(uintptr_t a, uintptr_t b) {
_a = a;
_b = b;
return (uintptr_t)const3;
Expand Down Expand Up @@ -568,6 +568,7 @@ int main(void) {
[php_cv_preserve_none=no],
[php_cv_preserve_none=no])
])
AC_MSG_RESULT([$php_cv_preserve_none])
AS_VAR_IF([php_cv_preserve_none], [yes], [
AC_DEFINE([HAVE_PRESERVE_NONE], [1],
[Define to 1 if you have preserve_none support.])
Expand Down
9 changes: 6 additions & 3 deletions Zend/zend_portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,12 @@ char *alloca();
# define ZEND_PRESERVE_NONE __attribute__((preserve_none))
#endif

#if __has_attribute(musttail)
# define HAVE_MUSTTAIL
# define ZEND_MUSTTAIL __attribute__((musttail))

#if !defined(__apple_build_version__) || (defined(__apple_build_version__) && __apple_build_version__ >= 17000404)
# if __has_attribute(musttail)
# define HAVE_MUSTTAIL
# define ZEND_MUSTTAIL __attribute__((musttail))
# endif
#endif

#if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(__APPLE__) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)) || __has_attribute(noreturn)
Expand Down