From 69ac7b0cf88b202da0a770a12fa210f2441e35d0 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 16 Nov 2009 23:01:37 +0000 Subject: Add icc fvisibility bug test --- ares/m4/cares-compilers.m4 | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'ares/m4') diff --git a/ares/m4/cares-compilers.m4 b/ares/m4/cares-compilers.m4 index 715c31eb8..aef46f172 100644 --- a/ares/m4/cares-compilers.m4 +++ b/ares/m4/cares-compilers.m4 @@ -16,7 +16,7 @@ #*************************************************************************** # File version for 'aclocal' use. Keep it a single number. -# serial 61 +# serial 63 dnl CARES_CHECK_COMPILER @@ -1340,9 +1340,20 @@ AC_DEFUN([CARES_CHECK_COMPILER_SYMBOL_HIDING], [ dnl Only icc 9.0 or later if test "$compiler_num" -ge "900"; then if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then - tmp_EXTERN="__attribute__ ((visibility (\"default\")))" - tmp_CFLAGS="-fvisibility=hidden" - supports_symbol_hiding="yes" + tmp_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[ +# include + ]],[[ + printf("icc fvisibility bug test"); + ]]) + ],[ + tmp_EXTERN="__attribute__ ((visibility (\"default\")))" + tmp_CFLAGS="-fvisibility=hidden" + supports_symbol_hiding="yes" + ]) + CFLAGS="$tmp_save_CFLAGS" fi fi ;; -- cgit v1.2.3