Commit 63a205d4 authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

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.
parent c5896384
# 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 # 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 # it under the terms of the GNU General Public License as published by
...@@ -33,7 +33,10 @@ ENDFOREACH() ...@@ -33,7 +33,10 @@ ENDFOREACH()
# Ensure we have clean build for shared libraries # Ensure we have clean build for shared libraries
# without unresolved symbols # 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 # 64 bit file offset support flag
SET(_FILE_OFFSET_BITS 64) SET(_FILE_OFFSET_BITS 64)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment