File tree Expand file tree Collapse file tree 3 files changed +38
-20
lines changed Expand file tree Collapse file tree 3 files changed +38
-20
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ include_guard(GLOBAL)
1212
1313include (CheckFunctionExists)
1414include (CheckIncludeFiles)
15- include (CheckSourceCompiles)
1615include (CheckStructHasMember)
1716include (CheckSymbolExists)
1817include (CheckTypeSize)
@@ -438,24 +437,6 @@ else()
438437 message (CHECK_PASS "using system default" )
439438endif ()
440439
441- message (CHECK_START "Checking whether the compiler supports __alignof__" )
442- cmake_push_check_state(RESET)
443- set (CMAKE_REQUIRED_QUIET TRUE )
444- check_source_compiles(C [[
445- int main(void)
446- {
447- int align = __alignof__(int);
448- (void)align;
449- return 0;
450- }
451- ]] HAVE_ALIGNOF)
452- cmake_pop_check_state()
453- if (HAVE_ALIGNOF)
454- message (CHECK_PASS "yes" )
455- else ()
456- message (CHECK_FAIL "no" )
457- endif ()
458-
459440# Check for GCC function attributes on all systems except ones without glibc.
460441# Fix for these systems is already included in GCC 7, but not on GCC 6. At least
461442# some versions of FreeBSD seem to have buggy ifunc support, see
Original file line number Diff line number Diff line change 1+ #[=============================================================================[
2+ This check determines whether the compiler supports __alignof__.
3+
4+ Result variables:
5+
6+ * HAVE_ALIGNOF
7+ #]=============================================================================]
8+
9+ include (CheckSourceCompiles)
10+ include (CMakePushCheckState)
11+
12+ if (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
13+ set (HAVE_ALIGNOF FALSE )
14+ return ()
15+ endif ()
16+
17+ # Skip in consecutive configuration phases.
18+ if (NOT DEFINED PHP_HAS_ALIGNOF)
19+ message (CHECK_START "Checking whether the compiler supports __alignof__" )
20+ cmake_push_check_state(RESET)
21+ set (CMAKE_REQUIRED_QUIET TRUE )
22+ check_source_compiles(C [[
23+ int main(void)
24+ {
25+ int align = __alignof__(int);
26+ (void)align;
27+ return 0;
28+ }
29+ ]] PHP_HAS_ALIGNOF)
30+ cmake_pop_check_state()
31+ if (PHP_HAS_ALIGNOF)
32+ message (CHECK_PASS "yes" )
33+ else ()
34+ message (CHECK_FAIL "no" )
35+ endif ()
36+ endif ()
37+
38+ set (HAVE_ALIGNOF ${PHP_HAS_ALIGNOF} )
Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
5454 # known on Windows targets.
5555 ##############################################################################
5656
57- set (HAVE_ALIGNOF FALSE )
5857 set (HAVE_ALPHASORT FALSE )
5958 set (HAVE_ARPA_INET_H FALSE )
6059 set (HAVE_ARPA_NAMESER_H FALSE )
You can’t perform that action at this time.
0 commit comments