mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-24 03:25:20 +08:00
b1e21e5a5d
The new arm-uclinuxfdpiceabi target behaves pretty much like arm-linux-gnueabi. In order to enable the same set of features, we have to update several configure scripts that generally match targets like *-*-linux*: in most places, we add *-uclinux* where there is already *-linux*, or uclinux* when there is already linux*. In gcc/config.gcc and libgcc/config.host we use *-*-uclinuxfdpiceabi because there is already a different behaviour for *-*uclinux* target. In libtool.m4, we use uclinuxfdpiceabi in cases where ELF shared libraries support is required, as uclinux does not guarantee that. 2019-09-10 Christophe Lyon <christophe.lyon@st.com> config/ * futex.m4: Handle *-uclinux*. * tls.m4 (GCC_CHECK_TLS): Likewise. gcc/ * config.gcc: Handle *-*-uclinuxfdpiceabi. libatomic/ * configure.tgt: Handle arm*-*-uclinux*. * configure: Regenerate. libgcc/ * config.host: Handle *-*-uclinuxfdpiceabi. libitm/ * configure.tgt: Handle *-*-uclinux*. * configure: Regenerate. * libtool.m4: Handle uclinuxfdpiceabi. From-SVN: r275564
67 lines
1.9 KiB
Plaintext
67 lines
1.9 KiB
Plaintext
dnl ----------------------------------------------------------------------
|
|
dnl This whole bit snagged from libgomp.
|
|
|
|
dnl
|
|
dnl GCC_LINUX_FUTEX
|
|
dnl (SHELL-CODE_HANDLER)
|
|
dnl
|
|
AC_DEFUN([GCC_LINUX_FUTEX],[dnl
|
|
GCC_ENABLE(linux-futex,default, ,[use the Linux futex system call],
|
|
permit yes|no|default)
|
|
case "$target" in
|
|
*-linux* | *-uclinux*)
|
|
case "$enable_linux_futex" in
|
|
default)
|
|
# If headers don't have gettid/futex syscalls definition, then
|
|
# default to no, otherwise there will be compile time failures.
|
|
# Otherwise, default to yes. If we don't detect we are
|
|
# compiled/linked against NPTL and not cross-compiling, check
|
|
# if programs are run by default against NPTL and if not, issue
|
|
# a warning.
|
|
enable_linux_futex=no
|
|
AC_LINK_IFELSE(
|
|
[AC_LANG_PROGRAM(
|
|
[#include <sys/syscall.h>
|
|
#include <unistd.h>
|
|
int lk;],
|
|
[syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])],
|
|
[save_LIBS="$LIBS"
|
|
LIBS="-lpthread $LIBS"
|
|
AC_LINK_IFELSE(
|
|
[AC_LANG_PROGRAM(
|
|
[#ifndef _GNU_SOURCE
|
|
#define _GNU_SOURCE 1
|
|
#endif
|
|
#include <pthread.h>
|
|
pthread_t th; void *status;],
|
|
[pthread_tryjoin_np (th, &status);])],[enable_linux_futex=yes],
|
|
[if test x$cross_compiling = xno; then
|
|
if getconf GNU_LIBPTHREAD_VERSION 2>/dev/null \
|
|
| LC_ALL=C grep -i NPTL > /dev/null 2>/dev/null; then :; else
|
|
AC_MSG_WARN([The kernel might not support futex or gettid syscalls.
|
|
If so, please configure with --disable-linux-futex])
|
|
fi
|
|
fi
|
|
enable_linux_futex=yes])
|
|
LIBS="$save_LIBS"])
|
|
;;
|
|
yes)
|
|
AC_LINK_IFELSE(
|
|
[AC_LANG_PROGRAM(
|
|
[#include <sys/syscall.h>
|
|
#include <unistd.h>
|
|
int lk;],
|
|
[syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])],[],
|
|
[AC_MSG_ERROR([SYS_gettid and SYS_futex required for --enable-linux-futex])])
|
|
;;
|
|
esac
|
|
;;
|
|
*)
|
|
enable_linux_futex=no
|
|
;;
|
|
esac
|
|
if test x$enable_linux_futex = xyes; then
|
|
$1
|
|
fi
|
|
])
|