binutils Newspaper
OCTOBER 6, 2026
configure — Proposed

configure: Support --with-zstd=PATH

Adds support to the configure scripts for specifying a custom path for zstd library installation.

This patch updates the configure scripts to allow users to specify a PATH for the zstd library using the —with-zstd=PATH option. It ensures that the specified zstd version is 1.4.0 or newer and includes necessary changes in various binutils sub-projects’ configure scripts. This addresses the issue where the path provided to —with-zstd was not being utilized, unlike in GCC. The patch also notes discrepancies in configure file content compared to autoconf output.

In Details

This patch modifies the configure scripts in several binutils components (bfd, binutils, gas, gdb, gold, ld) to correctly process the PATH argument for the --with-zstd option. Previously, this path was ignored, leading to reliance on system-installed zstd or build failures. The change aligns binutils' behavior with GCC, which already supports this functionality. The author also raises a question about why the checked-in configure files differ from what autoconf2.69 generates, specifically regarding the LARGE_OFF_T macro definition.

For Context
configure
A build script that automatically adapts software to a specific operating system or environment by checking for necessary components and setting up build parameters.
zstd
A fast lossless compression algorithm, often used for compressing data streams or files. In this context, it's used for compressing debug sections.
PATH
In this context, it refers to a file system path specifying the directory where the zstd library and its headers are installed.
autoconf
A tool that generates scripts to automatically configure source code packages.
LARGE_OFF_T
A macro likely used to define a large integer type for file offsets, potentially related to handling large files.
Filed Under: buildconfigurezstdpatch