diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2013-10-21 13:14:46 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2013-10-21 13:14:46 +0200 |
commit | f1c8a03e54e27ef6d5d33b4f25438ce4bab0d208 (patch) | |
tree | 2e36323fe03f2f03af773c874f505e0b3acb480e /cmake | |
parent | 60983fa9846ddcf994596ea38b05d8d1d1f113a3 (diff) | |
download | mariadb-git-f1c8a03e54e27ef6d5d33b4f25438ce4bab0d208.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.cmake | 7 |
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) |