binutils Newspaper
NOVEMBER 30, 2026
config — Proposed — Sentiment 7 / 10

config: Sync pkg.m4 from GCC

Updates binutils' `pkg.m4` to use `AC_LINK_IFELSE` instead of the obsolete `AC_TRY_LINK`.

This patch synchronizes the pkg.m4 file from GCC’s repository into binutils. The update replaces the obsolete AC_TRY_LINK macro with the recommended AC_LINK_IFELSE within the PKG_CHECK_MODULES macro. This change is part of ongoing maintenance to keep configuration scripts current with Autoconf best practices. The author confirmed that regenerating autoconf files after applying this patch resulted in no changes to the generated files.

In the Thread 2 participants
  1. Pietro Monteiro <pietro@sociotechnical.xyz> proposer

    Submits a patch to sync `pkg.m4` from GCC, updating an obsolete Autoconf macro and noting that it does not change generated files.

    “Sorry I missed this patch had been reviwed: https://inbox.sourceware.org/gcc-patches/20250530213858.59471-1-pietro@sociotechnical.xyz/t/ I regenerated all autoconf files after applying the patch and there's no changes.”
  2. Pietro Monteiro <pietro@sociotechnical.xyz> maintainer

    Follows up to clarify that the patch should have been marked as committed.

    “Sorry, meant to tag this patch as committed.”

In Details

This patch updates the PKG_CHECK_MODULES macro in config/pkg.m4 by replacing AC_TRY_LINK with AC_LINK_IFELSE. This aligns binutils' build system configuration with modern Autoconf practices, as AC_TRY_LINK is deprecated. The change originates from a corresponding commit in GCC's tree and is a routine maintenance update to the build infrastructure, ensuring compatibility and correctness of the autoconf-generated scripts.

For Context
Autoconf
A tool that automatically configures source code packages to adapt to a specific operating system or environment. It generates shell scripts to probe the system for required features and libraries.
AC_TRY_LINK
An obsolete Autoconf macro used to check if a C program can be linked. It has been replaced by more specific and robust macros like AC_LINK_IFELSE.
AC_LINK_IFELSE
An Autoconf macro used to check if a program can be compiled and linked. It is the recommended replacement for AC_TRY_LINK.
PKG_CHECK_MODULES
An Autoconf macro, often provided by pkg-config, used to find and link against external libraries.
pkg.m4
A file containing Autoconf macros related to package checking, often used for handling dependencies.
autoconf-archive
A repository of useful Autoconf macros that are not part of the standard Autoconf distribution.
Filed Under: build systemautoconfmaintenance