mirror of git://gcc.gnu.org/git/gcc.git
re PR go/56171 (syscall FAILs on Solaris)
PR go/56171 libgo: Solaris portability for syscall package. From Rainer Orth. From-SVN: r195950
This commit is contained in:
parent
cc999d0300
commit
ae135907ba
|
|
@ -1997,7 +1997,7 @@ GOTESTFLAGS =
|
||||||
CHECK = \
|
CHECK = \
|
||||||
GC="$(GOC) $(GOCFLAGS) $($(subst /,_,$@)_GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \
|
GC="$(GOC) $(GOCFLAGS) $($(subst /,_,$@)_GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \
|
||||||
export GC; \
|
export GC; \
|
||||||
GOLIBS="$(MATH_LIBS) $(NET_LIBS)"; \
|
GOLIBS="$(MATH_LIBS) $(NET_LIBS) $(LIBS)"; \
|
||||||
export GOLIBS; \
|
export GOLIBS; \
|
||||||
RUNTESTFLAGS="$(RUNTESTFLAGS)"; \
|
RUNTESTFLAGS="$(RUNTESTFLAGS)"; \
|
||||||
export RUNTESTFLAGS; \
|
export RUNTESTFLAGS; \
|
||||||
|
|
|
||||||
|
|
@ -2114,7 +2114,7 @@ GOTESTFLAGS =
|
||||||
CHECK = \
|
CHECK = \
|
||||||
GC="$(GOC) $(GOCFLAGS) $($(subst /,_,$@)_GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \
|
GC="$(GOC) $(GOCFLAGS) $($(subst /,_,$@)_GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \
|
||||||
export GC; \
|
export GC; \
|
||||||
GOLIBS="$(MATH_LIBS) $(NET_LIBS)"; \
|
GOLIBS="$(MATH_LIBS) $(NET_LIBS) $(LIBS)"; \
|
||||||
export GOLIBS; \
|
export GOLIBS; \
|
||||||
RUNTESTFLAGS="$(RUNTESTFLAGS)"; \
|
RUNTESTFLAGS="$(RUNTESTFLAGS)"; \
|
||||||
export RUNTESTFLAGS; \
|
export RUNTESTFLAGS; \
|
||||||
|
|
|
||||||
|
|
@ -14211,6 +14211,62 @@ ac_res=$ac_cv_search_sched_yield
|
||||||
if test "$ac_res" != no; then :
|
if test "$ac_res" != no; then :
|
||||||
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
|
||||||
|
$as_echo_n "checking for library containing nanosleep... " >&6; }
|
||||||
|
if test "${ac_cv_search_nanosleep+set}" = set; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
ac_func_search_save_LIBS=$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 nanosleep ();
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
return nanosleep ();
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
for ac_lib in '' rt; do
|
||||||
|
if test -z "$ac_lib"; then
|
||||||
|
ac_res="none required"
|
||||||
|
else
|
||||||
|
ac_res=-l$ac_lib
|
||||||
|
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
||||||
|
fi
|
||||||
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
|
ac_cv_search_nanosleep=$ac_res
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext
|
||||||
|
if test "${ac_cv_search_nanosleep+set}" = set; then :
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test "${ac_cv_search_nanosleep+set}" = set; then :
|
||||||
|
|
||||||
|
else
|
||||||
|
ac_cv_search_nanosleep=no
|
||||||
|
fi
|
||||||
|
rm conftest.$ac_ext
|
||||||
|
LIBS=$ac_func_search_save_LIBS
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
|
||||||
|
$as_echo "$ac_cv_search_nanosleep" >&6; }
|
||||||
|
ac_res=$ac_cv_search_nanosleep
|
||||||
|
if test "$ac_res" != no; then :
|
||||||
|
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -413,8 +413,9 @@ PTHREAD_LIBS=
|
||||||
AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS=-lpthread)
|
AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS=-lpthread)
|
||||||
AC_SUBST(PTHREAD_LIBS)
|
AC_SUBST(PTHREAD_LIBS)
|
||||||
|
|
||||||
dnl Test if -lrt is required for sched_yield.
|
dnl Test if -lrt is required for sched_yield and/or nanosleep.
|
||||||
AC_SEARCH_LIBS([sched_yield], [rt])
|
AC_SEARCH_LIBS([sched_yield], [rt])
|
||||||
|
AC_SEARCH_LIBS([nanosleep], [rt])
|
||||||
|
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -309,6 +309,13 @@ for m in SOCK_CLOEXEC SOCK_NONBLOCK; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# The syscall package requires AF_LOCAL.
|
||||||
|
if ! grep '^const AF_LOCAL ' ${OUT} >/dev/null 2>&1; then
|
||||||
|
if grep '^const AF_UNIX ' ${OUT} >/dev/null 2>&1; then
|
||||||
|
echo "const AF_LOCAL = AF_UNIX" >> ${OUT}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# pathconf constants.
|
# pathconf constants.
|
||||||
grep '^const __PC' gen-sysinfo.go |
|
grep '^const __PC' gen-sysinfo.go |
|
||||||
sed -e 's/^\(const \)__\(PC[^= ]*\)\(.*\)$/\1\2 = __\2/' >> ${OUT}
|
sed -e 's/^\(const \)__\(PC[^= ]*\)\(.*\)$/\1\2 = __\2/' >> ${OUT}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue