Skip to content

Commit

Permalink
Merge pull request #2674 from terrelln/trace-aix
Browse files Browse the repository at this point in the history
[trace] Refine the ZSTD_HAVE_WEAK_SYMBOLS detection
  • Loading branch information
terrelln authored May 19, 2021
2 parents d92fef0 + 746f797 commit ba500c8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/common/zstd_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,19 @@ extern "C" {

#include <stddef.h>

/* weak symbol support */
#if !defined(ZSTD_HAVE_WEAK_SYMBOLS) && defined(__GNUC__) && \
/* weak symbol support
* For now, enable conservatively:
* - Only GNUC
* - Only ELF
* - Only x86-64 and i386
* Also, explicitly disable on platforms known not to work so they aren't
* forgotten in the future.
*/
#if !defined(ZSTD_HAVE_WEAK_SYMBOLS) && \
defined(__GNUC__) && defined(__ELF__) && \
(defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)) && \
!defined(__APPLE__) && !defined(_WIN32) && !defined(__MINGW32__) && \
!defined(__CYGWIN__)
!defined(__CYGWIN__) && !defined(_AIX)
# define ZSTD_HAVE_WEAK_SYMBOLS 1
#else
# define ZSTD_HAVE_WEAK_SYMBOLS 0
Expand Down

0 comments on commit ba500c8

Please sign in to comment.