diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2013-11-22 11:44:56 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2013-11-22 11:44:56 +0000 |
commit | 954d4574058aacd03f1cc7ff27ed52ed8fbae32f (patch) | |
tree | ecf4f142c4963ac96a87adfd48c7b2b184696bbf /libcilkrts/configure | |
parent | 517854bc935fb83fc01263ebd8272de316483d25 (diff) | |
download | gcc-954d4574058aacd03f1cc7ff27ed52ed8fbae32f.zip gcc-954d4574058aacd03f1cc7ff27ed52ed8fbae32f.tar.gz gcc-954d4574058aacd03f1cc7ff27ed52ed8fbae32f.tar.bz2 |
Only use visibility if supported
* configure.ac (libcilkrts_cv_have_attribute_visibility): Check
for __attribute__((visibility)).
* configure: Regenerate.
* include/cilk/common.h (CILK_EXPORT, CILK_EXPORT_DATA): Only use
__attribute__((visibility)) if HAVE_ATTRIBUTE_VISIBILITY.
From-SVN: r205254
Diffstat (limited to 'libcilkrts/configure')
-rw-r--r-- | libcilkrts/configure | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/libcilkrts/configure b/libcilkrts/configure index c510e14..d60ac41 100644 --- a/libcilkrts/configure +++ b/libcilkrts/configure @@ -4874,6 +4874,33 @@ _ACEOF fi +# Check whether the target supports protected visibility. +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Werror" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +void __attribute__((visibility("protected"))) foo(void) { } +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + libcilkrts_cv_have_attribute_visibility=yes +else + libcilkrts_cv_have_attribute_visibility=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS="$save_CFLAGS" +if test $libcilkrts_cv_have_attribute_visibility = yes; then + +$as_echo "#define HAVE_ATTRIBUTE_VISIBILITY 1" >>confdefs.h + +fi + # Get target configury. . ${srcdir}/configure.tgt if test -n "$UNSUPPORTED"; then @@ -11060,7 +11087,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11063 "configure" +#line 11090 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11166,7 +11193,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11169 "configure" +#line 11196 "configure" #include "confdefs.h" #if HAVE_DLFCN_H |