diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2018-01-17 19:31:43 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2018-01-17 19:31:43 +0000 |
commit | 2d509539dbc127b44a6b1d7b52057f4fe2dc7e87 (patch) | |
tree | 2782603ba550da004785c73d425646cd80645d3c /libsanitizer | |
parent | a4d4d2f5cf230a0125526aea59016c792d807b94 (diff) | |
download | gcc-2d509539dbc127b44a6b1d7b52057f4fe2dc7e87.zip gcc-2d509539dbc127b44a6b1d7b52057f4fe2dc7e87.tar.gz gcc-2d509539dbc127b44a6b1d7b52057f4fe2dc7e87.tar.bz2 |
Guard against undefined weak symbols before Mac OS X 10.9 (PR sanitizer/82825)
PR sanitizer/82825
* sanitizer_common/sanitizer_internal_defs.h: Cherry-pick upstream
r??????.
From-SVN: r256813
Diffstat (limited to 'libsanitizer')
-rw-r--r-- | libsanitizer/ChangeLog | 6 | ||||
-rw-r--r-- | libsanitizer/sanitizer_common/sanitizer_internal_defs.h | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index 2f57f6a..0f2192a 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,3 +1,9 @@ +2018-01-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + PR sanitizer/82825 + * sanitizer_common/sanitizer_internal_defs.h: Cherry-pick upstream + r??????. + 2018-01-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR sanitizer/82824 diff --git a/libsanitizer/sanitizer_common/sanitizer_internal_defs.h b/libsanitizer/sanitizer_common/sanitizer_internal_defs.h index ef405de..edd6a21 100644 --- a/libsanitizer/sanitizer_common/sanitizer_internal_defs.h +++ b/libsanitizer/sanitizer_common/sanitizer_internal_defs.h @@ -63,7 +63,13 @@ // SANITIZER_SUPPORTS_WEAK_HOOKS means that we support real weak functions that // will evaluate to a null pointer when not defined. #ifndef SANITIZER_SUPPORTS_WEAK_HOOKS -#if (SANITIZER_LINUX || SANITIZER_MAC) && !SANITIZER_GO +#if SANITIZER_LINUX && !SANITIZER_GO +# define SANITIZER_SUPPORTS_WEAK_HOOKS 1 +// Before Xcode 4.5, the Darwin linker doesn't reliably support undefined +// weak symbols. Mac OS X 10.9/Darwin 13 is the first release only supported +// by Xcode >= 4.5. +#elif SANITIZER_MAC && \ + __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1090 && !SANITIZER_GO # define SANITIZER_SUPPORTS_WEAK_HOOKS 1 #else # define SANITIZER_SUPPORTS_WEAK_HOOKS 0 |