diff options
Diffstat (limited to 'bfd/configure.ac')
-rw-r--r-- | bfd/configure.ac | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/configure.ac b/bfd/configure.ac index b320828..bb5c168 100644 --- a/bfd/configure.ac +++ b/bfd/configure.ac @@ -256,12 +256,15 @@ AC_CHECK_DECLS(strnlen) # This is used only by compress.c. AM_ZLIB +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Werror" AC_CACHE_CHECK([compiler support for hidden visibility], bfd_cv_hidden, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ const char hw[] __attribute__ ((__visibility__ ("hidden"))) = "Hello, World\n"; extern void print (const char *) __attribute__ ((__visibility__ ("hidden")));]], [[print (hw);]])], [bfd_cv_hidden=yes], [bfd_cv_hidden=no])]) +CFLAGS="$save_CFLAGS" if test $bfd_cv_hidden = yes; then AC_DEFINE(HAVE_HIDDEN, 1, [Define if your compiler supports hidden visibility.]) |