aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-09-06 12:27:36 +0200
committerFlorian Weimer <fw@gcc.gnu.org>2019-09-06 12:27:36 +0200
commit3c086f8decdc190602fb66cfec8f3cff16328142 (patch)
tree1902238a65deeaf90dfe4c439e44384b48b39d0e /config
parent7d99a5b62c2672eff965fec12edac0a080d77257 (diff)
downloadgcc-3c086f8decdc190602fb66cfec8f3cff16328142.zip
gcc-3c086f8decdc190602fb66cfec8f3cff16328142.tar.gz
gcc-3c086f8decdc190602fb66cfec8f3cff16328142.tar.bz2
Fix GCC_LINUX_FUTEX to work with C99 compilers
Without this change, libstdc++ is built without futex symbols if GCC rejects implicit function declarations by default. From-SVN: r275454
Diffstat (limited to 'config')
-rw-r--r--config/ChangeLog5
-rw-r--r--config/futex.m42
2 files changed, 7 insertions, 0 deletions
diff --git a/config/ChangeLog b/config/ChangeLog
index 5a06cde..2e7b8c2 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,8 @@
+2019-09-06 Florian Weimer <fweimer@redhat.com>
+
+ * futex.m4 (GCC_LINUX_FUTEX): Include <unistd.h> for the syscall
+ function.
+
2019-07-08 Richard Sandiford <richard.sandiford@arm.com>
* bootstrap-Og.mk: New file.
diff --git a/config/futex.m4 b/config/futex.m4
index e95144d..1b43829 100644
--- a/config/futex.m4
+++ b/config/futex.m4
@@ -22,6 +22,7 @@ case "$target" in
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"
@@ -48,6 +49,7 @@ If so, please configure with --disable-linux-futex])
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])])