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
This commit is contained in:
Florian Weimer 2019-09-06 12:27:36 +02:00 committed by Florian Weimer
parent 7d99a5b62c
commit 3c086f8dec
8 changed files with 25 additions and 0 deletions

View 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.

View 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])])

View 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

2
libgomp/configure vendored
View File

@ -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 ()

View 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

2
libitm/configure vendored
View 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 ()

View 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

View File

@ -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 ()