summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2013-10-21 13:14:46 +0200
committerJon Olav Hauglid <jon.hauglid@oracle.com>2013-10-21 13:14:46 +0200
commit63a205d4a00670298f0c3568ba7af8c5a1b3fee2 (patch)
tree2e36323fe03f2f03af773c874f505e0b3acb480e /cmake
parentc5896384bda582ec6f43ceb3fe9e7530e0bf819d (diff)
downloadmariadb-git-63a205d4a00670298f0c3568ba7af8c5a1b3fee2.tar.gz
Bug#17632386: WITH_ASAN CONFLICTS WITH -WL,--NO-UNDEFINED
-Wl,--no-undefined (=-z defs) gives linking errors when used with WITH_ASAN. According to the documentation: "When linking shared libraries, the AddressSanitizer run-time is not linked, so -Wl,-z,defs may cause link errors (don’t use it with AddressSanitizer)." This patch turns off -Wl,--no-undefined if WITH_ASAN is used.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/os/Linux.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/os/Linux.cmake b/cmake/os/Linux.cmake
index 61361d1d48b..5a1bd2f2d0d 100644
--- a/cmake/os/Linux.cmake
+++ b/cmake/os/Linux.cmake
@@ -1,5 +1,5 @@
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -33,7 +33,10 @@ ENDFOREACH()
# Ensure we have clean build for shared libraries
# without unresolved symbols
-SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
+# Not supported with AddressSanitizer
+IF(NOT WITH_ASAN)
+ SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
+ENDIF()
# 64 bit file offset support flag
SET(_FILE_OFFSET_BITS 64)