* [PATCH] libsanitizer: Avoid implicit function declaration in configure test
@ 2022-10-18 9:39 Florian Weimer
2022-10-18 12:52 ` Jakub Jelinek
0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2022-10-18 9:39 UTC (permalink / raw)
To: gcc-patches
libsanitizer/
* configure.ac (check for necessary platform features):
Include <unistd.h> for syscall prototype.
* configure: Regenerate.
---
libsanitizer/configure | 5 +++--
libsanitizer/configure.ac | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/libsanitizer/configure b/libsanitizer/configure
index 3a0c47513e7..cb99faf6100 100755
--- a/libsanitizer/configure
+++ b/libsanitizer/configure
@@ -12383,7 +12383,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12386 "configure"
+#line 12398 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12489,7 +12489,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12492 "configure"
+#line 12504 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -16072,6 +16072,7 @@ case "$target" in
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/syscall.h>
+#include <unistd.h>
int
main ()
{
diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac
index 7f1ef3979c4..ad49f29db7e 100644
--- a/libsanitizer/configure.ac
+++ b/libsanitizer/configure.ac
@@ -161,7 +161,8 @@ case "$target" in
*-*-linux*)
# Some old Linux distributions miss required syscalls.
sanitizer_supported=no
- AC_TRY_COMPILE([#include <sys/syscall.h>],[
+ AC_TRY_COMPILE([#include <sys/syscall.h>
+#include <unistd.h>],[
syscall (__NR_gettid);
syscall (__NR_futex);
syscall (__NR_exit_group);
base-commit: acdb24166d13d87c374e578d2ad5d58249171930
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] libsanitizer: Avoid implicit function declaration in configure test
2022-10-18 9:39 [PATCH] libsanitizer: Avoid implicit function declaration in configure test Florian Weimer
@ 2022-10-18 12:52 ` Jakub Jelinek
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2022-10-18 12:52 UTC (permalink / raw)
To: Florian Weimer; +Cc: gcc-patches
On Tue, Oct 18, 2022 at 11:39:25AM +0200, Florian Weimer via Gcc-patches wrote:
> libsanitizer/
>
> * configure.ac (check for necessary platform features):
I'd use (sanitizer_supported) or (SANITIZER_SUPPORTED) above instead,
that is what is what is being determined by the test.
> Include <unistd.h> for syscall prototype.
> * configure: Regenerate.
Otherwise LGTM, thanks.
> --- a/libsanitizer/configure.ac
> +++ b/libsanitizer/configure.ac
> @@ -161,7 +161,8 @@ case "$target" in
> *-*-linux*)
> # Some old Linux distributions miss required syscalls.
> sanitizer_supported=no
> - AC_TRY_COMPILE([#include <sys/syscall.h>],[
> + AC_TRY_COMPILE([#include <sys/syscall.h>
> +#include <unistd.h>],[
> syscall (__NR_gettid);
> syscall (__NR_futex);
> syscall (__NR_exit_group);
>
> base-commit: acdb24166d13d87c374e578d2ad5d58249171930
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-18 12:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-18 9:39 [PATCH] libsanitizer: Avoid implicit function declaration in configure test Florian Weimer
2022-10-18 12:52 ` Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).