Skip to content

Commit dda7fbc

Browse files
committed
Merge #113: cmake: Backport PR29263 from the master branch
33a454e fixup! cmake: Check system symbols (Hennadii Stepanov) 3cb2e65 fixup! cmake: Check system headers (Hennadii Stepanov) Pull request description: This PR backports build system changes from bitcoin#29263. ACKs for top commit: pablomartin4btc: ACK 33a454e Tree-SHA512: 1793c6504a7190134c0ce075e959d22c4a3640d54a4d141f5117975bed267952cc8c7da488426e48022eba1eb77d3353783d77a20907b0cfa183e0b68d824133
2 parents 822c3fc + 33a454e commit dda7fbc

File tree

2 files changed

+0
-98
lines changed

2 files changed

+0
-98
lines changed

cmake/bitcoin-config.h.in

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,6 @@
4343
/* Define this symbol if you have __builtin_clzll */
4444
#cmakedefine HAVE_BUILTIN_CLZLL 1
4545

46-
/* Define to 1 if you have the <byteswap.h> header file. */
47-
#cmakedefine HAVE_BYTESWAP_H 1
48-
49-
/* Define to 1 if you have the declaration of `be16toh', and to 0 if you
50-
don't. */
51-
#cmakedefine01 HAVE_DECL_BE16TOH
52-
53-
/* Define to 1 if you have the declaration of `be32toh', and to 0 if you
54-
don't. */
55-
#cmakedefine01 HAVE_DECL_BE32TOH
56-
57-
/* Define to 1 if you have the declaration of `be64toh', and to 0 if you
58-
don't. */
59-
#cmakedefine01 HAVE_DECL_BE64TOH
60-
61-
/* Define to 1 if you have the declaration of `bswap_16', and to 0 if you
62-
don't. */
63-
#cmakedefine01 HAVE_DECL_BSWAP_16
64-
65-
/* Define to 1 if you have the declaration of `bswap_32', and to 0 if you
66-
don't. */
67-
#cmakedefine01 HAVE_DECL_BSWAP_32
68-
69-
/* Define to 1 if you have the declaration of `bswap_64', and to 0 if you
70-
don't. */
71-
#cmakedefine01 HAVE_DECL_BSWAP_64
72-
7346
/* Define to 1 if you have the declaration of `fork', and to 0 if you don't.
7447
*/
7548
#cmakedefine01 HAVE_DECL_FORK
@@ -82,42 +55,6 @@
8255
don't. */
8356
#cmakedefine01 HAVE_DECL_GETIFADDRS
8457

85-
/* Define to 1 if you have the declaration of `htobe16', and to 0 if you
86-
don't. */
87-
#cmakedefine01 HAVE_DECL_HTOBE16
88-
89-
/* Define to 1 if you have the declaration of `htobe32', and to 0 if you
90-
don't. */
91-
#cmakedefine01 HAVE_DECL_HTOBE32
92-
93-
/* Define to 1 if you have the declaration of `htobe64', and to 0 if you
94-
don't. */
95-
#cmakedefine01 HAVE_DECL_HTOBE64
96-
97-
/* Define to 1 if you have the declaration of `htole16', and to 0 if you
98-
don't. */
99-
#cmakedefine01 HAVE_DECL_HTOLE16
100-
101-
/* Define to 1 if you have the declaration of `htole32', and to 0 if you
102-
don't. */
103-
#cmakedefine01 HAVE_DECL_HTOLE32
104-
105-
/* Define to 1 if you have the declaration of `htole64', and to 0 if you
106-
don't. */
107-
#cmakedefine01 HAVE_DECL_HTOLE64
108-
109-
/* Define to 1 if you have the declaration of `le16toh', and to 0 if you
110-
don't. */
111-
#cmakedefine01 HAVE_DECL_LE16TOH
112-
113-
/* Define to 1 if you have the declaration of `le32toh', and to 0 if you
114-
don't. */
115-
#cmakedefine01 HAVE_DECL_LE32TOH
116-
117-
/* Define to 1 if you have the declaration of `le64toh', and to 0 if you
118-
don't. */
119-
#cmakedefine01 HAVE_DECL_LE64TOH
120-
12158
/* Define to 1 if you have the declaration of `pipe2', and to 0 if you don't.
12259
*/
12360
#cmakedefine01 HAVE_DECL_PIPE2
@@ -132,9 +69,6 @@
13269
/* Define if the dllexport attribute is supported. */
13370
#cmakedefine HAVE_DLLEXPORT_ATTRIBUTE 1
13471

