You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2020/06/12 07:03:35 UTC
[kudu] branch master updated: KUDU-3145 Skip old gold in our list
of candidate linkers
This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new 3d50fb1 KUDU-3145 Skip old gold in our list of candidate linkers
3d50fb1 is described below
commit 3d50fb1191cfb6c50640992efb23ed1202ce5441
Author: huangtianhua <hu...@gmail.com>
AuthorDate: Mon Jun 8 20:20:45 2020 +0800
KUDU-3145 Skip old gold in our list of candidate linkers
Older versions of the gold linker are vulnerable to a bug which
prevents weak symbols from being overridden properly. This leads to
omitting of Kudu's tcmalloc dependency if using dynamic linking,
and some related tests failed in DEBUG build mode.
This change moves KUDU_LINK setting before choosing the linker
to make sure to skip old gold if using dynamic linking.
Change-Id: I2d7dbd6a828f14a6790be657b0f497a4887a6f82
Reviewed-on: http://gerrit.cloudera.org:8080/16049
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
---
CMakeLists.txt | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d5f9eb7..7b0b3f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -431,6 +431,19 @@ if (${KUDU_USE_TSAN})
endif()
endif()
+# If we still don't know what kind of linking to perform, choose based on
+# build type (developers like fast builds).
+if ("${KUDU_LINK}" STREQUAL "a")
+ if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG" OR
+ "${CMAKE_BUILD_TYPE}" STREQUAL "FASTDEBUG")
+ message("Using dynamic linking for ${CMAKE_BUILD_TYPE} builds")
+ set(KUDU_LINK "d")
+ else()
+ message("Using static linking for ${CMAKE_BUILD_TYPE} builds")
+ set(KUDU_LINK "s")
+ endif()
+endif()
+
include("KuduLinker")
APPEND_LINKER_FLAGS()
@@ -473,19 +486,6 @@ if ("${KUDU_GENERATE_COVERAGE}")
endif()
endif()
-# If we still don't know what kind of linking to perform, choose based on
-# build type (developers like fast builds).
-if ("${KUDU_LINK}" STREQUAL "a")
- if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG" OR
- "${CMAKE_BUILD_TYPE}" STREQUAL "FASTDEBUG")
- message("Using dynamic linking for ${CMAKE_BUILD_TYPE} builds")
- set(KUDU_LINK "d")
- else()
- message("Using static linking for ${CMAKE_BUILD_TYPE} builds")
- set(KUDU_LINK "s")
- endif()
-endif()
-
# Having set KUDU_LINK due to build type and/or sanitizer, it's now safe to
# act on its value.
if ("${KUDU_LINK}" STREQUAL "d")