Skip to content

Commit 95a8395

Browse files
committed
Fix GH-20767: build failure with preserve_none attribute enabled on mac.
Established that build < 1700.4.4.1 tends to fail thus we disable the preserve_none attribute feature for these cases. close GH-20777
1 parent 02a6fec commit 95a8395

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

NEWS

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.5.3
44

5-
5+
- Core:
6+
. Fixed bug GH-20806 (preserve_none feature compatiblity with LTO).
7+
(henderkes)
8+
. Fixed bug GH-20767 (build failure with musttail/preserve_none feature
9+
on macOs). (David Carlier)
610

711
15 Jan 2026, PHP 8.5.2
812

Zend/zend_portability.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,12 @@ char *alloca();
336336
# define ZEND_PRESERVE_NONE __attribute__((preserve_none))
337337
#endif
338338

339-
#if __has_attribute(musttail)
340-
# define HAVE_MUSTTAIL
341-
# define ZEND_MUSTTAIL __attribute__((musttail))
339+
340+
#if !defined(__apple_build_version__) || (defined(__apple_build_version__) && __apple_build_version__ >= 17000404)
341+
# if __has_attribute(musttail)
342+
# define HAVE_MUSTTAIL
343+
# define ZEND_MUSTTAIL __attribute__((musttail))
344+
# endif
342345
#endif
343346

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

0 commit comments

Comments
 (0)