Skip to content

Commit db70cc2

Browse files
committed
Merge pull request monero-project#9171
35477a6 build: remove glibc backcompat (tobtoht)
2 parents 1179269 + 35477a6 commit db70cc2

File tree

8 files changed

+3
-153
lines changed

8 files changed

+3
-153
lines changed

CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -881,12 +881,6 @@ else()
881881
set(LD_SECURITY_FLAGS "${LD_SECURITY_FLAGS} -Wl,-z,noexecheap")
882882
endif()
883883

884-
if(BACKCOMPAT)
885-
add_linker_flag_if_supported(-Wl,--wrap=__divmoddi4 LD_BACKCOMPAT_FLAGS)
886-
add_linker_flag_if_supported(-Wl,--wrap=glob LD_BACKCOMPAT_FLAGS)
887-
message(STATUS "Using Lib C back compat flags: ${LD_BACKCOMPAT_FLAGS}")
888-
endif()
889-
890884
# some windows linker bits
891885
if (WIN32)
892886
add_linker_flag_if_supported(-Wl,--dynamicbase LD_SECURITY_FLAGS)
@@ -907,7 +901,7 @@ else()
907901

908902
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${PIC_FLAG} ${C_SECURITY_FLAGS}")
909903
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_CPP_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${PIC_FLAG} ${CXX_SECURITY_FLAGS}")
910-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${LD_BACKCOMPAT_FLAGS}")
904+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS}")
911905

912906
# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
913907
# is fixed in the code (Issue #847), force compiler to be conservative.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ The required packages are the names for each toolchain on apt. Depending on your
508508

509509
Using `depends` might also be easier to compile Monero on Windows than using MSYS. Activate Windows Subsystem for Linux (WSL) with a distro (for example Ubuntu), install the apt build-essentials and follow the `depends` steps as depicted above.
510510

511-
The produced binaries still link libc dynamically. If the binary is compiled on a current distribution, it might not run on an older distribution with an older installation of libc. Passing `-DBACKCOMPAT=ON` to cmake will make sure that the binary will run on systems having at least libc version 2.17.
511+
The produced binaries still link libc dynamically. If the binary is compiled on a current distribution, it might not run on an older distribution with an older installation of libc.
512512

513513
### Trezor hardware wallet support
514514

contrib/depends/packages/sodium.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ $(package)_version=1.0.18
33
$(package)_download_path=https://download.libsodium.org/libsodium/releases/
44
$(package)_file_name=libsodium-$($(package)_version).tar.gz
55
$(package)_sha256_hash=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1
6-
$(package)_patches=disable-glibc-getrandom-getentropy.patch fix-whitespace.patch
6+
$(package)_patches=fix-whitespace.patch
77

88
define $(package)_set_vars
99
$(package)_config_opts=--enable-static --disable-shared
1010
$(package)_config_opts+=--prefix=$(host_prefix)
1111
endef
1212

1313
define $(package)_preprocess_cmds
14-
patch -p1 < $($(package)_patch_dir)/disable-glibc-getrandom-getentropy.patch &&\
1514
autoconf &&\
1615
patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch
1716
endef

contrib/depends/packages/unbound.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ $(package)_download_path=https://www.nlnetlabs.nl/downloads/$(package)/
44
$(package)_file_name=$(package)-$($(package)_version).tar.gz
55
$(package)_sha256_hash=bc1d576f3dd846a0739adc41ffaa702404c6767d2b6082deb9f2f97cbb24a3a9
66
$(package)_dependencies=openssl expat
7-
$(package)_patches=disable-glibc-reallocarray.patch
87

98

109
define $(package)_set_vars
@@ -19,7 +18,6 @@ define $(package)_set_vars
1918
endef
2019

2120
define $(package)_preprocess_cmds
22-
patch -p1 < $($(package)_patch_dir)/disable-glibc-reallocarray.patch &&\
2321
autoconf
2422
endef
2523

contrib/depends/patches/sodium/disable-glibc-getrandom-getentropy.patch

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

contrib/depends/patches/unbound/disable-glibc-reallocarray.patch

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

src/common/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ if (STACK_TRACE)
5252
list(APPEND common_sources stack_trace.cpp)
5353
endif()
5454

55-
if (BACKCOMPAT)
56-
list(APPEND common_sources compat/glibc_compat.cpp)
57-
endif()
58-
5955
set(common_headers)
6056

6157
monero_find_all_headers(common_private_headers "${CMAKE_CURRENT_SOURCE_DIR}")

src/common/compat/glibc_compat.cpp

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

0 commit comments

Comments
 (0)