* [PATCH 00/16] Cleanup obsolete configure checks
@ 2026-10-13 15:35 Simon Marchi
2026-10-13 15:35 ` [PATCH 01/16] gdb: don't check for sys/debugreg.h Simon Marchi
` (16 more replies)
0 siblings, 17 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
After removing an obsolete Expat configure check, I asked Claude what
else looked unnecessary anymore. This series removes the things that I
think are most obviously not needed anymore. There are more things that
could be cleaned up, but those things would require more research or
judgement calls to decide if it's ok to remove. I'll send those little
by little later.
Simon Marchi (16):
gdb: don't check for sys/debugreg.h
gdb: don't check for sigsetmask and ttrace
gdbsupport: don't check for strstr declaration
gdbserver, gdbsupport: remove unneeded sys/procfs.h type checks
gdbserver: don't define HAVE_SYNC_BUILTINS
gdb: don't check for long double support
gdbserver: remove leftover Windows CE check in configure.ac
gdbsupport: don't check for memory.h
gdbserver: don't check for string.h
gdb, gdbserver: remove configure checks already done by GDB_AC_COMMON
gdb: remove redundant dlopen library search
gdb: don't check for long long support in the compiler
gdb: remove AC_C_CONST and AC_C_INLINE
gdbserver: remove fallback declarations of perror, vasprintf and
vsnprintf
gdb: remove redundant snprintf declaration check
gdbserver, gdbsupport: don't check for signal.h, fcntl.h and locale.h
gdb/config.in | 58 ---
gdb/configure | 659 ----------------------------------
gdb/configure.ac | 79 ----
gdb/python/python-internal.h | 7 +-
gdbserver/acinclude.m4 | 21 --
gdbserver/config.in | 41 ---
gdbserver/configure | 601 +------------------------------
gdbserver/configure.ac | 27 +-
gdbserver/fork-child.cc | 2 -
gdbserver/gdbreplay.cc | 2 -
gdbserver/remote-utils.cc | 4 -
gdbserver/server.cc | 2 -
gdbserver/server.h | 13 -
gdbsupport/common.m4 | 12 -
gdbsupport/config.in | 31 --
gdbsupport/configure | 267 --------------
gdbsupport/gdb_locale.h | 4 +-
gdbsupport/gdb_proc_service.h | 16 -
gdbsupport/signals.cc | 2 -
19 files changed, 8 insertions(+), 1840 deletions(-)
base-commit: bad8b979b27e050b2b4db16a261f8a78e24b8aa2
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 01/16] gdb: don't check for sys/debugreg.h
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
@ 2026-10-13 15:35 ` Simon Marchi
2026-10-13 15:35 ` [PATCH 02/16] gdb: don't check for sigsetmask and ttrace Simon Marchi
` (15 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Nothing uses HAVE_SYS_DEBUGREG_H. Remove the check from configure.ac.
Regenerate config.in and configure.
Change-Id: Ib385488d137e567f38830aa6167c65e83a4f0bfd
---
gdb/config.in | 3 ---
gdb/configure | 1 -
gdb/configure.ac | 1 -
3 files changed, 5 deletions(-)
diff --git a/gdb/config.in b/gdb/config.in
index 8afa32f83e7f..e48b6cb7dfec 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -532,9 +532,6 @@
/* Define to 1 if `td_pcb' is a member of `struct thread'. */
#undef HAVE_STRUCT_THREAD_TD_PCB
-/* Define to 1 if you have the <sys/debugreg.h> header file. */
-#undef HAVE_SYS_DEBUGREG_H
-
/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
diff --git a/gdb/configure b/gdb/configure
index 9487c2c55001..7109414b1de3 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -29416,7 +29416,6 @@ for ac_header in \
machine/reg.h \
nlist.h \
ptrace.h \
- sys/debugreg.h \
sys/file.h \
sys/filio.h \
sys/ioctl.h \
diff --git a/gdb/configure.ac b/gdb/configure.ac
index b1f19cb80ee0..d95d2fa7392a 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1449,7 +1449,6 @@ AC_CHECK_HEADERS([ \
machine/reg.h \
nlist.h \
ptrace.h \
- sys/debugreg.h \
sys/file.h \
sys/filio.h \
sys/ioctl.h \
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 02/16] gdb: don't check for sigsetmask and ttrace
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
2026-10-13 15:35 ` [PATCH 01/16] gdb: don't check for sys/debugreg.h Simon Marchi
@ 2026-10-13 15:35 ` Simon Marchi
2026-10-13 15:35 ` [PATCH 03/16] gdbsupport: don't check for strstr declaration Simon Marchi
` (14 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Nothing uses HAVE_SIGSETMASK or HAVE_TTRACE. Remove the checks from
configure.ac.
Regenerate config.in and configure.
Change-Id: Icb59f6b82efb6a2ecf9b770a964cc9049624eeb2
---
gdb/config.in | 6 ------
gdb/configure | 2 --
gdb/configure.ac | 2 --
3 files changed, 10 deletions(-)
diff --git a/gdb/config.in b/gdb/config.in
index e48b6cb7dfec..32ffc4f849ef 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -466,9 +466,6 @@
/* Define if sigsetjmp is available. */
#undef HAVE_SIGSETJMP
-/* Define to 1 if you have the `sigsetmask' function. */
-#undef HAVE_SIGSETMASK
-
/* Define to 1 if you have the `sigtimedwait' function. */
#undef HAVE_SIGTIMEDWAIT
@@ -592,9 +589,6 @@
/* Define to 1 if you have the <thread_db.h> header file. */
#undef HAVE_THREAD_DB_H
-/* Define to 1 if you have the `ttrace' function. */
-#undef HAVE_TTRACE
-
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
diff --git a/gdb/configure b/gdb/configure
index 7109414b1de3..b859b401dab8 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -30149,8 +30149,6 @@ for ac_func in \
setlocale \
setrlimit \
setsid \
- sigsetmask \
- ttrace \
use_default_colors \
wresize \
diff --git a/gdb/configure.ac b/gdb/configure.ac
index d95d2fa7392a..b234a77c0581 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1540,8 +1540,6 @@ AC_CHECK_FUNCS([ \
setlocale \
setrlimit \
setsid \
- sigsetmask \
- ttrace \
use_default_colors \
wresize \
])
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 03/16] gdbsupport: don't check for strstr declaration
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
2026-10-13 15:35 ` [PATCH 01/16] gdb: don't check for sys/debugreg.h Simon Marchi
2026-10-13 15:35 ` [PATCH 02/16] gdb: don't check for sigsetmask and ttrace Simon Marchi
@ 2026-10-13 15:35 ` Simon Marchi
2026-10-13 15:35 ` [PATCH 04/16] gdbserver, gdbsupport: remove unneeded sys/procfs.h type checks Simon Marchi
` (13 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Nothing uses HAVE_DECL_STRSTR. Remove the check from common.m4.
Regenerate config.in and configure in gdb, gdbserver and gdbsupport.
Change-Id: Ia5174a670e7ba6313b9a71e9c3269d3f50285d2c
---
gdb/config.in | 4 ----
gdb/configure | 12 ------------
gdbserver/config.in | 4 ----
gdbserver/configure | 12 ------------
gdbsupport/common.m4 | 2 --
gdbsupport/config.in | 4 ----
gdbsupport/configure | 12 ------------
7 files changed, 50 deletions(-)
diff --git a/gdb/config.in b/gdb/config.in
index 32ffc4f849ef..07af8d32acb3 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -155,10 +155,6 @@
don't. */
#undef HAVE_DECL_SNPRINTF
-/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
- */
-#undef HAVE_DECL_STRSTR
-
/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't.
*/
#undef HAVE_DECL_STRTOL
diff --git a/gdb/configure b/gdb/configure
index b859b401dab8..7d1a906eaff1 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -20360,18 +20360,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
- ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strstr" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRSTR $ac_have_decl
-_ACEOF
-
-
# ----------------------- #
# Checks for structures. #
# ----------------------- #
diff --git a/gdbserver/config.in b/gdbserver/config.in
index ead66ce7a574..daad1ec02a25 100644
--- a/gdbserver/config.in
+++ b/gdbserver/config.in
@@ -66,10 +66,6 @@
don't. */
#undef HAVE_DECL_SNPRINTF
-/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
- */
-#undef HAVE_DECL_STRSTR
-
/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't.
*/
#undef HAVE_DECL_STRTOL
diff --git a/gdbserver/configure b/gdbserver/configure
index dd749fcb55bc..1eac3d01669a 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -8564,18 +8564,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
- ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strstr" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRSTR $ac_have_decl
-_ACEOF
-
-
# ----------------------- #
# Checks for structures. #
# ----------------------- #
diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4
index 6bf15fff670d..4de9710c41f0 100644
--- a/gdbsupport/common.m4
+++ b/gdbsupport/common.m4
@@ -88,8 +88,6 @@ AC_CHECK_HEADERS([ \
# only in linux/personality.h.
AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include <sys/personality.h>])
- AC_CHECK_DECLS([strstr])
-
# ----------------------- #
# Checks for structures. #
# ----------------------- #
diff --git a/gdbsupport/config.in b/gdbsupport/config.in
index 2957ee0f0301..4b152c67cae7 100644
--- a/gdbsupport/config.in
+++ b/gdbsupport/config.in
@@ -62,10 +62,6 @@
don't. */
#undef HAVE_DECL_SNPRINTF
-/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
- */
-#undef HAVE_DECL_STRSTR
-
/* Define to 1 if you have the declaration of `strtol', and to 0 if you don't.
*/
#undef HAVE_DECL_STRTOL
diff --git a/gdbsupport/configure b/gdbsupport/configure
index 0bc9ff1db9a1..998130c29cfa 100755
--- a/gdbsupport/configure
+++ b/gdbsupport/configure
@@ -11463,18 +11463,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
- ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strstr" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRSTR $ac_have_decl
-_ACEOF
-
-
# ----------------------- #
# Checks for structures. #
# ----------------------- #
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 04/16] gdbserver, gdbsupport: remove unneeded sys/procfs.h type checks
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (2 preceding siblings ...)
2026-10-13 15:35 ` [PATCH 03/16] gdbsupport: don't check for strstr declaration Simon Marchi
@ 2026-10-13 15:35 ` Simon Marchi
2026-10-13 15:35 ` [PATCH 05/16] gdbserver: don't define HAVE_SYNC_BUILTINS Simon Marchi
` (12 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Nothing uses HAVE_GREGSET_T, HAVE_FPREGSET_T or HAVE_PRGREGSET32_T.
Remove those checks from common.m4.
gdb_proc_service.h provides fallback definitions of lwpid_t, psaddr_t,
prgregset_t and prfpregset_t, for when configure doesn't find them in
sys/procfs.h.
gdbserver's configure.ac additionally checks for lwpid_t and psaddr_t in
thread_db.h, for old Android versions that defined them there.
All the libcs that I know of on Linux define these types in sys/procfs.h
since long enough:
- glibc: since commit 03fc7ab6ed4b (1999-11-02), first
released in glibc 2.1.3.
- uClibc: since commit e83a36ce9f97 ("Rev all the header files to
sync things with glibc 2.2.4", 2001-09-27). uClibc-ng, forked
from uClibc, inherited them.
- musl: since its initial check-in, commit 0b44a0315b47 ("initial
check-in, version 0.5.0", 2011-02-12).
- bionic (Android): prgregset_t and prfpregset_t since commit
bf18c61798d1 ("Add a sys/procfs.h.", 2015-03-04), lwpid_t and
psaddr_t since commit 895241efbba3 ("Fixes for building gdbserver
(and gdb) out of the box.", 2015-06-16), both first released in
Android 6.0. I claim that it's not worth supporting Android versions
older than that.
Remove the checks for these types from common.m4, the
GDBSERVER_HAVE_THREAD_DB_TYPE macro and its uses from gdbserver, and
the fallback definitions from gdb_proc_service.h.
The check for elf_fpregset_t remains, since uClibc-ng's sys/procfs.h
doesn't define it for c6x, which gdbserver supports.
Regenerate config.in and configure in gdb, gdbserver and gdbsupport.
Change-Id: I9770a923b06ebb001ffc25255801b79818fa397b
---
gdb/config.in | 21 ---
gdb/configure | 252 --------------------------
gdbserver/acinclude.m4 | 21 ---
gdbserver/config.in | 21 ---
gdbserver/configure | 326 ----------------------------------
gdbserver/configure.ac | 10 --
gdbsupport/common.m4 | 7 -
gdbsupport/config.in | 21 ---
gdbsupport/configure | 252 --------------------------
gdbsupport/gdb_proc_service.h | 16 --
10 files changed, 947 deletions(-)
diff --git a/gdb/config.in b/gdb/config.in
index 07af8d32acb3..636daea082d3 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -207,9 +207,6 @@
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
-/* Define if <sys/procfs.h> has fpregset_t. */
-#undef HAVE_FPREGSET_T
-
/* Define to 1 if you have the `getauxval' function. */
#undef HAVE_GETAUXVAL
@@ -234,9 +231,6 @@
/* Define to 1 if you have the `getuid' function. */
#undef HAVE_GETUID
-/* Define if <sys/procfs.h> has gregset_t. */
-#undef HAVE_GREGSET_T
-
/* Define if Guile interpreter is being linked in. */
#undef HAVE_GUILE
@@ -318,9 +312,6 @@
/* Define to 1 if the system has the type `long long'. */
#undef HAVE_LONG_LONG
-/* Define if <sys/procfs.h> has lwpid_t. */
-#undef HAVE_LWPID_T
-
/* Define to 1 if you have the <machine/reg.h> header file. */
#undef HAVE_MACHINE_REG_H
@@ -369,21 +360,9 @@
/* Define to 1 if you have the `pread64' function. */
#undef HAVE_PREAD64
-/* Define if <sys/procfs.h> has prfpregset_t. */
-#undef HAVE_PRFPREGSET_T
-
-/* Define if <sys/procfs.h> has prgregset32_t. */
-#undef HAVE_PRGREGSET32_T
-
-/* Define if <sys/procfs.h> has prgregset_t. */
-#undef HAVE_PRGREGSET_T
-
/* Define to 1 if you have the <proc_service.h> header file. */
#undef HAVE_PROC_SERVICE_H
-/* Define if <sys/procfs.h> has psaddr_t. */
-#undef HAVE_PSADDR_T
-
/* Have PTHREAD_PRIO_INHERIT. */
#undef HAVE_PTHREAD_PRIO_INHERIT
diff --git a/gdb/configure b/gdb/configure
index 7d1a906eaff1..4c08ab956555 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -21878,258 +21878,6 @@ done
if test "$ac_cv_header_sys_procfs_h" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-gregset_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_gregset_t=yes
-else
- bfd_cv_have_sys_procfs_type_gregset_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
-
-$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-fpregset_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_fpregset_t=yes
-else
- bfd_cv_have_sys_procfs_type_fpregset_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
-
-$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-prgregset_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prgregset_t=yes
-else
- bfd_cv_have_sys_procfs_type_prgregset_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
-
-$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-prfpregset_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prfpregset_t=yes
-else
- bfd_cv_have_sys_procfs_type_prfpregset_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
-
-$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
-$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-prgregset32_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prgregset32_t=yes
-else
- bfd_cv_have_sys_procfs_type_prgregset32_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
-
-$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
-$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-lwpid_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_lwpid_t=yes
-else
- bfd_cv_have_sys_procfs_type_lwpid_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
-
-$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
-$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-psaddr_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_psaddr_t=yes
-else
- bfd_cv_have_sys_procfs_type_psaddr_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
-
-$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
diff --git a/gdbserver/acinclude.m4 b/gdbserver/acinclude.m4
index 9b1cf85a6997..61d7134699a8 100644
--- a/gdbserver/acinclude.m4
+++ b/gdbserver/acinclude.m4
@@ -35,24 +35,3 @@ m4_include(../gdb/ax_cxx_compile_stdcxx.m4)
dnl For GDB_AC_SELFTEST.
m4_include(../gdbsupport/selftest.m4)
-
-dnl Check for existence of a type $1 in libthread_db.h
-dnl Based on BFD_HAVE_SYS_PROCFS_TYPE in bfd/bfd.m4.
-
-AC_DEFUN(
- [GDBSERVER_HAVE_THREAD_DB_TYPE],
- [AC_MSG_CHECKING([for $1 in thread_db.h])
- AC_CACHE_VAL(
- [gdbserver_cv_have_thread_db_type_$1],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([#include <thread_db.h>], [$1 avar])],
- [gdbserver_cv_have_thread_db_type_$1=yes],
- [gdbserver_cv_have_thread_db_type_$1=no]
- )]
- )
- if test $gdbserver_cv_have_thread_db_type_$1 = yes; then
- AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
- [Define if <thread_db.h> has $1.])
- fi
- AC_MSG_RESULT($gdbserver_cv_have_thread_db_type_$1)]
-)
diff --git a/gdbserver/config.in b/gdbserver/config.in
index daad1ec02a25..5b2e60260154 100644
--- a/gdbserver/config.in
+++ b/gdbserver/config.in
@@ -118,9 +118,6 @@
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
-/* Define if <sys/procfs.h> has fpregset_t. */
-#undef HAVE_FPREGSET_T
-
/* Define to 1 if you have the `getauxval' function. */
#undef HAVE_GETAUXVAL
@@ -136,9 +133,6 @@
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
-/* Define if <sys/procfs.h> has gregset_t. */
-#undef HAVE_GREGSET_T
-
/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV
@@ -181,9 +175,6 @@
/* Define to 1 if the system has the type `long long'. */
#undef HAVE_LONG_LONG
-/* Define if <thread_db.h> has lwpid_t. */
-#undef HAVE_LWPID_T
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@@ -217,21 +208,9 @@
/* Define to 1 if you have the `pread64' function. */
#undef HAVE_PREAD64
-/* Define if <sys/procfs.h> has prfpregset_t. */
-#undef HAVE_PRFPREGSET_T
-
-/* Define if <sys/procfs.h> has prgregset32_t. */
-#undef HAVE_PRGREGSET32_T
-
-/* Define if <sys/procfs.h> has prgregset_t. */
-#undef HAVE_PRGREGSET_T
-
/* Define to 1 if you have the <proc_service.h> header file. */
#undef HAVE_PROC_SERVICE_H
-/* Define if <thread_db.h> has psaddr_t. */
-#undef HAVE_PSADDR_T
-
/* Have PTHREAD_PRIO_INHERIT. */
#undef HAVE_PTHREAD_PRIO_INHERIT
diff --git a/gdbserver/configure b/gdbserver/configure
index 1eac3d01669a..68a1f59d675a 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -10082,258 +10082,6 @@ done
if test "$ac_cv_header_sys_procfs_h" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-gregset_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_gregset_t=yes
-else
- bfd_cv_have_sys_procfs_type_gregset_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
-
-$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-fpregset_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_fpregset_t=yes
-else
- bfd_cv_have_sys_procfs_type_fpregset_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
-
-$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-prgregset_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prgregset_t=yes
-else
- bfd_cv_have_sys_procfs_type_prgregset_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
-
-$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-prfpregset_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prfpregset_t=yes
-else
- bfd_cv_have_sys_procfs_type_prfpregset_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
-
-$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
-$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-prgregset32_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prgregset32_t=yes
-else
- bfd_cv_have_sys_procfs_type_prgregset32_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
-
-$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
-$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-lwpid_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_lwpid_t=yes
-else
- bfd_cv_have_sys_procfs_type_lwpid_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
-
-$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
-$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-psaddr_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_psaddr_t=yes
-else
- bfd_cv_have_sys_procfs_type_psaddr_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
-
-$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
@@ -14031,80 +13779,6 @@ $as_echo "#define HAVE_LINUX_BTRACE 1" >>confdefs.h
fi
-if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in thread_db.h" >&5
-$as_echo_n "checking for lwpid_t in thread_db.h... " >&6; }
- if ${gdbserver_cv_have_thread_db_type_lwpid_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <thread_db.h>
-int
-main ()
-{
-lwpid_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gdbserver_cv_have_thread_db_type_lwpid_t=yes
-else
- gdbserver_cv_have_thread_db_type_lwpid_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-
- if test $gdbserver_cv_have_thread_db_type_lwpid_t = yes; then
-
-$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_lwpid_t" >&5
-$as_echo "$gdbserver_cv_have_thread_db_type_lwpid_t" >&6; }
-
-fi
-
-if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in thread_db.h" >&5
-$as_echo_n "checking for psaddr_t in thread_db.h... " >&6; }
- if ${gdbserver_cv_have_thread_db_type_psaddr_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <thread_db.h>
-int
-main ()
-{
-psaddr_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gdbserver_cv_have_thread_db_type_psaddr_t=yes
-else
- gdbserver_cv_have_thread_db_type_psaddr_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-
- if test $gdbserver_cv_have_thread_db_type_psaddr_t = yes; then
-
-$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbserver_cv_have_thread_db_type_psaddr_t" >&5
-$as_echo "$gdbserver_cv_have_thread_db_type_psaddr_t" >&6; }
-
-fi
-
old_LIBS="$LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
diff --git a/gdbserver/configure.ac b/gdbserver/configure.ac
index f1466e8568d4..87d0fc6dec9a 100644
--- a/gdbserver/configure.ac
+++ b/gdbserver/configure.ac
@@ -243,16 +243,6 @@ if test "${srv_linux_btrace}" = "yes"; then
[Define if the target supports branch tracing.])
fi
-dnl Some systems (e.g., Android) have lwpid_t defined in libthread_db.h.
-if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
- GDBSERVER_HAVE_THREAD_DB_TYPE(lwpid_t)
-fi
-
-dnl Some systems (e.g., Android) have psaddr_t defined in libthread_db.h.
-if test "$bfd_cv_have_sys_procfs_type_psaddr_t" != yes; then
- GDBSERVER_HAVE_THREAD_DB_TYPE(psaddr_t)
-fi
-
dnl Check for libdl, but do not add it to LIBS as only gdbserver
dnl needs it (and gdbreplay doesn't).
old_LIBS="$LIBS"
diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4
index 4de9710c41f0..e8903c41c45f 100644
--- a/gdbsupport/common.m4
+++ b/gdbsupport/common.m4
@@ -253,13 +253,6 @@ AC_CHECK_HEADERS([ \
BFD_SYS_PROCFS_H
if test "$ac_cv_header_sys_procfs_h" = yes; then
- BFD_HAVE_SYS_PROCFS_TYPE(gregset_t)
- BFD_HAVE_SYS_PROCFS_TYPE(fpregset_t)
- BFD_HAVE_SYS_PROCFS_TYPE(prgregset_t)
- BFD_HAVE_SYS_PROCFS_TYPE(prfpregset_t)
- BFD_HAVE_SYS_PROCFS_TYPE(prgregset32_t)
- BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t)
- BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t)
BFD_HAVE_SYS_PROCFS_TYPE(elf_fpregset_t)
fi
diff --git a/gdbsupport/config.in b/gdbsupport/config.in
index 4b152c67cae7..f99a88352196 100644
--- a/gdbsupport/config.in
+++ b/gdbsupport/config.in
@@ -102,9 +102,6 @@
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
-/* Define if <sys/procfs.h> has fpregset_t. */
-#undef HAVE_FPREGSET_T
-
/* Define to 1 if you have the `getauxval' function. */
#undef HAVE_GETAUXVAL
@@ -120,9 +117,6 @@
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
-/* Define if <sys/procfs.h> has gregset_t. */
-#undef HAVE_GREGSET_T
-
/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV
@@ -153,9 +147,6 @@
/* Define to 1 if the system has the type `long long'. */
#undef HAVE_LONG_LONG
-/* Define if <sys/procfs.h> has lwpid_t. */
-#undef HAVE_LWPID_T
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@@ -174,21 +165,9 @@
/* Define to 1 if you have the <poll.h> header file. */
#undef HAVE_POLL_H
-/* Define if <sys/procfs.h> has prfpregset_t. */
-#undef HAVE_PRFPREGSET_T
-
-/* Define if <sys/procfs.h> has prgregset32_t. */
-#undef HAVE_PRGREGSET32_T
-
-/* Define if <sys/procfs.h> has prgregset_t. */
-#undef HAVE_PRGREGSET_T
-
/* Define to 1 if you have the <proc_service.h> header file. */
#undef HAVE_PROC_SERVICE_H
-/* Define if <sys/procfs.h> has psaddr_t. */
-#undef HAVE_PSADDR_T
-
/* Have PTHREAD_PRIO_INHERIT. */
#undef HAVE_PTHREAD_PRIO_INHERIT
diff --git a/gdbsupport/configure b/gdbsupport/configure
index 998130c29cfa..4e4d2f9ff543 100755
--- a/gdbsupport/configure
+++ b/gdbsupport/configure
@@ -12981,258 +12981,6 @@ done
if test "$ac_cv_header_sys_procfs_h" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-gregset_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_gregset_t=yes
-else
- bfd_cv_have_sys_procfs_type_gregset_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
-
-$as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-fpregset_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_fpregset_t=yes
-else
- bfd_cv_have_sys_procfs_type_fpregset_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
-
-$as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-prgregset_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prgregset_t=yes
-else
- bfd_cv_have_sys_procfs_type_prgregset_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
-
-$as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
-$as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-prfpregset_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prfpregset_t=yes
-else
- bfd_cv_have_sys_procfs_type_prfpregset_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
-
-$as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
-$as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-prgregset32_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_prgregset32_t=yes
-else
- bfd_cv_have_sys_procfs_type_prgregset32_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
-
-$as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
-$as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-lwpid_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_lwpid_t=yes
-else
- bfd_cv_have_sys_procfs_type_lwpid_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
-
-$as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
-$as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
- if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int
-main ()
-{
-psaddr_t avar
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- bfd_cv_have_sys_procfs_type_psaddr_t=yes
-else
- bfd_cv_have_sys_procfs_type_psaddr_t=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
- if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
-
-$as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
-
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
-$as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
$as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
diff --git a/gdbsupport/gdb_proc_service.h b/gdbsupport/gdb_proc_service.h
index 6bac4aaea063..7cd471abd6fc 100644
--- a/gdbsupport/gdb_proc_service.h
+++ b/gdbsupport/gdb_proc_service.h
@@ -83,22 +83,6 @@ enum ps_err_e
PS_NOFREGS /* FPU register set not available for given LWP. */
};
-#ifndef HAVE_LWPID_T
-using lwpid_t = unsigned int;
-#endif
-
-#ifndef HAVE_PSADDR_T
-using psaddr_t = void *;
-#endif
-
-#ifndef HAVE_PRGREGSET_T
-using prgregset_t = elf_gregset_t;
-#endif
-
-#ifndef HAVE_PRFPREGSET_T
-using prfpregset_t = elf_fpregset_t;
-#endif
-
/* This type is opaque in this interface. It's defined by the user of
libthread_db. GDB's version is defined below. */
struct ps_prochandle;
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 05/16] gdbserver: don't define HAVE_SYNC_BUILTINS
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (3 preceding siblings ...)
2026-10-13 15:35 ` [PATCH 04/16] gdbserver, gdbsupport: remove unneeded sys/procfs.h type checks Simon Marchi
@ 2026-10-13 15:35 ` Simon Marchi
2026-10-13 15:35 ` [PATCH 06/16] gdb: don't check for long double support Simon Marchi
` (11 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Nothing uses HAVE_SYNC_BUILTINS. Remove the AC_DEFINE from
configure.ac. The check itself stays, since its result decides
whether the in-process agent is built.
Regenerate config.in and configure.
Change-Id: Iaee9ff65662b41cd6574f065ddabd040aef8ac76
---
gdbserver/config.in | 3 ---
gdbserver/configure | 5 -----
gdbserver/configure.ac | 4 ----
3 files changed, 12 deletions(-)
diff --git a/gdbserver/config.in b/gdbserver/config.in
index 5b2e60260154..d0b609003800 100644
--- a/gdbserver/config.in
+++ b/gdbserver/config.in
@@ -302,9 +302,6 @@
/* Define to 1 if `st_blocks' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLOCKS
-/* Define to 1 if the target supports __sync_*_compare_and_swap */
-#undef HAVE_SYNC_BUILTINS
-
/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
diff --git a/gdbserver/configure b/gdbserver/configure
index 68a1f59d675a..01318a6cf122 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -13988,11 +13988,6 @@ rm -f core conftest.err conftest.$ac_objext \
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
$as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
-if test "$gdbsrv_cv_have_sync_builtins" = yes; then
-
-$as_echo "#define HAVE_SYNC_BUILTINS 1" >>confdefs.h
-
-fi
saved_cflags="$CFLAGS"
CFLAGS="$CFLAGS -fvisibility=hidden"
diff --git a/gdbserver/configure.ac b/gdbserver/configure.ac
index 87d0fc6dec9a..3ecd8fef2be3 100644
--- a/gdbserver/configure.ac
+++ b/gdbserver/configure.ac
@@ -335,10 +335,6 @@ AC_CACHE_CHECK(
[gdbsrv_cv_have_sync_builtins=no]
)]
)
-if test "$gdbsrv_cv_have_sync_builtins" = yes; then
- AC_DEFINE(HAVE_SYNC_BUILTINS, 1,
- [Define to 1 if the target supports __sync_*_compare_and_swap])
-fi
dnl Check for -fvisibility=hidden support in the compiler.
saved_cflags="$CFLAGS"
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 06/16] gdb: don't check for long double support
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (4 preceding siblings ...)
2026-10-13 15:35 ` [PATCH 05/16] gdbserver: don't define HAVE_SYNC_BUILTINS Simon Marchi
@ 2026-10-13 15:35 ` Simon Marchi
2026-10-13 15:35 ` [PATCH 07/16] gdbserver: remove leftover Windows CE check in configure.ac Simon Marchi
` (10 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Nothing uses HAVE_LONG_DOUBLE, PRINTF_HAS_LONG_DOUBLE or
SCANF_HAS_LONG_DOUBLE. Remove the checks from configure.ac.
Regenerate config.in and configure.
Change-Id: Ie2ea3ee02bf930cfba13f98498c7fbe24cc14ad3
---
gdb/config.in | 9 ----
gdb/configure | 113 -----------------------------------------------
gdb/configure.ac | 49 --------------------
3 files changed, 171 deletions(-)
diff --git a/gdb/config.in b/gdb/config.in
index 636daea082d3..0f0afa6f26b0 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -306,9 +306,6 @@
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
-/* Define to 1 if the compiler supports long double. */
-#undef HAVE_LONG_DOUBLE
-
/* Define to 1 if the system has the type `long long'. */
#undef HAVE_LONG_LONG
@@ -650,9 +647,6 @@
/* Define to 1 if the "%H, %D and %DD" formats work to print decfloats. */
#undef PRINTF_HAS_DECFLOAT
-/* Define to 1 if the "%Lg" format works to print long doubles. */
-#undef PRINTF_HAS_LONG_DOUBLE
-
/* Define to 1 if the "%ll" format works to print long longs. */
#undef PRINTF_HAS_LONG_LONG
@@ -691,9 +685,6 @@
/* Bug reporting address */
#undef REPORT_BUGS_TO
-/* Define to 1 if the "%Lg" format works to scan long doubles. */
-#undef SCANF_HAS_LONG_DOUBLE
-
/* Define to 1 if the `setpgrp' function takes no argument. */
#undef SETPGRP_VOID
diff --git a/gdb/configure b/gdb/configure
index 4c08ab956555..1f35d4e42f52 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -30529,119 +30529,6 @@ $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
fi
-# Check if the compiler supports the `long double' type. We can't use
-# AC_C_LONG_DOUBLE because that one does additional checks on the
-# constants defined in <float.h> that fail on some systems,
-# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
-$as_echo_n "checking for long double support in compiler... " >&6; }
-if ${gdb_cv_c_long_double+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-long double foo;
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_c_long_double=yes
-else
- gdb_cv_c_long_double=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
-$as_echo "$gdb_cv_c_long_double" >&6; }
-if test "$gdb_cv_c_long_double" = yes; then
-
-$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
-
-fi
-
-# Check if the compiler and runtime support printing long doubles.
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
-$as_echo_n "checking for long double support in printf... " >&6; }
-if ${gdb_cv_printf_has_long_double+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- gdb_cv_printf_has_long_double=no
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-char buf[16];
- long double f = 3.141592653;
- sprintf (buf, "%Lg", f);
- return (strncmp ("3.14159", buf, 7));
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gdb_cv_printf_has_long_double=yes
-else
- gdb_cv_printf_has_long_double=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
-$as_echo "$gdb_cv_printf_has_long_double" >&6; }
-if test "$gdb_cv_printf_has_long_double" = yes; then
-
-$as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
-
-fi
-
-# Check if the compiler and runtime support scanning long doubles.
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
-$as_echo_n "checking for long double support in scanf... " >&6; }
-if ${gdb_cv_scanf_has_long_double+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- gdb_cv_scanf_has_long_double=no
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdio.h>
-int
-main ()
-{
-char *buf = "3.141592653";
- long double f = 0;
- sscanf (buf, "%Lg", &f);
- return !(f > 3.14159 && f < 3.14160);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gdb_cv_scanf_has_long_double=yes
-else
- gdb_cv_scanf_has_long_double=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
-$as_echo "$gdb_cv_scanf_has_long_double" >&6; }
-if test "$gdb_cv_scanf_has_long_double" = yes; then
-
-$as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
-
-fi
-
case ${host_os} in
aix*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
diff --git a/gdb/configure.ac b/gdb/configure.ac
index b234a77c0581..6545320b7b96 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1721,55 +1721,6 @@ if test "$gdb_cv_printf_has_decfloat" = yes; then
[Define to 1 if the "%H, %D and %DD" formats work to print decfloats.])
fi
-# Check if the compiler supports the `long double' type. We can't use
-# AC_C_LONG_DOUBLE because that one does additional checks on the
-# constants defined in <float.h> that fail on some systems,
-# e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
-
-AC_CACHE_CHECK([for long double support in compiler], gdb_cv_c_long_double,
- [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[long double foo;]])],
- gdb_cv_c_long_double=yes,
- gdb_cv_c_long_double=no)])
-if test "$gdb_cv_c_long_double" = yes; then
- AC_DEFINE(HAVE_LONG_DOUBLE, 1,
- [Define to 1 if the compiler supports long double.])
-fi
-
-# Check if the compiler and runtime support printing long doubles.
-
-AC_CACHE_CHECK([for long double support in printf],
- gdb_cv_printf_has_long_double,
- [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
-[[char buf[16];
- long double f = 3.141592653;
- sprintf (buf, "%Lg", f);
- return (strncmp ("3.14159", buf, 7));]])],
- gdb_cv_printf_has_long_double=yes,
- gdb_cv_printf_has_long_double=no,
- gdb_cv_printf_has_long_double=no)])
-if test "$gdb_cv_printf_has_long_double" = yes; then
- AC_DEFINE(PRINTF_HAS_LONG_DOUBLE, 1,
- [Define to 1 if the "%Lg" format works to print long doubles.])
-fi
-
-# Check if the compiler and runtime support scanning long doubles.
-
-AC_CACHE_CHECK([for long double support in scanf],
- gdb_cv_scanf_has_long_double,
- [AC_RUN_IFELSE([AC_LANG_PROGRAM(
-[[#include <stdio.h>]],
-[[char *buf = "3.141592653";
- long double f = 0;
- sscanf (buf, "%Lg", &f);
- return !(f > 3.14159 && f < 3.14160);]])],
- gdb_cv_scanf_has_long_double=yes,
- gdb_cv_scanf_has_long_double=no,
- gdb_cv_scanf_has_long_double=no)])
-if test "$gdb_cv_scanf_has_long_double" = yes; then
- AC_DEFINE(SCANF_HAS_LONG_DOUBLE, 1,
- [Define to 1 if the "%Lg" format works to scan long doubles.])
-fi
-
case ${host_os} in
aix*)
AC_CACHE_CHECK(
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 07/16] gdbserver: remove leftover Windows CE check in configure.ac
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (5 preceding siblings ...)
2026-10-13 15:35 ` [PATCH 06/16] gdb: don't check for long double support Simon Marchi
@ 2026-10-13 15:35 ` Simon Marchi
2026-10-13 15:35 ` [PATCH 08/16] gdbsupport: don't check for memory.h Simon Marchi
` (9 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
configure.ac adds -lws2 to LIBS if srv_mingwce is set, but nothing
sets srv_mingwce since commit 84b300de3666 ("gdbserver: remove support
for ARM/WinCE", 2020-06-12). Remove that branch.
Regenerate configure.
Change-Id: I57d76d476a6f1f5f975178bf4f90adead3cc66cd
---
gdbserver/configure | 4 +---
gdbserver/configure.ac | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/gdbserver/configure b/gdbserver/configure
index 01318a6cf122..001d709ac2e7 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -13686,9 +13686,7 @@ esac
. ${srcdir}/configure.srv
-if test "${srv_mingwce}" = "yes"; then
- LIBS="$LIBS -lws2"
-elif test "${srv_mingw}" = "yes"; then
+if test "${srv_mingw}" = "yes"; then
# WIN32APILIBS is set by GDB_AC_COMMON.
LIBS="$LIBS $WIN32APILIBS"
fi
diff --git a/gdbserver/configure.ac b/gdbserver/configure.ac
index 3ecd8fef2be3..2814e9ba71dc 100644
--- a/gdbserver/configure.ac
+++ b/gdbserver/configure.ac
@@ -188,9 +188,7 @@ esac
. ${srcdir}/configure.srv
-if test "${srv_mingwce}" = "yes"; then
- LIBS="$LIBS -lws2"
-elif test "${srv_mingw}" = "yes"; then
+if test "${srv_mingw}" = "yes"; then
# WIN32APILIBS is set by GDB_AC_COMMON.
LIBS="$LIBS $WIN32APILIBS"
fi
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 08/16] gdbsupport: don't check for memory.h
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (6 preceding siblings ...)
2026-10-13 15:35 ` [PATCH 07/16] gdbserver: remove leftover Windows CE check in configure.ac Simon Marchi
@ 2026-10-13 15:35 ` Simon Marchi
2026-10-13 15:35 ` [PATCH 09/16] gdbserver: don't check for string.h Simon Marchi
` (8 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Nothing uses HAVE_MEMORY_H. Remove memory.h from the list of headers
checked in common.m4.
Regenerate configure in gdb, gdbserver and gdbsupport.
Change-Id: Icc6d13a87a95f57032bb5a040f4fc3be140b8956
---
gdb/configure | 1 -
gdbserver/configure | 1 -
gdbsupport/common.m4 | 1 -
gdbsupport/configure | 1 -
4 files changed, 4 deletions(-)
diff --git a/gdb/configure b/gdb/configure
index 1f35d4e42f52..a64e382fa377 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -19838,7 +19838,6 @@ for ac_header in \
linux/elf.h \
linux/perf_event.h \
locale.h \
- memory.h \
poll.h \
proc_service.h \
signal.h \
diff --git a/gdbserver/configure b/gdbserver/configure
index 001d709ac2e7..a44d25969ed0 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -8042,7 +8042,6 @@ for ac_header in \
linux/elf.h \
linux/perf_event.h \
locale.h \
- memory.h \
poll.h \
proc_service.h \
signal.h \
diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4
index e8903c41c45f..2f4b67127434 100644
--- a/gdbsupport/common.m4
+++ b/gdbsupport/common.m4
@@ -44,7 +44,6 @@ AC_CHECK_HEADERS([ \
linux/elf.h \
linux/perf_event.h \
locale.h \
- memory.h \
poll.h \
proc_service.h \
signal.h \
diff --git a/gdbsupport/configure b/gdbsupport/configure
index 4e4d2f9ff543..5df02c4676fd 100755
--- a/gdbsupport/configure
+++ b/gdbsupport/configure
@@ -10941,7 +10941,6 @@ for ac_header in \
linux/elf.h \
linux/perf_event.h \
locale.h \
- memory.h \
poll.h \
proc_service.h \
signal.h \
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 09/16] gdbserver: don't check for string.h
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (7 preceding siblings ...)
2026-10-13 15:35 ` [PATCH 08/16] gdbsupport: don't check for memory.h Simon Marchi
@ 2026-10-13 15:35 ` Simon Marchi
2026-10-13 15:35 ` [PATCH 10/16] gdb, gdbserver: remove configure checks already done by GDB_AC_COMMON Simon Marchi
` (7 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Nothing uses HAVE_STRING_H. Remove string.h from the list of headers
checked in configure.ac.
Regenerate configure.
Change-Id: Ia4ed7921e02ca523bb9014594fa823efc5f16da8
---
gdbserver/configure | 1 -
gdbserver/configure.ac | 1 -
2 files changed, 2 deletions(-)
diff --git a/gdbserver/configure b/gdbserver/configure
index a44d25969ed0..6cf97b7ab5d7 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -12552,7 +12552,6 @@ for ac_header in \
netinet/in.h \
netinet/tcp.h \
signal.h \
- string.h \
sys/file.h \
sys/ioctl.h \
sys/procfs.h \
diff --git a/gdbserver/configure.ac b/gdbserver/configure.ac
index 2814e9ba71dc..217564716147 100644
--- a/gdbserver/configure.ac
+++ b/gdbserver/configure.ac
@@ -73,7 +73,6 @@ AC_CHECK_HEADERS([ \
netinet/in.h \
netinet/tcp.h \
signal.h \
- string.h \
sys/file.h \
sys/ioctl.h \
sys/procfs.h \
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 10/16] gdb, gdbserver: remove configure checks already done by GDB_AC_COMMON
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (8 preceding siblings ...)
2026-10-13 15:35 ` [PATCH 09/16] gdbserver: don't check for string.h Simon Marchi
@ 2026-10-13 15:35 ` Simon Marchi
2026-10-13 15:35 ` [PATCH 11/16] gdb: remove redundant dlopen library search Simon Marchi
` (6 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
GDB_AC_COMMON, in gdbsupport/common.m4, already performs these checks,
so doing them again in the configure.ac files is redundant:
- in gdb: sys/resource.h, sys/socket.h, termios.h, thread_db.h,
getrlimit and AM_LANGINFO_CODESET
- in gdbserver: linux/elf.h, sys/socket.h, termios.h and
AC_FUNC_FORK
Remove them.
Regenerate configure in gdb and gdbserver.
Change-Id: I3ef2b19129a3ca5758d696447c5479255aadb175
---
gdb/configure | 51 ----------
gdb/configure.ac | 7 --
gdbserver/configure | 216 -----------------------------------------
gdbserver/configure.ac | 4 -
4 files changed, 278 deletions(-)
diff --git a/gdb/configure b/gdb/configure
index a64e382fa377..21168d43b68b 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -29158,9 +29158,6 @@ for ac_header in \
sys/procctl.h \
sys/ptrace.h \
sys/reg.h \
- sys/resource.h \
- termios.h \
- thread_db.h \
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -29230,18 +29227,6 @@ fi
done
-for ac_header in sys/socket.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_socket_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SOCKET_H 1
-_ACEOF
-
-fi
-
-done
-
for ac_header in ws2tcpip.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
@@ -29869,7 +29854,6 @@ for ac_func in \
clearenv \
getgid \
getpgid \
- getrlimit \
getuid \
iconvlist \
init_extended_color \
@@ -29899,41 +29883,6 @@ fi
done
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
-$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
-if ${am_cv_langinfo_codeset+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <langinfo.h>
-int
-main ()
-{
-char* cs = nl_langinfo(CODESET);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- am_cv_langinfo_codeset=yes
-else
- am_cv_langinfo_codeset=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
-$as_echo "$am_cv_langinfo_codeset" >&6; }
- if test $am_cv_langinfo_codeset = yes; then
-
-$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
-
- fi
-
-
# Check the return and argument types of ptrace.
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 6545320b7b96..890e2f2849de 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1456,9 +1456,6 @@ AC_CHECK_HEADERS([ \
sys/procctl.h \
sys/ptrace.h \
sys/reg.h \
- sys/resource.h \
- termios.h \
- thread_db.h \
])
AC_CHECK_HEADERS(sys/user.h, [], [],
@@ -1482,7 +1479,6 @@ AC_CHECK_HEADERS(term.h, [], [],
#endif
])
-AC_CHECK_HEADERS([sys/socket.h])
AC_CHECK_HEADERS([ws2tcpip.h])
AC_CHECK_HEADERS([execinfo.h])
@@ -1525,7 +1521,6 @@ AC_CHECK_FUNCS([ \
clearenv \
getgid \
getpgid \
- getrlimit \
getuid \
iconvlist \
init_extended_color \
@@ -1544,8 +1539,6 @@ AC_CHECK_FUNCS([ \
wresize \
])
-AM_LANGINFO_CODESET
-
# Check the return and argument types of ptrace.
GDB_AC_PTRACE
diff --git a/gdbserver/configure b/gdbserver/configure
index 6cf97b7ab5d7..d695c6191e33 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -12547,7 +12547,6 @@ fi
for ac_header in \
arpa/inet.h \
fcntl.h \
- linux/elf.h \
netdb.h \
netinet/in.h \
netinet/tcp.h \
@@ -12556,8 +12555,6 @@ for ac_header in \
sys/ioctl.h \
sys/procfs.h \
sys/reg.h \
- sys/socket.h \
- termios.h \
ws2tcpip.h \
do :
@@ -12573,219 +12570,6 @@ fi
done
-for ac_header in vfork.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
-if test "x$ac_cv_header_vfork_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_VFORK_H 1
-_ACEOF
-
-fi
-
-done
-
-for ac_func in fork vfork
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-if test "x$ac_cv_func_fork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
-$as_echo_n "checking for working fork... " >&6; }
-if ${ac_cv_func_fork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_fork_works=cross
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-
- /* By Ruediger Kuhlmann. */
- return fork () < 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_fork_works=yes
-else
- ac_cv_func_fork_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
-$as_echo "$ac_cv_func_fork_works" >&6; }
-
-else
- ac_cv_func_fork_works=$ac_cv_func_fork
-fi
-if test "x$ac_cv_func_fork_works" = xcross; then
- case $host in
- *-*-amigaos* | *-*-msdosdjgpp*)
- # Override, as these systems have only a dummy fork() stub
- ac_cv_func_fork_works=no
- ;;
- *)
- ac_cv_func_fork_works=yes
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
-fi
-ac_cv_func_vfork_works=$ac_cv_func_vfork
-if test "x$ac_cv_func_vfork" = xyes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
-$as_echo_n "checking for working vfork... " >&6; }
-if ${ac_cv_func_vfork_works+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_vfork_works=cross
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Thanks to Paul Eggert for this test. */
-$ac_includes_default
-#include <sys/wait.h>
-#ifdef HAVE_VFORK_H
-# include <vfork.h>
-#endif
-/* On some sparc systems, changes by the child to local and incoming
- argument registers are propagated back to the parent. The compiler
- is told about this with #include <vfork.h>, but some compilers
- (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
- static variable whose address is put into a register that is
- clobbered by the vfork. */
-static void
-#ifdef __cplusplus
-sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
-#endif
-{
- static pid_t child;
- if (!child) {
- child = vfork ();
- if (child < 0) {
- perror ("vfork");
- _exit(2);
- }
- if (!child) {
- arg = getpid();
- write(-1, "", 0);
- _exit (arg);
- }
- }
-}
-
-int
-main ()
-{
- pid_t parent = getpid ();
- pid_t child;
-
- sparc_address_test (0);
-
- child = vfork ();
-
- if (child == 0) {
- /* Here is another test for sparc vfork register problems. This
- test uses lots of local variables, at least as many local
- variables as main has allocated so far including compiler
- temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
- 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
- reuse the register of parent for one of the local variables,
- since it will think that parent can't possibly be used any more
- in this routine. Assigning to the local variable will thus
- munge parent in the parent process. */
- pid_t
- p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
- p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
- /* Convince the compiler that p..p7 are live; otherwise, it might
- use the same hardware register for all 8 local variables. */
- if (p != p1 || p != p2 || p != p3 || p != p4
- || p != p5 || p != p6 || p != p7)
- _exit(1);
-
- /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
- from child file descriptors. If the child closes a descriptor
- before it execs or exits, this munges the parent's descriptor
- as well. Test for this by closing stdout in the child. */
- _exit(close(fileno(stdout)) != 0);
- } else {
- int status;
- struct stat st;
-
- while (wait(&status) != child)
- ;
- return (
- /* Was there some problem with vforking? */
- child < 0
-
- /* Did the child fail? (This shouldn't happen.) */
- || status
-
- /* Did the vfork/compiler bug occur? */
- || parent != getpid()
-
- /* Did the file descriptor bug occur? */
- || fstat(fileno(stdout), &st) != 0
- );
- }
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_vfork_works=yes
-else
- ac_cv_func_vfork_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
-$as_echo "$ac_cv_func_vfork_works" >&6; }
-
-fi;
-if test "x$ac_cv_func_fork_works" = xcross; then
- ac_cv_func_vfork_works=$ac_cv_func_vfork
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
-fi
-
-if test "x$ac_cv_func_vfork_works" = xyes; then
-
-$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
-
-else
-
-$as_echo "#define vfork fork" >>confdefs.h
-
-fi
-if test "x$ac_cv_func_fork_works" = xyes; then
-
-$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
-
-fi
-
for ac_func in \
pread \
pread64 \
diff --git a/gdbserver/configure.ac b/gdbserver/configure.ac
index 217564716147..1f461fa05727 100644
--- a/gdbserver/configure.ac
+++ b/gdbserver/configure.ac
@@ -68,7 +68,6 @@ ZW_GNU_GETTEXT_SISTER_DIR
AC_CHECK_HEADERS([ \
arpa/inet.h \
fcntl.h \
- linux/elf.h \
netdb.h \
netinet/in.h \
netinet/tcp.h \
@@ -77,12 +76,9 @@ AC_CHECK_HEADERS([ \
sys/ioctl.h \
sys/procfs.h \
sys/reg.h \
- sys/socket.h \
- termios.h \
ws2tcpip.h \
])
-AC_FUNC_FORK
AC_CHECK_FUNCS([ \
pread \
pread64 \
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 11/16] gdb: remove redundant dlopen library search
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (9 preceding siblings ...)
2026-10-13 15:35 ` [PATCH 10/16] gdb, gdbserver: remove configure checks already done by GDB_AC_COMMON Simon Marchi
@ 2026-10-13 15:35 ` Simon Marchi
2026-10-13 15:35 ` [PATCH 12/16] gdb: don't check for long long support in the compiler Simon Marchi
` (5 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
configure.ac searches for the library providing dlopen
unconditionally, and then again when BFD supports ELF and plugins are
enabled. The second search can't find anything new. Remove it.
Regenerate configure.
Change-Id: I48f415c93cd5d07716f144a07a52bbbe253d700a
---
gdb/configure | 59 ------------------------------------------------
gdb/configure.ac | 4 ----
2 files changed, 63 deletions(-)
diff --git a/gdb/configure b/gdb/configure
index 21168d43b68b..292065371510 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -31419,65 +31419,6 @@ if test "$gdb_cv_var_bfd_elf" = yes; then
$as_echo "#define HAVE_ELF 1" >>confdefs.h
- # -ldl is provided by bfd/Makefile.am (LIBDL) <PLUGINS>.
- if test "$plugins" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
-$as_echo_n "checking for library containing dlopen... " >&6; }
-if ${ac_cv_search_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' dl; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_dlopen=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_dlopen+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_dlopen+:} false; then :
-
-else
- ac_cv_search_dlopen=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
-$as_echo "$ac_cv_search_dlopen" >&6; }
-ac_res=$ac_cv_search_dlopen
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
- fi
bfd_supports_elf=yes
all_binary_file_srcs="$all_binary_file_srcs \$(elf_SRCS)"
fi
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 890e2f2849de..192b1cbcbc31 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -2004,10 +2004,6 @@ if test "$gdb_cv_var_bfd_elf" = yes; then
CONFIG_OBS="$CONFIG_OBS gcore-elf.o elf-none-tdep.o"
AC_DEFINE(HAVE_ELF, 1,
[Define if ELF support should be included.])
- # -ldl is provided by bfd/Makefile.am (LIBDL) <PLUGINS>.
- if test "$plugins" = "yes"; then
- AC_SEARCH_LIBS(dlopen, dl)
- fi
bfd_supports_elf=yes
all_binary_file_srcs="$all_binary_file_srcs \$(elf_SRCS)"
fi
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 12/16] gdb: don't check for long long support in the compiler
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (10 preceding siblings ...)
2026-10-13 15:35 ` [PATCH 11/16] gdb: remove redundant dlopen library search Simon Marchi
@ 2026-10-13 15:35 ` Simon Marchi
2026-10-13 15:35 ` [PATCH 13/16] gdb: remove AC_C_CONST and AC_C_INLINE Simon Marchi
` (4 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
C++11 guarantees that long long is available, so the configure check
can't fail. Remove it from configure.ac.
Regenerate configure.
Change-Id: I81a7b6d43c06df62f5a9fc4b50d0100f2697818c
---
gdb/configure | 32 --------------------------------
gdb/configure.ac | 13 -------------
2 files changed, 45 deletions(-)
diff --git a/gdb/configure b/gdb/configure
index 292065371510..19ecb5d73187 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -30401,38 +30401,6 @@ _ACEOF
fi
-# Check if the compiler supports the `long long' type.
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
-$as_echo_n "checking for long long support in compiler... " >&6; }
-if ${gdb_cv_c_long_long+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-extern long long foo;
-int
-main ()
-{
-switch (foo & 2) { case 0: return 1; }
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gdb_cv_c_long_long=yes
-else
- gdb_cv_c_long_long=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
-$as_echo "$gdb_cv_c_long_long" >&6; }
-if test "$gdb_cv_c_long_long" != yes; then
- # libdecnumber requires long long.
- as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
-fi
-
# Check if the compiler and runtime support printing decfloats.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 192b1cbcbc31..fc21623961d0 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1682,19 +1682,6 @@ AC_CHECK_MEMBERS([struct ptrace_lwpinfo.pl_tdname], [], [],
AC_CHECK_MEMBERS([struct ptrace_lwpinfo.pl_syscall_code], [], [],
[#include <sys/ptrace.h>])
-# Check if the compiler supports the `long long' type.
-
-AC_CACHE_CHECK([for long long support in compiler], gdb_cv_c_long_long,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-[[extern long long foo;]],
-[[switch (foo & 2) { case 0: return 1; }]])],
- gdb_cv_c_long_long=yes,
- gdb_cv_c_long_long=no)])
-if test "$gdb_cv_c_long_long" != yes; then
- # libdecnumber requires long long.
- AC_MSG_ERROR([Compiler must support long long for GDB.])
-fi
-
# Check if the compiler and runtime support printing decfloats.
AC_CACHE_CHECK([for decfloat support in printf],
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 13/16] gdb: remove AC_C_CONST and AC_C_INLINE
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (11 preceding siblings ...)
2026-10-13 15:35 ` [PATCH 12/16] gdb: don't check for long long support in the compiler Simon Marchi
@ 2026-10-13 15:35 ` Simon Marchi
2026-10-13 15:36 ` [PATCH 14/16] gdbserver: remove fallback declarations of perror, vasprintf and vsnprintf Simon Marchi
` (3 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:35 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
These macros are meant to work around pre-ANSI C compilers that don't
support the const and inline keywords. GDB requires a C++17 compiler,
so they are not useful. Remove them from configure.ac.
Regenerate config.in and configure.
Change-Id: I73a55ee17ab3fd99d8edae519db32854bf6bae23
---
gdb/config.in | 9 ----
gdb/configure | 123 -----------------------------------------------
gdb/configure.ac | 2 -
3 files changed, 134 deletions(-)
diff --git a/gdb/config.in b/gdb/config.in
index 0f0afa6f26b0..9cfa1026d08f 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -817,15 +817,6 @@
/* Use structured /proc on Solaris. */
#undef _STRUCTURED_PROC
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-#undef inline
-#endif
-
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
diff --git a/gdb/configure b/gdb/configure
index 19ecb5d73187..5290d29efbce 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -29497,129 +29497,6 @@ fi
# Checks for compiler characteristics. #
# ------------------------------------- #
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if ${ac_cv_c_const+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this sort of thing. */
- typedef int charset[2];
- const charset cs = { 0, 0 };
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *pcpcc;
- char **ppc;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- pcpcc = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++pcpcc;
- ppc = (char**) pcpcc;
- pcpcc = (char const *const *) ppc;
- { /* SCO 3.2v4 cc rejects this sort of thing. */
- char tx;
- char *t = &tx;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- if (s) return 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; } bx;
- struct s *b = &bx; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- if (!foo) return 0;
- }
- return !cs[0] && !zero.x;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_const=yes
-else
- ac_cv_c_const=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
-
-$as_echo "#define const /**/" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if ${ac_cv_c_inline+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_inline=$ac_kw
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test "$ac_cv_c_inline" != no && break
-done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
-
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
- esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
- ;;
-esac
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
if ${ac_cv_c_bigendian+:} false; then :
diff --git a/gdb/configure.ac b/gdb/configure.ac
index fc21623961d0..b1e0a82b9b07 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1508,8 +1508,6 @@ AC_CHECK_TYPES(socklen_t, [], [],
# Checks for compiler characteristics. #
# ------------------------------------- #
-AC_C_CONST
-AC_C_INLINE
AC_C_BIGENDIAN
# ------------------------------ #
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 14/16] gdbserver: remove fallback declarations of perror, vasprintf and vsnprintf
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (12 preceding siblings ...)
2026-10-13 15:35 ` [PATCH 13/16] gdb: remove AC_C_CONST and AC_C_INLINE Simon Marchi
@ 2026-10-13 15:36 ` Simon Marchi
2026-10-13 15:36 ` [PATCH 15/16] gdb: remove redundant snprintf declaration check Simon Marchi
` (2 subsequent siblings)
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:36 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
server.h declares perror, vasprintf and vsnprintf if configure did not
find a declaration for them. perror and vsnprintf are standard C++,
and libiberty.h already declares vasprintf and vsnprintf when the
system doesn't.
Remove the fallback declarations from server.h, and the
AC_CHECK_DECLS call from configure.ac.
Regenerate config.in and configure.
Change-Id: I6afe4a6fa610a37599b7b7d28628dea43b584892
---
gdbserver/config.in | 4 ----
gdbserver/configure | 32 --------------------------------
gdbserver/configure.ac | 2 --
gdbserver/server.h | 13 -------------
4 files changed, 51 deletions(-)
diff --git a/gdbserver/config.in b/gdbserver/config.in
index d0b609003800..7aae2f7398b5 100644
--- a/gdbserver/config.in
+++ b/gdbserver/config.in
@@ -58,10 +58,6 @@
/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
#undef HAVE_DECL_FFS
-/* Define to 1 if you have the declaration of `perror', and to 0 if you don't.
- */
-#undef HAVE_DECL_PERROR
-
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
#undef HAVE_DECL_SNPRINTF
diff --git a/gdbserver/configure b/gdbserver/configure
index d695c6191e33..9555b15bd725 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -13228,38 +13228,6 @@ _ACEOF
-ac_fn_c_check_decl "$LINENO" "perror" "ac_cv_have_decl_perror" "$ac_includes_default"
-if test "x$ac_cv_have_decl_perror" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_PERROR $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
-if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_VASPRINTF $ac_have_decl
-_ACEOF
-ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
-if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_VSNPRINTF $ac_have_decl
-_ACEOF
-
-
ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
# include <sys/socket.h>
diff --git a/gdbserver/configure.ac b/gdbserver/configure.ac
index 1f461fa05727..2ae3e1c6e494 100644
--- a/gdbserver/configure.ac
+++ b/gdbserver/configure.ac
@@ -102,8 +102,6 @@ LIBS="$old_LIBS"
libiberty_INIT
-AC_CHECK_DECLS([perror, vasprintf, vsnprintf])
-
AC_CHECK_TYPES(socklen_t, [], [],
[#include <sys/types.h>
#if HAVE_SYS_SOCKET_H
diff --git a/gdbserver/server.h b/gdbserver/server.h
index bbba3650de7d..1a9e6ef62f8a 100644
--- a/gdbserver/server.h
+++ b/gdbserver/server.h
@@ -33,19 +33,6 @@ static_assert (sizeof (CORE_ADDR) >= sizeof (void *));
#include "gdbsupport/version.h"
-#if !HAVE_DECL_PERROR
-#ifndef perror
-extern void perror (const char *);
-#endif
-#endif
-
-#if !HAVE_DECL_VASPRINTF
-extern int vasprintf(char **strp, const char *fmt, va_list ap);
-#endif
-#if !HAVE_DECL_VSNPRINTF
-int vsnprintf(char *str, size_t size, const char *format, va_list ap);
-#endif
-
#ifdef IN_PROCESS_AGENT
# define PROG "ipa"
#else
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 15/16] gdb: remove redundant snprintf declaration check
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (13 preceding siblings ...)
2026-10-13 15:36 ` [PATCH 14/16] gdbserver: remove fallback declarations of perror, vasprintf and vsnprintf Simon Marchi
@ 2026-10-13 15:36 ` Simon Marchi
2026-10-13 15:36 ` [PATCH 16/16] gdbserver, gdbsupport: don't check for signal.h, fcntl.h and locale.h Simon Marchi
2026-10-14 12:08 ` [PATCH 00/16] Cleanup obsolete configure checks Tom Tromey
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:36 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
configure.ac checks for the snprintf declaration, but libiberty_INIT
already does it. Remove the check from configure.ac.
The only user of HAVE_DECL_SNPRINTF in GDB is a check in
python-internal.h, which defines HAVE_SNPRINTF on Windows, to prevent
older Python headers from redefining snprintf to _snprintf. It uses
"defined (HAVE_DECL_SNPRINTF)", which is always true, since
AC_CHECK_DECLS defines HAVE_DECL_SNPRINTF to either 0 or 1. Since it
apparently worked fine like this for a while, simplify the condition to
just check _WIN32. snprintf is standard in C++11 anyway.
I checked whether defining HAVE_SNPRINTF is still needed at all. It is
no longer necessary since CPython commit e822e37946f2 ("bpo-36020:
Remove snprintf macro in pyerrors.h (GH-20889)", 2020-06-15), which is
available since Python 3.9. So once we drop support for Python 3.8 and
below, this can go. Add a note in the source about that.
Regenerate configure.
Change-Id: I431ccdf7d67a673c8a01ba4f34378a040a4c7bc6
---
gdb/configure | 11 -----------
gdb/configure.ac | 1 -
gdb/python/python-internal.h | 7 +++++--
3 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/gdb/configure b/gdb/configure
index 5290d29efbce..cfe994c3842a 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -29426,17 +29426,6 @@ _ACEOF
-ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
-if test "x$ac_cv_have_decl_snprintf" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SNPRINTF $ac_have_decl
-_ACEOF
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
$as_echo_n "checking for LC_MESSAGES... " >&6; }
diff --git a/gdb/configure.ac b/gdb/configure.ac
index b1e0a82b9b07..d10b20f5a17d 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1488,7 +1488,6 @@ AC_CHECK_HEADERS([execinfo.h])
libiberty_INIT
-AC_CHECK_DECLS([snprintf])
AM_LC_MESSAGES
# ------------------ #
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index 5f023b0d9719..5af06d02a51a 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -39,8 +39,11 @@
around technique as above. */
#undef _FILE_OFFSET_BITS
-/* A kludge to avoid redefinition of snprintf on Windows by pyerrors.h. */
-#if defined(_WIN32) && defined(HAVE_DECL_SNPRINTF)
+/* A kludge to avoid redefinition of snprintf on Windows by pyerrors.h.
+
+ This is only needed for Python <= 3.8, so it can go once support for those
+ Python versions is dropped. */
+#ifdef _WIN32
#define HAVE_SNPRINTF 1
#endif
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 16/16] gdbserver, gdbsupport: don't check for signal.h, fcntl.h and locale.h
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (14 preceding siblings ...)
2026-10-13 15:36 ` [PATCH 15/16] gdb: remove redundant snprintf declaration check Simon Marchi
@ 2026-10-13 15:36 ` Simon Marchi
2026-10-14 12:08 ` [PATCH 00/16] Cleanup obsolete configure checks Tom Tromey
16 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-13 15:36 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
These headers are already included unconditionally in files built on
all hosts: signal.h in gdb/utils.c, fcntl.h in gdb/defs.h and locale.h
in gnulib/import/hard-locale.c. This shows that the checks are not
necessary.
Remove the HAVE_SIGNAL_H, HAVE_FCNTL_H and HAVE_LOCALE_H conditions
around their includes, and the corresponding header checks from
common.m4 and gdbserver's configure.ac.
Regenerate config.in and configure in gdb, gdbserver and gdbsupport.
Change-Id: I0b2953f3c9d2a13dc9cec37c683986b36edbecf4
---
gdb/config.in | 6 ------
gdb/configure | 2 --
gdbserver/config.in | 9 ---------
gdbserver/configure | 4 ----
gdbserver/configure.ac | 2 --
gdbserver/fork-child.cc | 2 --
gdbserver/gdbreplay.cc | 2 --
gdbserver/remote-utils.cc | 4 ----
gdbserver/server.cc | 2 --
gdbsupport/common.m4 | 2 --
gdbsupport/config.in | 6 ------
gdbsupport/configure | 2 --
gdbsupport/gdb_locale.h | 4 +---
gdbsupport/signals.cc | 2 --
14 files changed, 1 insertion(+), 48 deletions(-)
diff --git a/gdb/config.in b/gdb/config.in
index 9cfa1026d08f..7ea0e9cfce8e 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -303,9 +303,6 @@
/* Define to 1 if you have the <linux/perf_event.h> header file. */
#undef HAVE_LINUX_PERF_EVENT_H
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
/* Define to 1 if the system has the type `long long'. */
#undef HAVE_LONG_LONG
@@ -429,9 +426,6 @@
/* Define to 1 if you have the `sigaltstack' function. */
#undef HAVE_SIGALTSTACK
-/* Define to 1 if you have the <signal.h> header file. */
-#undef HAVE_SIGNAL_H
-
/* Define to 1 if you have the `sigprocmask' function. */
#undef HAVE_SIGPROCMASK
diff --git a/gdb/configure b/gdb/configure
index cfe994c3842a..b6222402d6c0 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -19837,10 +19837,8 @@ for ac_header in \
dlfcn.h \
linux/elf.h \
linux/perf_event.h \
- locale.h \
poll.h \
proc_service.h \
- signal.h \
sys/poll.h \
sys/resource.h \
sys/select.h \
diff --git a/gdbserver/config.in b/gdbserver/config.in
index 7aae2f7398b5..cf6ebe0a4f26 100644
--- a/gdbserver/config.in
+++ b/gdbserver/config.in
@@ -105,9 +105,6 @@
/* Define if <sys/procfs.h> has elf_fpregset_t. */
#undef HAVE_ELF_FPREGSET_T
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
/* Define to 1 if you have the `fdwalk' function. */
#undef HAVE_FDWALK
@@ -165,9 +162,6 @@
/* Define if the target supports PTRACE_PEEKUSR for register access. */
#undef HAVE_LINUX_USRREGS
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
/* Define to 1 if the system has the type `long long'. */
#undef HAVE_LONG_LONG
@@ -253,9 +247,6 @@
/* Define to 1 if you have the `sigaltstack' function. */
#undef HAVE_SIGALTSTACK
-/* Define to 1 if you have the <signal.h> header file. */
-#undef HAVE_SIGNAL_H
-
/* Define to 1 if you have the `sigprocmask' function. */
#undef HAVE_SIGPROCMASK
diff --git a/gdbserver/configure b/gdbserver/configure
index 9555b15bd725..f838f0881201 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -8041,10 +8041,8 @@ for ac_header in \
dlfcn.h \
linux/elf.h \
linux/perf_event.h \
- locale.h \
poll.h \
proc_service.h \
- signal.h \
sys/poll.h \
sys/resource.h \
sys/select.h \
@@ -12546,11 +12544,9 @@ fi
for ac_header in \
arpa/inet.h \
- fcntl.h \
netdb.h \
netinet/in.h \
netinet/tcp.h \
- signal.h \
sys/file.h \
sys/ioctl.h \
sys/procfs.h \
diff --git a/gdbserver/configure.ac b/gdbserver/configure.ac
index 2ae3e1c6e494..16a2520baf42 100644
--- a/gdbserver/configure.ac
+++ b/gdbserver/configure.ac
@@ -67,11 +67,9 @@ ZW_GNU_GETTEXT_SISTER_DIR
AC_CHECK_HEADERS([ \
arpa/inet.h \
- fcntl.h \
netdb.h \
netinet/in.h \
netinet/tcp.h \
- signal.h \
sys/file.h \
sys/ioctl.h \
sys/procfs.h \
diff --git a/gdbserver/fork-child.cc b/gdbserver/fork-child.cc
index 7f57ea424375..055f772ec822 100644
--- a/gdbserver/fork-child.cc
+++ b/gdbserver/fork-child.cc
@@ -19,9 +19,7 @@
#include "gdbsupport/job-control.h"
#include "gdbsupport/scoped_restore.h"
#include "nat/fork-inferior.h"
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#ifdef SIGTTOU
/* A file descriptor for the controlling terminal. */
diff --git a/gdbserver/gdbreplay.cc b/gdbserver/gdbreplay.cc
index f4626ceadb82..3a09a4d0f0c5 100644
--- a/gdbserver/gdbreplay.cc
+++ b/gdbserver/gdbreplay.cc
@@ -29,9 +29,7 @@
#if HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
-#if HAVE_SIGNAL_H
#include <signal.h>
-#endif
#include <unistd.h>
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
diff --git a/gdbserver/remote-utils.cc b/gdbserver/remote-utils.cc
index ff71eb674829..8192e4577f2e 100644
--- a/gdbserver/remote-utils.cc
+++ b/gdbserver/remote-utils.cc
@@ -51,12 +51,8 @@
#if HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
-#if HAVE_SIGNAL_H
#include <signal.h>
-#endif
-#if HAVE_FCNTL_H
#include <fcntl.h>
-#endif
#include "gdbsupport/gdb_sys_time.h"
#include <unistd.h>
#if HAVE_ARPA_INET_H
diff --git a/gdbserver/server.cc b/gdbserver/server.cc
index a208e24d09f6..74774fcde7ca 100644
--- a/gdbserver/server.cc
+++ b/gdbserver/server.cc
@@ -23,9 +23,7 @@
#include "gdbsupport/rsp-low.h"
#include "gdbsupport/signals-state-save-restore.h"
#include <unistd.h>
-#if HAVE_SIGNAL_H
#include <signal.h>
-#endif
#include "gdbsupport/gdb_vecs.h"
#include "gdbsupport/gdb_wait.h"
#include "gdbsupport/btrace-common.h"
diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4
index 2f4b67127434..bf21c31d78d7 100644
--- a/gdbsupport/common.m4
+++ b/gdbsupport/common.m4
@@ -43,10 +43,8 @@ AC_CHECK_HEADERS([ \
dlfcn.h \
linux/elf.h \
linux/perf_event.h \
- locale.h \
poll.h \
proc_service.h \
- signal.h \
sys/poll.h \
sys/resource.h \
sys/select.h \
diff --git a/gdbsupport/config.in b/gdbsupport/config.in
index f99a88352196..ff84ab0d6007 100644
--- a/gdbsupport/config.in
+++ b/gdbsupport/config.in
@@ -141,9 +141,6 @@
/* Define to 1 if you have the <linux/perf_event.h> header file. */
#undef HAVE_LINUX_PERF_EVENT_H
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
/* Define to 1 if the system has the type `long long'. */
#undef HAVE_LONG_LONG
@@ -204,9 +201,6 @@
/* Define to 1 if you have the `sigaltstack' function. */
#undef HAVE_SIGALTSTACK
-/* Define to 1 if you have the <signal.h> header file. */
-#undef HAVE_SIGNAL_H
-
/* Define to 1 if you have the `sigprocmask' function. */
#undef HAVE_SIGPROCMASK
diff --git a/gdbsupport/configure b/gdbsupport/configure
index 5df02c4676fd..74861f27bfdc 100755
--- a/gdbsupport/configure
+++ b/gdbsupport/configure
@@ -10940,10 +10940,8 @@ for ac_header in \
dlfcn.h \
linux/elf.h \
linux/perf_event.h \
- locale.h \
poll.h \
proc_service.h \
- signal.h \
sys/poll.h \
sys/resource.h \
sys/select.h \
diff --git a/gdbsupport/gdb_locale.h b/gdbsupport/gdb_locale.h
index f5f0f5622770..784552e670fc 100644
--- a/gdbsupport/gdb_locale.h
+++ b/gdbsupport/gdb_locale.h
@@ -19,9 +19,7 @@
#ifndef GDBSUPPORT_GDB_LOCALE_H
#define GDBSUPPORT_GDB_LOCALE_H
-#ifdef HAVE_LOCALE_H
-# include <locale.h>
-#endif
+#include <locale.h>
#ifdef ENABLE_NLS
# include <libintl.h>
diff --git a/gdbsupport/signals.cc b/gdbsupport/signals.cc
index 367ca571f3db..6f871c28c9e3 100644
--- a/gdbsupport/signals.cc
+++ b/gdbsupport/signals.cc
@@ -18,9 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_SIGNAL_H
#include <signal.h>
-#endif
#include "gdb_signals.h"
--
2.56.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 00/16] Cleanup obsolete configure checks
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
` (15 preceding siblings ...)
2026-10-13 15:36 ` [PATCH 16/16] gdbserver, gdbsupport: don't check for signal.h, fcntl.h and locale.h Simon Marchi
@ 2026-10-14 12:08 ` Tom Tromey
2026-10-14 12:53 ` Simon Marchi
16 siblings, 1 reply; 19+ messages in thread
From: Tom Tromey @ 2026-10-14 12:08 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches
>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
Simon> After removing an obsolete Expat configure check, I asked Claude what
Simon> else looked unnecessary anymore. This series removes the things that I
Simon> think are most obviously not needed anymore. There are more things that
Simon> could be cleaned up, but those things would require more research or
Simon> judgement calls to decide if it's ok to remove. I'll send those little
Simon> by little later.
Thanks. I read through these and they look good to me.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 00/16] Cleanup obsolete configure checks
2026-10-14 12:08 ` [PATCH 00/16] Cleanup obsolete configure checks Tom Tromey
@ 2026-10-14 12:53 ` Simon Marchi
0 siblings, 0 replies; 19+ messages in thread
From: Simon Marchi @ 2026-10-14 12:53 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On 10/14/26 8:08 AM, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
>
> Simon> After removing an obsolete Expat configure check, I asked Claude what
> Simon> else looked unnecessary anymore. This series removes the things that I
> Simon> think are most obviously not needed anymore. There are more things that
> Simon> could be cleaned up, but those things would require more research or
> Simon> judgement calls to decide if it's ok to remove. I'll send those little
> Simon> by little later.
>
> Thanks. I read through these and they look good to me.
> Approved-By: Tom Tromey <tom@tromey.com>
>
> Tom
Thanks, pushed.
Simon
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2026-10-14 12:54 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-13 15:35 [PATCH 00/16] Cleanup obsolete configure checks Simon Marchi
2026-10-13 15:35 ` [PATCH 01/16] gdb: don't check for sys/debugreg.h Simon Marchi
2026-10-13 15:35 ` [PATCH 02/16] gdb: don't check for sigsetmask and ttrace Simon Marchi
2026-10-13 15:35 ` [PATCH 03/16] gdbsupport: don't check for strstr declaration Simon Marchi
2026-10-13 15:35 ` [PATCH 04/16] gdbserver, gdbsupport: remove unneeded sys/procfs.h type checks Simon Marchi
2026-10-13 15:35 ` [PATCH 05/16] gdbserver: don't define HAVE_SYNC_BUILTINS Simon Marchi
2026-10-13 15:35 ` [PATCH 06/16] gdb: don't check for long double support Simon Marchi
2026-10-13 15:35 ` [PATCH 07/16] gdbserver: remove leftover Windows CE check in configure.ac Simon Marchi
2026-10-13 15:35 ` [PATCH 08/16] gdbsupport: don't check for memory.h Simon Marchi
2026-10-13 15:35 ` [PATCH 09/16] gdbserver: don't check for string.h Simon Marchi
2026-10-13 15:35 ` [PATCH 10/16] gdb, gdbserver: remove configure checks already done by GDB_AC_COMMON Simon Marchi
2026-10-13 15:35 ` [PATCH 11/16] gdb: remove redundant dlopen library search Simon Marchi
2026-10-13 15:35 ` [PATCH 12/16] gdb: don't check for long long support in the compiler Simon Marchi
2026-10-13 15:35 ` [PATCH 13/16] gdb: remove AC_C_CONST and AC_C_INLINE Simon Marchi
2026-10-13 15:36 ` [PATCH 14/16] gdbserver: remove fallback declarations of perror, vasprintf and vsnprintf Simon Marchi
2026-10-13 15:36 ` [PATCH 15/16] gdb: remove redundant snprintf declaration check Simon Marchi
2026-10-13 15:36 ` [PATCH 16/16] gdbserver, gdbsupport: don't check for signal.h, fcntl.h and locale.h Simon Marchi
2026-10-14 12:08 ` [PATCH 00/16] Cleanup obsolete configure checks Tom Tromey
2026-10-14 12:53 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox