diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-11 21:18:24 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-08-11 21:18:24 +0000 |
commit | 33b4ca908dbd38df9fa8ccebb4c1b08d33a588f1 (patch) | |
tree | 26c42f7f1f69f7735ef39926c2c1dd7be903a44c /libffi/configure.ac | |
parent | 2e5251888527a5bbf222a02166432959eb42dc0e (diff) | |
download | gcc-33b4ca908dbd38df9fa8ccebb4c1b08d33a588f1.tar.gz |
* configure.ac (HAVE_HIDDEN_VISIBILITY_ATTRIBUTE): New test.
(AH_BOTTOM): Add FFI_HIDDEN definition.
* configure: Rebuilt.
* fficonfig.h.in: Rebuilt.
* src/powerpc/ffi.c (hidden): Remove.
(ffi_closure_LINUX64, ffi_prep_args64, ffi_call_LINUX64,
ffi_closure_helper_LINUX64): Use FFI_HIDDEN instead of hidden.
* src/powerpc/linux64_closure.S (ffi_closure_LINUX64,
.ffi_closure_LINUX64): Use FFI_HIDDEN instead of .hidden.
* src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV): Remove,
add FFI_HIDDEN to its prototype.
(ffi_closure_SYSV_inner): New.
* src/x86/sysv.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New.
* src/x86/win32.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103002 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/configure.ac')
-rw-r--r-- | libffi/configure.ac | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libffi/configure.ac b/libffi/configure.ac index 2bf13f6cde7..eac8e8fe42e 100644 --- a/libffi/configure.ac +++ b/libffi/configure.ac @@ -192,6 +192,38 @@ else [Define to the flags needed for the .section .eh_frame directive.]) fi +AC_CACHE_CHECK([for __attribute__((visibility("hidden")))], + libffi_cv_hidden_visibility_attribute, [ + echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1; }' > conftest.c + libffi_cv_hidden_visibility_attribute=no + if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then + if grep '\.hidden.*foo' conftest.s >/dev/null; then + libffi_cv_hidden_visibility_attribute=yes + fi + fi + rm -f conftest.* + ]) +if test $libffi_cv_hidden_visibility_attribute = yes; then + AC_DEFINE(HAVE_HIDDEN_VISIBILITY_ATTRIBUTE, 1, + [Define if __attribute__((visibility("hidden"))) is supported.]) +fi + +AH_BOTTOM([ +#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE +#ifdef LIBFFI_ASM +#define FFI_HIDDEN(name) .hidden name +#else +#define FFI_HIDDEN __attribute__ ((visibility ("hidden"))) +#endif +#else +#ifdef LIBFFI_ASM +#define FFI_HIDDEN(name) +#else +#define FFI_HIDDEN +#endif +#endif +]) + AC_SUBST(TARGET) AC_SUBST(TARGETDIR) |