Skip to content

Commit 02a6fec

Browse files
henderkesarnaud-lb
authored andcommitted
Make preserve_none check lto compatible
Fixes GH-20806 Closes GH-20810
1 parent daf4d54 commit 02a6fec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Zend/Zend.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ uint64_t key = UINT64_C(0x9d7f71d2bd296364);
487487
uintptr_t _a = 0;
488488
uintptr_t _b = 0;
489489
490-
uintptr_t __attribute__((preserve_none)) fun(uintptr_t a, uintptr_t b) {
490+
uintptr_t __attribute__((preserve_none,noinline,used)) fun(uintptr_t a, uintptr_t b) {
491491
_a = a;
492492
_b = b;
493493
return (uintptr_t)const3;
@@ -568,6 +568,7 @@ int main(void) {
568568
[php_cv_preserve_none=no],
569569
[php_cv_preserve_none=no])
570570
])
571+
AC_MSG_RESULT([$php_cv_preserve_none])
571572
AS_VAR_IF([php_cv_preserve_none], [yes], [
572573
AC_DEFINE([HAVE_PRESERVE_NONE], [1],
573574
[Define to 1 if you have preserve_none support.])

0 commit comments

Comments
 (0)