Skip to content

Commit 4b2e2a1

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents 71a6d5c + b109607 commit 4b2e2a1

File tree

5 files changed

+20
-89
lines changed

5 files changed

+20
-89
lines changed

cmake/Zend/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)
536536
else()
537-
set_property(CACHE ZEND_SIGNALS PROPERTY VALUE OFF)
537+
set(ZEND_SIGNALS OFF)
538538
message(CHECK_FAIL "no")
539539
endif()
540540
add_feature_info(

cmake/cmake/ConfigureChecks.cmake

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@ include(FeatureSummary)
1515
include(PHP/CheckAttribute)
1616
include(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")
434451
endif()
435452

436-
# Check target system byte order.
437-
include(PHP/CheckByteOrder)
438-
439453
# Check for IPv6 support.
440454
include(PHP/CheckIPv6)
441455

cmake/cmake/modules/PHP/CheckByteOrder.cmake

Lines changed: 0 additions & 79 deletions
This file was deleted.

cmake/cmake/toolchains/template.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ set(PHP_IRIX_TIME_R_EXITCODE 1)
4848
# Set the exit code for the writing to stdout check.
4949
set(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
################################################################################

cmake/ext/hash/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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")
111111
else()
112112
block()
113113
if(CMAKE_SIZEOF_VOID_P EQUAL 4)

0 commit comments

Comments
 (0)