From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH 06/16] gdb: don't check for long double support
Date: Tue, 13 Oct 2026 11:35:52 -0400 [thread overview]
Message-ID: <20261013153657.1610298-7-simon.marchi@efficios.com> (raw)
In-Reply-To: <20261013153657.1610298-1-simon.marchi@efficios.com>
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
next prev parent reply other threads:[~2026-10-13 15:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Simon Marchi [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261013153657.1610298-7-simon.marchi@efficios.com \
--to=simon.marchi@efficios.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox