summaryrefslogtreecommitdiff
path: root/libgfortran/acinclude.m4
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-12 08:59:05 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-12 08:59:05 +0000
commit7b6cb5bd2ce5a30c6074488312de984b1c69674a (patch)
treecb0ecd2cd7b8c21d4d1c38261b5b7116e8dd2782 /libgfortran/acinclude.m4
parent2027d2d27693ee46db98fb7d407b8856d64fb864 (diff)
downloadgcc-7b6cb5bd2ce5a30c6074488312de984b1c69674a.tar.gz
* acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
(LIBGFOR_CHECK_ATTRIBUTE_DLLEXPORT): New. (LIBGFOR_CHECK_ATTRIBUTE_ALIAS): New. * configure.ac: Use them. * configure, config.h.in, aclocal.m4: Rebuild. * libgfortran.h (prefix): Remove. (PREFIX, IPREFIX): New. (sym_rename, sym_rename1, sym_rename2): New. (internal_proto, export_proto, export_proto_np): New. (iexport_proto, iexport): New. (iexport_data_proto, iexport_data): New. * intrinsics/abort.c, intrinsics/args.c, intrinsics/associated.c, intrinsics/cpu_time.c, intrinsics/cshift0.c, intrinsics/date_and_time.c, intrinsics/env.c, intrinsics/eoshift0.c, intrinsics/eoshift2.c, intrinsics/etime.c, intrinsics/exit.c, intrinsics/flush.c, intrinsics/fnum.c, intrinsics/getXid.c, intrinsics/getcwd.c, intrinsics/ishftc.c, intrinsics/mvbits.c, intrinsics/pack_generic.c, intrinsics/rand.c, intrinsics/random.c, intrinsics/reshape_generic.c, intrinsics/size.c, intrinsics/spread_generic.c, intrinsics/stat.c, intrinsics/string_intrinsics.c, intrinsics/system.c, intrinsics/system_clock.c, intrinsics/transpose_generic.c, intrinsics/umask.c, intrinsics/unlink.c, intrinsics/unpack_generic.c, io/backspace.c, io/close.c, io/endfile.c, io/inquire.c, io/io.h, io/open.c, io/rewind.c, io/transfer.c, libgfortran.h, m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/exponent.m4, m4/fraction.m4, m4/iforeach.m4, m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4, m4/nearest.m4, m4/pow.m4, m4/reshape.m4, m4/set_exponent.m4, m4/shape.m4, m4/transpose.m4, runtime/environ.c, runtime/error.c, runtime/in_pack_generic.c, runtime/in_unpack_generic.c, runtime/main.c, runtime/memory.c, runtime/pause.c, runtime/select.c, runtime/stop.c: Use them to mark symbols internal or external. * generated/*: Rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92045 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/acinclude.m4')
-rw-r--r--libgfortran/acinclude.m446
1 files changed, 46 insertions, 0 deletions
diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4
index 87dc72283f9..2dc8f85e16b 100644
--- a/libgfortran/acinclude.m4
+++ b/libgfortran/acinclude.m4
@@ -102,3 +102,49 @@ else
[Define to 1 if the target is ILP32.])
fi
])
+
+dnl Check whether the target supports hidden visibility.
+AC_DEFUN([LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY], [
+ AC_CACHE_CHECK([whether the target supports hidden visibility],
+ have_attribute_visibility, [
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror"
+ AC_TRY_COMPILE([void __attribute__((visibility("hidden"))) foo(void) { }],
+ [], have_attribute_visibility=yes,
+ have_attribute_visibility=no)
+ CFLAGS="$save_CFLAGS"])
+ if test $have_attribute_visibility = yes; then
+ AC_DEFINE(HAVE_ATTRIBUTE_VISIBILITY, 1,
+ [Define to 1 if the target supports __attribute__((visibility(...))).])
+ fi])
+
+dnl Check whether the target supports dllexport
+AC_DEFUN([LIBGFOR_CHECK_ATTRIBUTE_DLLEXPORT], [
+ AC_CACHE_CHECK([whether the target supports dllexport],
+ have_attribute_dllexport, [
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror"
+ AC_TRY_COMPILE([void __attribute__((dllexport)) foo(void) { }],
+ [], have_attribute_dllexport=yes,
+ have_attribute_dllexport=no)
+ CFLAGS="$save_CFLAGS"])
+ if test $have_attribute_dllexport = yes; then
+ AC_DEFINE(HAVE_ATTRIBUTE_DLLEXPORT, 1,
+ [Define to 1 if the target supports __attribute__((dllexport)).])
+ fi])
+
+dnl Check whether the target supports symbol aliases.
+AC_DEFUN([LIBGFOR_CHECK_ATTRIBUTE_ALIAS], [
+ AC_CACHE_CHECK([whether the target supports symbol aliases],
+ have_attribute_alias, [
+ AC_TRY_LINK([
+#define ULP STR1(__USER_LABEL_PREFIX__)
+#define STR1(x) STR2(x)
+#define STR2(x) #x
+void foo(void) { }
+extern void bar(void) __attribute__((alias(ULP "foo")));],
+ [bar();], have_attribute_alias=yes, have_attribute_alias=no)])
+ if test $have_attribute_alias = yes; then
+ AC_DEFINE(HAVE_ATTRIBUTE_ALIAS, 1,
+ [Define to 1 if the target supports __attribute__((alias(...))).])
+ fi])