Skip to content

Commit 1624e17

Browse files
committed
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.
1 parent 937dfa8 commit 1624e17

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

configure.ac

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,6 @@ if test x$ac_cv_sys_large_files != x &&
813813
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
814814
fi
815815

816-
AX_GCC_FUNC_ATTRIBUTE([visibility])
817816
AX_GCC_FUNC_ATTRIBUTE([dllexport])
818817
AX_GCC_FUNC_ATTRIBUTE([dllimport])
819818

@@ -984,13 +983,13 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
984983
[ AC_MSG_RESULT(no)]
985984
)
986985

987-
AC_MSG_CHECKING([for visibility attribute])
988-
AC_LINK_IFELSE([AC_LANG_SOURCE([
989-
int foo_def( void ) __attribute__((visibility("default")));
986+
AC_MSG_CHECKING([for default visibility attribute])
987+
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
988+
int foo(void) __attribute__((visibility("default")));
990989
int main(){}
991990
])],
992991
[
993-
AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE,1,[Define if the visibility attribute is supported.])
992+
AC_DEFINE(HAVE_DEFAULT_VISIBILITY_ATTRIBUTE,1,[Define if the visibility attribute is supported.])
994993
AC_MSG_RESULT(yes)
995994
],
996995
[

src/script/bitcoinconsensus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#define EXPORT_SYMBOL
1919
#endif
2020
#endif
21-
#elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY)
21+
#elif defined(HAVE_DEFAULT_VISIBILITY_ATTRIBUTE)
2222
#define EXPORT_SYMBOL __attribute__ ((visibility ("default")))
2323
#endif
2424
#elif defined(MSC_VER) && !defined(STATIC_LIBBITCOINCONSENSUS)

0 commit comments

Comments
 (0)