diff options
author | fanquake <fanquake@gmail.com> | 2020-07-14 19:06:37 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-02-12 09:04:15 +0800 |
commit | 1624e17b5430dfe808bb3b1b79dfa53bf45aa053 (patch) | |
tree | b735d373e3519ba2b81536c36f35f91c9e10a5e7 | |
parent | 937dfa8398736b3138e3e667679c4878566f2866 (diff) | |
download | bitcoin-1624e17b5430dfe808bb3b1b79dfa53bf45aa053.tar.xz |
build: remove duplicate visibility attribute detection
We are already testing for this, and our test works correctly with a Darwin
target, where the macro does not. Darwin targets do not support "protected"
visibility.
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | src/script/bitcoinconsensus.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 4ac985abdc..b80bde81d4 100644 --- a/configure.ac +++ b/configure.ac @@ -813,7 +813,6 @@ if test x$ac_cv_sys_large_files != x && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files" fi -AX_GCC_FUNC_ATTRIBUTE([visibility]) AX_GCC_FUNC_ATTRIBUTE([dllexport]) AX_GCC_FUNC_ATTRIBUTE([dllimport]) @@ -984,13 +983,13 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ [ AC_MSG_RESULT(no)] ) -AC_MSG_CHECKING([for visibility attribute]) -AC_LINK_IFELSE([AC_LANG_SOURCE([ - int foo_def( void ) __attribute__((visibility("default"))); +AC_MSG_CHECKING([for default visibility attribute]) +AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + int foo(void) __attribute__((visibility("default"))); int main(){} ])], [ - AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE,1,[Define if the visibility attribute is supported.]) + AC_DEFINE(HAVE_DEFAULT_VISIBILITY_ATTRIBUTE,1,[Define if the visibility attribute is supported.]) AC_MSG_RESULT(yes) ], [ diff --git a/src/script/bitcoinconsensus.h b/src/script/bitcoinconsensus.h index c5dceac848..9c966e7c1d 100644 --- a/src/script/bitcoinconsensus.h +++ b/src/script/bitcoinconsensus.h @@ -18,7 +18,7 @@ #define EXPORT_SYMBOL #endif #endif - #elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY) + #elif defined(HAVE_DEFAULT_VISIBILITY_ATTRIBUTE) #define EXPORT_SYMBOL __attribute__ ((visibility ("default"))) #endif #elif defined(MSC_VER) && !defined(STATIC_LIBBITCOINCONSENSUS) |