diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2011-07-13 14:57:29 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2011-07-13 14:57:29 +0000 |
commit | dbf32ca5be8629b07348051cb86811c022449349 (patch) | |
tree | 133760b21836feaabf58e9e01a0522ecb4834652 /libmudflap | |
parent | 727a65e6fc07ea95309c875978c83c741359ad4e (diff) | |
download | gcc-dbf32ca5be8629b07348051cb86811c022449349.zip gcc-dbf32ca5be8629b07348051cb86811c022449349.tar.gz gcc-dbf32ca5be8629b07348051cb86811c022449349.tar.bz2 |
configure.ac: Don't create pth.
* configure.ac: Don't create pth.
Check for library containing sched_yield.
* configure: Regenerate.
* config.h.in: Regenerate.
* testsuite/lib/libmudflap.exp (libmudflap-init): Use
mfconfig_libs in -static check.
From-SVN: r176237
Diffstat (limited to 'libmudflap')
-rw-r--r-- | libmudflap/ChangeLog | 10 | ||||
-rw-r--r-- | libmudflap/config.h.in | 3 | ||||
-rwxr-xr-x | libmudflap/configure | 57 | ||||
-rw-r--r-- | libmudflap/configure.ac | 7 | ||||
-rw-r--r-- | libmudflap/testsuite/lib/libmudflap.exp | 2 |
5 files changed, 67 insertions, 12 deletions
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index d755ddb..f981b1b 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -1,3 +1,13 @@ +2011-07-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * configure.ac: Don't create pth. + Check for library containing sched_yield. + * configure: Regenerate. + * config.h.in: Regenerate. + + * testsuite/lib/libmudflap.exp (libmudflap-init): Use + mfconfig_libs in -static check. + 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR libmudflap/49550 diff --git a/libmudflap/config.h.in b/libmudflap/config.h.in index 9e4e191..ffdd672 100644 --- a/libmudflap/config.h.in +++ b/libmudflap/config.h.in @@ -126,6 +126,9 @@ /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL +/* Define to 1 if you have the `rt' library (-lrt). */ +#undef HAVE_LIBRT + /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET diff --git a/libmudflap/configure b/libmudflap/configure index d2b9418..3ce3979 100755 --- a/libmudflap/configure +++ b/libmudflap/configure @@ -10986,12 +10986,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -if test ! -d pth -then - # libmudflapth objects are built in this subdirectory - mkdir pth -fi - for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" @@ -11138,6 +11132,57 @@ fi fi +ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield" +if test "x$ac_cv_func_sched_yield" = x""yes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 +$as_echo_n "checking for sched_yield in -lrt... " >&6; } +if test "${ac_cv_lib_rt_sched_yield+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sched_yield (); +int +main () +{ +return sched_yield (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rt_sched_yield=yes +else + ac_cv_lib_rt_sched_yield=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 +$as_echo "$ac_cv_lib_rt_sched_yield" >&6; } +if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRT 1 +_ACEOF + + LIBS="-lrt $LIBS" + +fi + +fi + # Calculate toolexeclibdir # Also toolexecdir, though it's only used in toolexeclibdir diff --git a/libmudflap/configure.ac b/libmudflap/configure.ac index f8b9995..83aba5a 100644 --- a/libmudflap/configure.ac +++ b/libmudflap/configure.ac @@ -112,12 +112,6 @@ else fi AC_SUBST(MF_HAVE_UINTPTR_T) -if test ! -d pth -then - # libmudflapth objects are built in this subdirectory - mkdir pth -fi - AC_CHECK_HEADERS(pthread.h) AC_MSG_CHECKING([for thread model used by GCC]) @@ -150,6 +144,7 @@ AC_SUBST(build_libmudflapth) AC_CHECK_LIB(dl, dlsym) AC_CHECK_FUNC(connect,, AC_CHECK_LIB(socket, connect)) +AC_CHECK_FUNC(sched_yield,, AC_CHECK_LIB(rt, sched_yield)) # Calculate toolexeclibdir # Also toolexecdir, though it's only used in toolexeclibdir diff --git a/libmudflap/testsuite/lib/libmudflap.exp b/libmudflap/testsuite/lib/libmudflap.exp index bd9327d..f960355 100644 --- a/libmudflap/testsuite/lib/libmudflap.exp +++ b/libmudflap/testsuite/lib/libmudflap.exp @@ -124,9 +124,11 @@ proc libmudflap-init { language } { # If there is no static library then don't run tests with -static. global tool + global mfconfig_libs set opts "additional_flags=-static" lappend opts "additional_flags=-fmudflap" lappend opts "additional_flags=-lmudflap" + lappend opts "libs=$mfconfig_libs" set src stlm[pid].c set exe stlm[pid].x |