aboutsummaryrefslogtreecommitdiff
path: root/bfd/configure
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-05-18 11:35:18 +0930
committerAlan Modra <amodra@gmail.com>2018-05-18 13:07:41 +0930
commit8722de9c419c98ce2fb1f294097244c0bc45e030 (patch)
treee4ccebb6df7eac04525db03b858a76fcd052d6b6 /bfd/configure
parent0b4395434942ecc6f3006004784d19d9a4fbbf55 (diff)
downloadgdb-8722de9c419c98ce2fb1f294097244c0bc45e030.zip
gdb-8722de9c419c98ce2fb1f294097244c0bc45e030.tar.gz
gdb-8722de9c419c98ce2fb1f294097244c0bc45e030.tar.bz2
ATTRIBUTE_HIDDEN for libbfd.h
* libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout. * configure.ac (HAVE_HIDDEN): Check compiler support for hidden visibility. * libbfd.h: Regenerate. * configure: Regenerate. * config.in: Regenerate.
Diffstat (limited to 'bfd/configure')
-rwxr-xr-xbfd/configure33
1 files changed, 33 insertions, 0 deletions
diff --git a/bfd/configure b/bfd/configure
index eb41542..edc1de9 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -14043,6 +14043,39 @@ fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler support for hidden visibility" >&5
+$as_echo_n "checking compiler support for hidden visibility... " >&6; }
+if test "${bfd_cv_hidden+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+const char hw[] __attribute__ ((__visibility__ ("hidden"))) = "Hello, World\n";
+extern void print (const char *) __attribute__ ((__visibility__ ("hidden")));
+int
+main ()
+{
+print (hw);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ bfd_cv_hidden=yes
+else
+ bfd_cv_hidden=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_hidden" >&5
+$as_echo "$bfd_cv_hidden" >&6; }
+if test $bfd_cv_hidden = yes; then
+
+$as_echo "#define HAVE_HIDDEN 1" >>confdefs.h
+
+fi
+
# Check if linker supports --as-needed and --no-as-needed options
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
$as_echo_n "checking linker --as-needed support... " >&6; }