Fix GCC_LINUX_FUTEX to work with C99 compilers
authorFlorian Weimer <fweimer@redhat.com>
Fri, 6 Sep 2019 10:27:36 +0000 (12:27 +0200)
committerFlorian Weimer <fw@gcc.gnu.org>
Fri, 6 Sep 2019 10:27:36 +0000 (12:27 +0200)
Without this change, libstdc++ is built without futex symbols if GCC
rejects implicit function declarations by default.

From-SVN: r275454

config/ChangeLog
config/futex.m4
libgomp/ChangeLog
libgomp/configure
libitm/ChangeLog
libitm/configure
libstdc++-v3/ChangeLog
libstdc++-v3/configure

index 5a06cde..2e7b8c2 100644 (file)
@@ -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.
index e95144d..1b43829 100644 (file)
@@ -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])])
index a627bc2..d1e4dc3 100644 (file)
@@ -1,3 +1,7 @@
+2019-09-06  Florian Weimer  <fweimer@redhat.com>
+
+       * configure: Regenerate.
+
 2019-09-03  Chung-Lin Tang  <cltang@codesourcery.com>
 
        PR other/79543
index c5797ea..c58d6a0 100755 (executable)
@@ -15888,6 +15888,7 @@ case "$target" in
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
+          #include <unistd.h>
           int lk;
 int
 main ()
@@ -15940,6 +15941,7 @@ rm -f core conftest.err conftest.$ac_objext \
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
+          #include <unistd.h>
           int lk;
 int
 main ()
index 76d6def..567c1d0 100644 (file)
@@ -1,3 +1,7 @@
+2019-09-06  Florian Weimer  <fweimer@redhat.com>
+
+       * configure: Regenerate.
+
 2019-09-03  Chung-Lin Tang  <cltang@codesourcery.com>
 
        PR other/79543
index bdc5148..c466ae0 100644 (file)
@@ -16481,6 +16481,7 @@ case "$target" in
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
+          #include <unistd.h>
           int lk;
 int
 main ()
@@ -16533,6 +16534,7 @@ rm -f core conftest.err conftest.$ac_objext \
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
+          #include <unistd.h>
           int lk;
 int
 main ()
index 2ea0fe4..ad96489 100644 (file)
@@ -1,3 +1,7 @@
+2019-09-06  Florian Weimer  <fweimer@redhat.com>
+
+       * configure: Regenerate.
+
 2019-09-05  Jonathan Wakely  <jwakely@redhat.com>
 
        * doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
index f2f5098..4e714e5 100755 (executable)
@@ -72670,6 +72670,7 @@ fi
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
+          #include <unistd.h>
           int lk;
 int
 main ()
@@ -72728,6 +72729,7 @@ fi
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
+          #include <unistd.h>
           int lk;
 int
 main ()