AC_DEFUN([AC_PROG_LD])
])
-dnl Check whether the target is ILP32.
-AC_DEFUN([LIBGFOR_TARGET_ILP32], [
- AC_CACHE_CHECK([whether the target is ILP32], target_ilp32, [
- save_CFLAGS="$CFLAGS"
- CFLAGS="-O2"
- AC_TRY_LINK(,[
-if (sizeof(int) == 4 && sizeof(long) == 4 && sizeof(void *) == 4)
- ;
-else
- undefined_function ();
- ],
- target_ilp32=yes,
- target_ilp32=no)
- CFLAGS="$save_CFLAGS"])
- if test $target_ilp32 = yes; then
- AC_DEFINE(TARGET_ILP32, 1,
- [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],
FPU_HOST_HEADER=config/${fpu_host}.h
-# Attempt to assert that the target is of common type in case we don't
-# have C99 integer types at all.
-
- echo "$as_me:$LINENO: checking whether the target is ILP32" >&5
-echo $ECHO_N "checking whether the target is ILP32... $ECHO_C" >&6
-if test "${target_ilp32+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- save_CFLAGS="$CFLAGS"
- CFLAGS="-O2"
- if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
-if (sizeof(int) == 4 && sizeof(long) == 4 && sizeof(void *) == 4)
- ;
-else
- undefined_function ();
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- target_ilp32=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-target_ilp32=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- CFLAGS="$save_CFLAGS"
-fi
-echo "$as_me:$LINENO: result: $target_ilp32" >&5
-echo "${ECHO_T}$target_ilp32" >&6
- if test $target_ilp32 = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define TARGET_ILP32 1
-_ACEOF
-
- fi
-
-
# Check out attribute support.
echo "$as_me:$LINENO: checking whether the target supports hidden visibility" >&5