-
Notifications
You must be signed in to change notification settings - Fork 8k
Fix GH-20767: build failure with preserve_none attribute enabled on mac. #20777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: PHP-8.5
Are you sure you want to change the base?
Conversation
…n mac. Established that build < 1700.4.4.1 tends to fail thus we disable the preserve_none attribute feature for these cases.
|
This doesn't fix the issue for me. I also don't see any sign of the Output of |
|
Removing the It might be better to use this, which is defined by The working version should be |
|
let me know if this is working out for you this time. Cheers. |
|
Yep, that did the trick |
|
Would this work instead of parsing the build version from a command in shell? diff --git a/Zend/Zend.m4 b/Zend/Zend.m4
index 33009e9909f..b89f1f26d74 100644
--- a/Zend/Zend.m4
+++ b/Zend/Zend.m4
@@ -476,6 +476,13 @@ AC_DEFUN([ZEND_CHECK_PRESERVE_NONE], [dnl
AC_CACHE_CHECK([for preserve_none calling convention],
[php_cv_preserve_none],
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+
+#ifdef __apple_build_version__
+# if __apple_build_version__ < 17000404
+# error This version of Apple Clang doesn't support preserve_none
+# endif
+#endif
+
#include <stdio.h>
#include <stdint.h> |
|
nice suggestion, going to try it. |
arnaud-lb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not able to test right now, but the zend_portability.h change looks right to me, and is probably enough. It also makes sense that it’s disabling musttail rather than preserve_none, even if the end result is the same, as the build issue is related to musttail.
| #endif | ||
|
|
||
|
|
||
| #if !defined(__apple_build_version__) || (defined(__apple_build_version__) && __apple_build_version__ >= 17000404) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: please indent the nested cpp directives (with a space after the #)
Established that build < 1700.4.4.1 tends to fail thus we disable the preserve_none attribute feature for these cases.