Hi, For some reason, pushing a new revision to the same branch as used in https://forge.sourceware.org/gcc/gcc/pulls/236, the Forge UI does not pick it up. Therefor I created this new pull request.
I noticed that building GDB and other tools in binutils did not take the path given to --with-zstd into account. In my case, I have a system wide zstd dynamic library, but my build should use a static library instead. I thus, build zstd as a static library and point configure to this location. The [feedback](https://sourceware.org/pipermail/binutils/2026-September/151700.html) on my [binutils patch](https://sourceware.org/pipermail/binutils/2026-September/151690.html) was that I should do the change in the GCC tree and then sync that back to binutils. Changes since v1 (in https://forge.sourceware.org/gcc/gcc/pulls/236): - Unify the interface for the consumers of the macro on ZSTD_CFLAGS and ZSTD_LIBS for the result. - Use lowercase variable names for all local variables. Ok for trunk? Kind regards, Torbjörn -- TO: Alexandre Oliva <[email protected]> --- This is a forge pull request published on the gcc-patches mailing list mailing list as requested by Torbjörn Svensson via Sourceware Forge <[email protected]>. Forge discussion: https://forge.sourceware.org/gcc/gcc/pulls/248 Get it locally using: ``` git fetch forge-upstream "+refs/versioned_pull/248/*:refs/versioned_pull/248/*" git switch -c "pr-248-v1" "refs/versioned_pull/248/1/head" ``` Or, download the patch at: https://forge.sourceware.org/gcc/gcc/pulls/248.diff Created on: 2026-10-12 13:13:46+00:00 Latest update: 2026-10-13 12:39:52+00:00 Changes: 8 changed files, 965 additions, 218 deletions Head revision: azoff/gcc ref pr/config/zstd commit e85e04fa7594e5f8710849e73936089d9e4d3f41 Base revision: gcc/gcc ref trunk commit a4a397c7d50224d9d3b5c6e0c9d246e600778c04 r17-5079-ga4a397c7d50224 Merge base: a4a397c7d50224d9d3b5c6e0c9d246e600778c04 Requested Reviewers: Changed files: - M: config/zstd.m4 - M: gcc/Makefile.in - M: gcc/aclocal.m4 - M: gcc/configure - M: gcc/configure.ac - M: libbacktrace/aclocal.m4 - M: libbacktrace/configure - M: libbacktrace/configure.ac Torbjörn SVENSSON (3): config: Expand the shared zstd configure macro gcc: Use shared zstd detection libbacktrace: Use shared zstd detection config/zstd.m4 | 119 ++++++++- gcc/Makefile.in | 4 +- gcc/aclocal.m4 | 2 + gcc/configure | 513 ++++++++++++++++++++++++++++++-------- gcc/configure.ac | 80 +----- libbacktrace/aclocal.m4 | 2 + libbacktrace/configure | 458 ++++++++++++++++++++++++++++++++-- libbacktrace/configure.ac | 5 +- 8 files changed, 965 insertions(+), 218 deletions(-) -- 2.54.0
