File tree Expand file tree Collapse file tree 5 files changed +20
-89
lines changed Expand file tree Collapse file tree 5 files changed +20
-89
lines changed Original file line number Diff line number Diff line change @@ -534,7 +534,7 @@ if(HAVE_SIGACTION AND ZEND_SIGNALS)
534534 # files, therefore also compilation definition is added.
535535 target_compile_definitions (zend PUBLIC ZEND_SIGNALS)
536536else ()
537- set_property ( CACHE ZEND_SIGNALS PROPERTY VALUE OFF )
537+ set ( ZEND_SIGNALS OFF )
538538 message (CHECK_FAIL "no" )
539539endif ()
540540add_feature_info(
Original file line number Diff line number Diff line change @@ -15,6 +15,23 @@ include(FeatureSummary)
1515include (PHP/CheckAttribute)
1616include (PHP/SearchLibraries)
1717
18+ ################################################################################
19+ # General checks.
20+ ################################################################################
21+
22+ message (CHECK_START "Checking target system endianness (byte ordering)" )
23+ if (CMAKE_C_BYTE_ORDER STREQUAL "BIG_ENDIAN" )
24+ message (CHECK_PASS "big-endian" )
25+ set (WORDS_BIGENDIAN TRUE )
26+ elseif (CMAKE_C_BYTE_ORDER STREQUAL "LITTLE_ENDIAN" )
27+ message (CHECK_PASS "little-endian" )
28+ set (WORDS_BIGENDIAN FALSE )
29+ else ()
30+ set (WORDS_BIGENDIAN FALSE )
31+ message (CHECK_FAIL "unknown" )
32+ message (WARNING "Endianness could not be determined. Assuming little-endian." )
33+ endif ()
34+
1835################################################################################
1936# Check headers.
2037################################################################################
@@ -433,9 +450,6 @@ else()
433450 message (CHECK_PASS "using system default" )
434451endif ()
435452
436- # Check target system byte order.
437- include (PHP/CheckByteOrder)
438-
439453# Check for IPv6 support.
440454include (PHP/CheckIPv6)
441455
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -48,10 +48,6 @@ set(PHP_IRIX_TIME_R_EXITCODE 1)
4848# Set the exit code for the writing to stdout check.
4949set (PHP_WRITE_STDOUT_EXITCODE 0)
5050
51- # Set the exit code of the byte ordering fallback check. When targeting a
52- # big-endian system, set it to 0, and for little-endian set it to 1.
53- set (WORDS_BIGENDIAN_EXITCODE 1)
54-
5551################################################################################
5652# Zend Engine
5753################################################################################
Original file line number Diff line number Diff line change @@ -105,9 +105,9 @@ target_sources(
105105 xxhash/xxhash.h
106106)
107107
108- if (WORDS_BIGENDIAN )
108+ if (CMAKE_C_BYTE_ORDER STREQUAL "BIG_ENDIAN" )
109109 set (HAVE_SLOW_HASH3 TRUE )
110- message (WARNING "Using slow SHA3 implementation on bigendian " )
110+ message (WARNING "Using slow SHA3 implementation on big-endian " )
111111else ()
112112 block()
113113 if (CMAKE_SIZEOF_VOID_P EQUAL 4)
You can’t perform that action at this time.
0 commit comments