Fix GH-20767: build failure with preserve_none attribute enabled on mac.#20777
Fix GH-20767: build failure with preserve_none attribute enabled on mac.#20777devnexen wants to merge 6 commits into
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.
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.
Nit: please indent the nested cpp directives (with a space after the #)
There was a problem hiding this comment.
I do not get your suggestion @henderkes, it is not within a nested part is it ?
There was a problem hiding this comment.
Oops, didn't see the #endif just above. Ignore the suggestion then.
|
Thanks. Confirmed working on both broken clang (1700.0.13.5) and working (1700.6.3.2) with expected VM types. |
Established that build < 1700.4.4.1 tends to fail thus we disable the preserve_none attribute feature for these cases.