guix: disable LTO in GCC #35261

pull fanquake wants to merge 5 commits into bitcoin:master from fanquake:guix_gcc_disable_lto changing 1 files +28 −21
  1. fanquake commented at 3:19 PM on May 11, 2026: member

    We don't use LTO in release builds, and neither do any of our dependencies, so disable support in GCC. This reduces what needs to be compiled when building the Guix toolchain. It would also make it clear if something started using it.

    Also disable Native Language Support as this is also not needed:

    The --enable-nls option enables Native Language Support (NLS), which lets GCC output diagnostics in languages other than American English. Native Language Support is enabled by default if not doing a canadian cross build.

    See https://gcc.gnu.org/install/configure.html.

  2. DrahtBot added the label Build system on May 11, 2026
  3. DrahtBot commented at 3:19 PM on May 11, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35261.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #25573 (guix: produce a -static-pie bitcoind by fanquake)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. fanquake marked this as ready for review on May 11, 2026
  5. winterrdog commented at 8:14 PM on May 16, 2026: none

    in the PR description:

    saves some compilation

    i'd like to assume you meant 'saves some compilation time' rather than 'saves some compilation' - is that right ?

  6. fanquake force-pushed on May 20, 2026
  7. fanquake commented at 3:52 PM on May 20, 2026: member

    i'd like to assume you meant 'saves some compilation time' rather than 'saves some compilation' - is that right ?

    Maybe both? Skipping LTO means compiling less stuff (albeit not much) in Guix, when building the toolchain, which ultimately saves some time (across 6 toolchains).

  8. winterrdog commented at 6:03 PM on May 20, 2026: none

    Skipping LTO means compiling less stuff (albeit not much) in Guix, when building the toolchain, which ultimately saves some time (across 6 toolchains).

    correct!

    how about updating it to something like: 'This reduces what needs to be compiled and saves some compilation time when building the toolchain'? that way it captures both aspects you mentioned in turn making the description clearer

    (just a suggestion though, no worries either way!)

  9. fanquake force-pushed on May 28, 2026
  10. guix: modernise style in *-base-gcc 66e52d110c
  11. guix: disable-lto in *-base-gcc 579f987e96
  12. guix: disable-nls in *-base-gcc 4623e96872
  13. guix: mirror some arguments from linux-gcc to mingw-w64-gcc ec1e8fc2b2
  14. guix: pass --disable-tm-clone-registry to base GCC
    We don't need support for transactional memory.
    
    > Disable TM clone registry in libgcc. It is enabled in libgcc by default.
    > This option helps to reduce code size for embedded targets which do
    > not use transactional memory.
    
    https://gcc.gnu.org/install/configure.html
    741de57f06
  15. fanquake force-pushed on Jun 2, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-06-05 10:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me