https://gcc.gnu.org/g:7e8c3dc876c127cc87e78ffdf532bad4ff4db033

commit r17-5291-g7e8c3dc876c127cc87e78ffdf532bad4ff4db033
Author: Sam James <[email protected]>
Date:   Wed Oct 14 02:15:17 2026 +0100

    libcpp: assume C89 for abort
    
    We can assume abort is available for C89.
    
    libcpp/ChangeLog:
            PR bootstrap/112422
    
            * config.in: Regenerate.
            * configure: Regenerate.
            * configure.ac: Don't search for abort.
            * system.h: Drop abort fallback.

Diff:
---
 libcpp/config.in    |  4 ----
 libcpp/configure    | 10 ----------
 libcpp/configure.ac |  2 +-
 libcpp/system.h     | 12 ------------
 4 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/libcpp/config.in b/libcpp/config.in
index b1ad2779f1ab..8eb46835c1c6 100644
--- a/libcpp/config.in
+++ b/libcpp/config.in
@@ -50,10 +50,6 @@
    */
 #undef HAVE_DCGETTEXT
 
-/* Define to 1 if you have the declaration of `abort', and to 0 if you don't.
-   */
-#undef HAVE_DECL_ABORT
-
 /* Define to 1 if you have the declaration of `asprintf', and to 0 if you
    don't. */
 #undef HAVE_DECL_ASPRINTF
diff --git a/libcpp/configure b/libcpp/configure
index 0d9bb181989b..19bb0984868e 100755
--- a/libcpp/configure
+++ b/libcpp/configure
@@ -5921,16 +5921,6 @@ _ACEOF
 fi
 done
 
-ac_fn_c_check_decl "$LINENO" "abort" "ac_cv_have_decl_abort" 
"$ac_includes_default"
-if test "x$ac_cv_have_decl_abort" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ABORT $ac_have_decl
-_ACEOF
 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" 
"$ac_includes_default"
 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
   ac_have_decl=1
diff --git a/libcpp/configure.ac b/libcpp/configure.ac
index 0a30079287cd..d31bee8e0070 100644
--- a/libcpp/configure.ac
+++ b/libcpp/configure.ac
@@ -79,7 +79,7 @@ define(libcpp_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked 
dnl
   fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
   putchar_unlocked putc_unlocked)
 AC_CHECK_FUNCS(libcpp_UNLOCKED_FUNCS setlocale)
-AC_CHECK_DECLS([abort, asprintf, basename(char *), errno, getopt, vasprintf])
+AC_CHECK_DECLS([asprintf, basename(char *), errno, getopt, vasprintf])
 AC_CHECK_DECLS(m4_split(m4_normalize(libcpp_UNLOCKED_FUNCS)))
 
 # Checks for library functions.
diff --git a/libcpp/system.h b/libcpp/system.h
index e174df592205..3b0e497f0893 100644
--- a/libcpp/system.h
+++ b/libcpp/system.h
@@ -301,18 +301,6 @@ extern int errno;
    here.  These checks will be in the undefined state while configure
    is running so be careful to test "defined (HAVE_DECL_*)".  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined (HAVE_DECL_ABORT) && !HAVE_DECL_ABORT
-extern void abort (void);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
 #if HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif

Reply via email to