135-
/* Define to 1 if you have the <endian.h> header file. */
136-
#cmakedefine HAVE_ENDIAN_H 1
137-
13872
/* Define to 1 if fdatasync is available. */
13973
#cmakedefine HAVE_FDATASYNC 1
14074

@@ -169,9 +103,6 @@
169103
/* Define to 1 if std::system or ::wsystem is available. */
170104
#cmakedefine HAVE_SYSTEM 1
171105

172-
/* Define to 1 if you have the <sys/endian.h> header file. */
173-
#cmakedefine HAVE_SYS_ENDIAN_H 1
174-
175106
/* Define this symbol if the Linux getrandom system call is available */
176107
#cmakedefine HAVE_SYS_GETRANDOM 1
177108

cmake/introspection.cmake

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ include(TestBigEndian)
1010
test_big_endian(WORDS_BIGENDIAN)
1111

1212
# The following HAVE_{HEADER}_H variables go to the bitcoin-config.h header.
13-
check_include_file_cxx(byteswap.h HAVE_BYTESWAP_H)
14-
check_include_file_cxx(endian.h HAVE_ENDIAN_H)
15-
check_include_file_cxx(sys/endian.h HAVE_SYS_ENDIAN_H)
1613
check_include_file_cxx(sys/prctl.h HAVE_SYS_PRCTL_H)
1714
check_include_file_cxx(sys/resources.h HAVE_SYS_RESOURCES_H)
1815
check_include_file_cxx(sys/vmmeter.h HAVE_SYS_VMMETER_H)
@@ -36,32 +33,6 @@ check_cxx_source_compiles("
3633

3734
check_cxx_symbol_exists(O_CLOEXEC "fcntl.h" HAVE_O_CLOEXEC)
3835

39-
if(HAVE_BYTESWAP_H)
40-
check_cxx_symbol_exists(bswap_16 "byteswap.h" HAVE_DECL_BSWAP_16)
41-
check_cxx_symbol_exists(bswap_32 "byteswap.h" HAVE_DECL_BSWAP_32)
42-
check_cxx_symbol_exists(bswap_64 "byteswap.h" HAVE_DECL_BSWAP_64)
43-
endif()
44-
45-
if(HAVE_ENDIAN_H OR HAVE_SYS_ENDIAN_H)
46-
if(HAVE_ENDIAN_H)
47-
set(ENDIAN_HEADER "endian.h")
48-
else()
49-
set(ENDIAN_HEADER "sys/endian.h")
50-
endif()
51-
check_cxx_symbol_exists(be16toh ${ENDIAN_HEADER} HAVE_DECL_BE16TOH)
52-
check_cxx_symbol_exists(be32toh ${ENDIAN_HEADER} HAVE_DECL_BE32TOH)
53-
check_cxx_symbol_exists(be64toh ${ENDIAN_HEADER} HAVE_DECL_BE64TOH)
54-
check_cxx_symbol_exists(htobe16 ${ENDIAN_HEADER} HAVE_DECL_HTOBE16)
55-
check_cxx_symbol_exists(htobe32 ${ENDIAN_HEADER} HAVE_DECL_HTOBE32)
56-
check_cxx_symbol_exists(htobe64 ${ENDIAN_HEADER} HAVE_DECL_HTOBE64)
57-
check_cxx_symbol_exists(htole16 ${ENDIAN_HEADER} HAVE_DECL_HTOLE16)
58-
check_cxx_symbol_exists(htole32 ${ENDIAN_HEADER} HAVE_DECL_HTOLE32)
59-
check_cxx_symbol_exists(htole64 ${ENDIAN_HEADER} HAVE_DECL_HTOLE64)
60-
check_cxx_symbol_exists(le16toh ${ENDIAN_HEADER} HAVE_DECL_LE16TOH)
61-
check_cxx_symbol_exists(le32toh ${ENDIAN_HEADER} HAVE_DECL_LE32TOH)
62-
check_cxx_symbol_exists(le64toh ${ENDIAN_HEADER} HAVE_DECL_LE64TOH)
63-
endif()
64-
6536
check_include_file_cxx(unistd.h HAVE_UNISTD_H)
6637
if(HAVE_UNISTD_H)
6738
check_cxx_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC)

0 commit comments

Comments
 (0)