aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-12-31 15:31:01 -0600
committerluigi1111 <luigi1111w@gmail.com>2018-12-31 15:31:01 -0600
commit3adac4ee2b8432816d85802a91b7b6d67a234bf6 (patch)
tree3dbfce83fa94160a5e685ec1620ecfe7aa5a00a4 /CMakeLists.txt
parentMerge pull request #4928 (diff)
parentAdd glibc back compat code (diff)
downloadmonero-3adac4ee2b8432816d85802a91b7b6d67a234bf6.tar.xz
Merge pull request #4929
5a76933 Add glibc back compat code (TheCharlatan)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 906a1fc6a..31c3dbd21 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -686,6 +686,13 @@ else()
set(LD_SECURITY_FLAGS "${LD_SECURITY_FLAGS} -Wl,-z,noexecheap")
endif()
+ if(BACKCOMPAT)
+ add_definitions(-DFDELT_TYPE=long\ int)
+ add_linker_flag_if_supported(-Wl,--wrap=__divmoddi4 LD_BACKCOMPAT_FLAGS)
+ add_linker_flag_if_supported(-Wl,--wrap=glob LD_BACKCOMPAT_FLAGS)
+ message(STATUS "Using Lib C back compat flags: ${LD_BACKCOMPAT_FLAGS}")
+ endif()
+
# some windows linker bits
if (WIN32)
add_linker_flag_if_supported(-Wl,--dynamicbase LD_SECURITY_FLAGS)
@@ -698,7 +705,7 @@ else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${COVERAGE_FLAGS} ${PIC_FLAG} ${C_SECURITY_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_CPP_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${COVERAGE_FLAGS} ${PIC_FLAG} ${CXX_SECURITY_FLAGS}")
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS}")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${LD_BACKCOMPAT_FLAGS}")
# With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
# is fixed in the code (Issue #847), force compiler to be conservative.