File tree Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -17,31 +17,29 @@ message(CHECK_START "Checking whether the stack grows downwards")
1717cmake_push_check_state(RESET)
1818 set (CMAKE_REQUIRED_QUIET TRUE )
1919
20- if (NOT CMAKE_CROSSCOMPILING )
21- check_source_runs(C [[
22- #include <stdint.h>
20+ check_source_runs(C [[
21+ #include <stdint.h>
2322
24- int (*volatile f)(uintptr_t);
23+ int (*volatile f)(uintptr_t);
2524
26- int stack_grows_downwards(uintptr_t arg) {
27- int local;
28- return (uintptr_t)&local < arg;
29- }
25+ int stack_grows_downwards(uintptr_t arg)
26+ {
27+ int local;
28+ return (uintptr_t)&local < arg;
29+ }
3030
31- int main(void) {
32- int local;
31+ int main(void)
32+ {
33+ int local;
3334
34- f = stack_grows_downwards;
35- return f((uintptr_t)&local) ? 0 : 1;
36- }
37- ]] ZEND_CHECK_STACK_LIMIT)
38- endif ()
35+ f = stack_grows_downwards;
36+ return f((uintptr_t)&local) ? 0 : 1;
37+ }
38+ ]] ZEND_CHECK_STACK_LIMIT)
3939cmake_pop_check_state()
4040
4141if (ZEND_CHECK_STACK_LIMIT)
4242 message (CHECK_PASS "yes" )
43- elseif (CMAKE_CROSSCOMPILING )
44- message (CHECK_FAIL "no (cross-compiling)" )
4543else ()
4644 message (CHECK_FAIL "no" )
4745endif ()
Original file line number Diff line number Diff line change @@ -54,3 +54,6 @@ set(PHP_WRITE_STDOUT_EXITCODE 0)
5454
5555# TODO: Fix this better.
5656set (ZEND_MM_OUTPUT "(size_t)8 (size_t)3 0" )
57+
58+ # Set to exit code of the stack limit check.
59+ set (ZEND_CHECK_STACK_LIMIT_EXITCODE 1)
You can’t perform that action at this time.
0 commit comments