[binutils-gdb] gold: configury: fix obsolete macros
Pietro Monteiro
pietro@sourceware.org
Wed Jul 23 23:50:35 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4f170cf93d7994da1905e349ddfc5fd90441e122
commit 4f170cf93d7994da1905e349ddfc5fd90441e122
Author: Pietro Monteiro <pietro@sociotechnical.xyz>
Date: Wed Jul 23 19:49:50 2025 -0400
gold: configury: fix obsolete macros
Running `autoreconf -vf -Wall' in the gold directory shows errors about the use
of obsolete macros. This patch fix the issues with macros used directly by
configure.ac. However, it doesn't fix all warnings. There are autoconf warnings
about macros from files in config and one automake warning about a target being
shadowed. It cuts a lot of the noise down and makes an upgrade to autoconf
2.71+ easier.
https://www.gnu.org/software/automake/manual/1.12.2/html_node/Obsolete-Macros.html#index-AM_005fCONFIG_005fHEADER
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html#index-AC_005fOUTPUT-2133
gold/ChangeLog:
* aclocal.m4: Regenerate.
* configure: Regenerate.
* configure.ac: Replace AM_CONFIG_HEADER by AC_CONFIG_HEADERS. Replace
AC_OUTPUT(file list) by AC_CONFIG_FILES([file list])\nAC_OUTPUT.
Approved-by: Alan Modra <amodra@gmail.com>
Diff:
---
gold/aclocal.m4 | 29 -----------------------------
gold/configure | 1 +
gold/configure.ac | 5 +++--
3 files changed, 4 insertions(+), 31 deletions(-)
diff --git a/gold/aclocal.m4 b/gold/aclocal.m4
index d0455aad6c7..a8512a23690 100644
--- a/gold/aclocal.m4
+++ b/gold/aclocal.m4
@@ -751,35 +751,6 @@ else
fi
])
-# -*- Autoconf -*-
-# Obsolete and "removed" macros, that must however still report explicit
-# error messages when used, to smooth transition.
-#
-# Copyright (C) 1996-2017 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([AM_CONFIG_HEADER],
-[AC_DIAGNOSE([obsolete],
-['$0': this macro is obsolete.
-You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
-AC_CONFIG_HEADERS($@)])
-
-AC_DEFUN([AM_PROG_CC_STDC],
-[AC_PROG_CC
-am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
-AC_DIAGNOSE([obsolete],
-['$0': this macro is obsolete.
-You should simply use the 'AC][_PROG_CC' macro instead.
-Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
-but upon 'ac_cv_prog_cc_stdc'.])])
-
-AC_DEFUN([AM_C_PROTOTYPES],
- [AC_FATAL([automatic de-ANSI-fication support has been removed])])
-AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
-
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
diff --git a/gold/configure b/gold/configure
index f4cb3f86df6..a81a04f0531 100755
--- a/gold/configure
+++ b/gold/configure
@@ -13590,6 +13590,7 @@ DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
diff --git a/gold/configure.ac b/gold/configure.ac
index 90e51de3046..597788daf7e 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -25,7 +25,7 @@ AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([no-dist parallel-tests])
AM_SILENT_RULES([yes])
-AM_CONFIG_HEADER(config.h:config.in)
+AC_CONFIG_HEADERS([config.h:config.in])
AC_USE_SYSTEM_EXTENSIONS
@@ -737,4 +737,5 @@ AM_LC_MESSAGES
AM_MAINTAINER_MODE
-AC_OUTPUT(Makefile testsuite/Makefile po/Makefile.in:po/Make-in)
+AC_CONFIG_FILES([Makefile testsuite/Makefile po/Makefile.in:po/Make-in])
+AC_OUTPUT
More information about the Binutils-cvs
mailing list