summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in38
1 files changed, 38 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 523e8efe6a..c48c4c1ca6 100644
--- a/configure.in
+++ b/configure.in
@@ -1001,6 +1001,44 @@ EOF
AC_SUBST(libc_cv_asm_protected_directive)
AC_DEFINE(HAVE_PROTECTED)
+ if test $libc_cv_asm_protected_directive = yes; then
+ AC_CACHE_CHECK(whether __attribute__((visibility())) is supported,
+ libc_cv_visibility_attribute,
+ [cat > conftest.c <<EOF
+ int foo __attribute__ ((visibility ("hidden"))) = 1;
+ int bar __attribute__ ((visibility ("protected"))) = 1;
+EOF
+ libc_cv_visibility_attribute=no
+ if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
+ if grep '\.hidden.*foo' conftest.s >/dev/null; then
+ if grep '\.protected.*bar' conftest.s >/dev/null; then
+ libc_cv_visibility_attribute=yes
+ fi
+ fi
+ fi
+ rm -f conftest.[cs]
+ ])
+ if test $libc_cv_visibility_attribute = yes; then
+ AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
+ fi
+ fi
+
+ if test $libc_cv_visibility_attribute = yes -a $gnu_ld = yes; then
+ AC_CACHE_CHECK(whether to put _rtld_local into .sdata section,
+ libc_cv_have_sdata_section,
+ [echo "int i;" > conftest.c
+ libc_cv_have_sdata_section=no
+ if ${CC-cc} -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \
+ | grep '\.sdata' >/dev/null; then
+ libc_cv_have_sdata_section=yes
+ fi
+ rm -f conftest.c conftest.so
+ ])
+ if test $libc_cv_have_sdata_section = yes; then
+ AC_DEFINE(HAVE_SDATA_SECTION)
+ fi
+ fi
+
AC_CACHE_CHECK(for -z nodelete option,
libc_cv_z_nodelete, [dnl
cat > conftest.c <<EOF