mirror of git://gcc.gnu.org/git/gcc.git
re PR fortran/47571 (undefined reference to clock_gettime in Linux build of 02/01/2011)
PR libfortran/47571 * acinclude.m4 (LIBGFOR_GTHREAD_WEAK): Reinstate. * configure.ac: Call LIBGFOR_GTHREAD_WEAK again. * config.h.in: Regenerate. * configure: Regenerate. From-SVN: r227347
This commit is contained in:
parent
b0eb889bf8
commit
6a822a7403
|
|
@ -1,3 +1,11 @@
|
||||||
|
2015-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR libfortran/47571
|
||||||
|
* acinclude.m4 (LIBGFOR_GTHREAD_WEAK): Reinstate.
|
||||||
|
* configure.ac: Call LIBGFOR_GTHREAD_WEAK again.
|
||||||
|
* config.h.in: Regenerate.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2015-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
2015-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||||
|
|
||||||
PR libfortran/47571
|
PR libfortran/47571
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,28 @@ if (foovar > 10) return __sync_add_and_fetch (&foovar, -1);]])],
|
||||||
[Define to 1 if the target supports __sync_fetch_and_add])
|
[Define to 1 if the target supports __sync_fetch_and_add])
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
|
dnl Check for pragma weak.
|
||||||
|
AC_DEFUN([LIBGFOR_GTHREAD_WEAK], [
|
||||||
|
AC_CACHE_CHECK([whether pragma weak works],
|
||||||
|
libgfor_cv_have_pragma_weak, [
|
||||||
|
gfor_save_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS -Wunknown-pragmas"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
void foo (void);
|
||||||
|
#pragma weak foo
|
||||||
|
]], [[if (foo) foo ();]])],
|
||||||
|
libgfor_cv_have_pragma_weak=yes, libgfor_cv_have_pragma_weak=no)])
|
||||||
|
if test $libgfor_cv_have_pragma_weak = yes; then
|
||||||
|
AC_DEFINE(SUPPORTS_WEAK, 1,
|
||||||
|
[Define to 1 if the target supports #pragma weak])
|
||||||
|
fi
|
||||||
|
case "$host" in
|
||||||
|
*-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
|
||||||
|
AC_DEFINE(GTHREAD_USE_WEAK, 0,
|
||||||
|
[Define to 0 if the target shouldn't use #pragma weak])
|
||||||
|
;;
|
||||||
|
esac])
|
||||||
|
|
||||||
dnl Check whether target effectively supports weakref
|
dnl Check whether target effectively supports weakref
|
||||||
AC_DEFUN([LIBGFOR_CHECK_WEAKREF], [
|
AC_DEFUN([LIBGFOR_CHECK_WEAKREF], [
|
||||||
AC_CACHE_CHECK([whether the target supports weakref],
|
AC_CACHE_CHECK([whether the target supports weakref],
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
|
||||||
|
/* Define to 0 if the target shouldn't use #pragma weak */
|
||||||
|
#undef GTHREAD_USE_WEAK
|
||||||
|
|
||||||
/* Define to 1 if you have the `access' function. */
|
/* Define to 1 if you have the `access' function. */
|
||||||
#undef HAVE_ACCESS
|
#undef HAVE_ACCESS
|
||||||
|
|
||||||
|
|
@ -871,6 +874,9 @@
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Define to 1 if the target supports #pragma weak */
|
||||||
|
#undef SUPPORTS_WEAK
|
||||||
|
|
||||||
/* Define to 1 if the target supports weakref */
|
/* Define to 1 if the target supports weakref */
|
||||||
#undef SUPPORTS_WEAKREF
|
#undef SUPPORTS_WEAKREF
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25953,6 +25953,52 @@ $as_echo "#define HAVE_SYNC_FETCH_AND_ADD 1" >>confdefs.h
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check out #pragma weak.
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pragma weak works" >&5
|
||||||
|
$as_echo_n "checking whether pragma weak works... " >&6; }
|
||||||
|
if test "${libgfor_cv_have_pragma_weak+set}" = set; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
|
||||||
|
gfor_save_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS -Wunknown-pragmas"
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
void foo (void);
|
||||||
|
#pragma weak foo
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if (foo) foo ();
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
libgfor_cv_have_pragma_weak=yes
|
||||||
|
else
|
||||||
|
libgfor_cv_have_pragma_weak=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgfor_cv_have_pragma_weak" >&5
|
||||||
|
$as_echo "$libgfor_cv_have_pragma_weak" >&6; }
|
||||||
|
if test $libgfor_cv_have_pragma_weak = yes; then
|
||||||
|
|
||||||
|
$as_echo "#define SUPPORTS_WEAK 1" >>confdefs.h
|
||||||
|
|
||||||
|
fi
|
||||||
|
case "$host" in
|
||||||
|
*-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
|
||||||
|
|
||||||
|
$as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
|
||||||
|
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Check out weakref support.
|
# Check out weakref support.
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports weakref" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports weakref" >&5
|
||||||
|
|
|
||||||
|
|
@ -595,6 +595,9 @@ LIBGFOR_CHECK_ATTRIBUTE_ALIAS
|
||||||
# Check out sync builtins support.
|
# Check out sync builtins support.
|
||||||
LIBGFOR_CHECK_SYNC_FETCH_AND_ADD
|
LIBGFOR_CHECK_SYNC_FETCH_AND_ADD
|
||||||
|
|
||||||
|
# Check out #pragma weak.
|
||||||
|
LIBGFOR_GTHREAD_WEAK
|
||||||
|
|
||||||
# Check out weakref support.
|
# Check out weakref support.
|
||||||
LIBGFOR_CHECK_WEAKREF
|
LIBGFOR_CHECK_WEAKREF
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue