fanquake
commented at 9:33 am on May 22, 2025:
member
The per-host flag variables hold platform-specific defaults that are ignored when flag environment variables are set, so it was wrong for them to contain -std options relied on by package definitions.
Additionally, these flags (-pipe and -std=xx) will no longer be passed into the CMake build, meaning less duplication in the build summary.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
fanquake added the label
DrahtBot Guix build requested
on May 22, 2025
hebasto
commented at 10:28 am on May 22, 2025:
member
Concept ACK.
maflcko
commented at 12:08 pm on May 22, 2025:
member
The per-host flag values now represent the mandatory flags that cannot be overridden by the environment. Additionally, these flags (-pipe and -std=xx) will no longer be passed into the CMake build.
Would be nice to explain this with commands to test and observe the difference in behavior. This would make it easier to understand the goals and test them.
hebasto
commented at 2:21 pm on May 22, 2025:
member
DrahtBot removed the label
DrahtBot Guix build requested
on May 23, 2025
DrahtBot added the label
Build system
on May 23, 2025
fanquake
commented at 1:25 pm on May 30, 2025:
member
Would be nice to explain this with commands to test and observe the difference in behavior. This would make it easier to understand the goals and test them.
Sure. On master (4b1d48a6866b24f0ed027334c6de642fc848d083):
ryanofsky
commented at 4:14 pm on June 2, 2025:
contributor
Code review ACK51f6aa8ac47b7b5412553af2e7152d250a858d0d. This seems like a good change that deduplicates host definitions, and removes nonsensical inclusion of -std in host options rather than package options, since c/c++ standard versions should not vary by host.
IIUC, this change is mostly just a refactoring. For example, it rearranges the libevent flags shown by make print-libevent_cflags from:
It also no longer adds -pipe and -std options to the cmake toolchain file used by the bitcoin build. But those options had effect anyway because they just duplicated cmake’s own flags.
This change does have a practical effect if flag environment variables are set. For example it changes CFLAGS=CUSTOM make print-libevent_cflags output from:
so setting custom flags no longer discards the -pipe -std=c11 options, which seems good for -std and maybe less good for -pipe, but probably fine.
I did find PR & commit description somewhat confusing. The first sentence “The per-host flag values now represent the mandatory flags that cannot be overridden by the environment” seems wrong because settting CFLAGS in the environment does override the host linux_CFLAGS value (this is easy to test with make print-libevent_cflags) due to the logic in:
Which only appends the linux_CFLAGS value to x86_64_linux_CFLAGS on line 35 if the CFLAGS value on line 31 is unset.
So maybe the sentence should say something like “The per-host flag variables hold platform-specific defaults that are ignored when flag environment variables are set, so it was wrong for them to contain -std options relied on by package definitions.”
It could be nice generally to make the PR description less abstract and try to describe the practical effects it has, and what it is intending to do.
DrahtBot requested review from hebasto
on Jun 2, 2025
depends: hard-code necessary c(xx)flags rather than setting them per-host
The per-host flag variables hold platform-specific defaults that are ignored
when flag environment variables are set, so it was wrong for them to contain
-std options relied on by package definitions.
Additionally, these flags (-pipe and -std=xx) will no longer be passed into
the CMake build, meaning less duplication in the build summary.
Pulled out of #31920.
9954d6c833
fanquake force-pushed
on Jul 29, 2025
fanquake
commented at 10:15 am on July 29, 2025:
member
@ryanofsky made some changes to try and address your feedback.
ryanofsky approved
ryanofsky
commented at 11:29 am on July 29, 2025:
contributor
Code review ACK9954d6c833381a44e1ea34d182ffe4d61b65d2ba. No changes since last review other than improving the commit message. Change overall makes sense because it deduplicates host definitions, stops dropping -std flags from package builds when custom CFLAGS/CXXFLAGS environment variables are set, and stops passing duplicate flags to cmake that have no effect.
fanquake
commented at 2:01 pm on July 29, 2025:
member
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: 2025-08-01 09:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me