-static-libgcc
.
guix: build for Linux HOSTS with -static-libgcc
#33181
pull
fanquake
wants to merge
2
commits into
bitcoin:master
from
fanquake:static_libgcc
changing
2
files
+8 −10
-
fanquake commented at 10:13 am on August 13, 2025: memberBuild release binaries with
-
DrahtBot added the label Build system on Aug 13, 2025
-
DrahtBot commented at 10:13 am on August 13, 2025: contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33181.
Reviews
See the guideline for information on the review process.
Type Reviewers Concept ACK theuni If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #33537 ([wip] A more static bitcoin-qt by fanquake)
- #25573 ([POC] guix: produce a fully
-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.
-
fanquake added the label DrahtBot Guix build requested on Aug 17, 2025
-
DrahtBot removed the label DrahtBot Guix build requested on Aug 19, 2025
-
theuni commented at 3:35 pm on August 19, 2025: member
Concept ACK.
But note that this may require some care when we start shipping the kernel, as it likely needs to be built against a shared libgcc (and maybe libstdc++, depending on what our api/abi looks like at that point).
Maybe add a note so we don’t forget?
-
fanquake commented at 6:43 pm on August 19, 2025: member
Maybe add a note so we don’t forget?
Any preference to where we add that?
-
fanquake force-pushed on Aug 21, 2025
-
bitcoin deleted a comment on Aug 22, 2025
-
fanquake force-pushed on Sep 9, 2025
-
theuni commented at 4:27 pm on September 9, 2025: member
Switching to
CMAKE_EXE_LINKER_FLAGS
came out of an offline discussion with fanquake. @fanquake we want all flags passed to all binaries with the exception of-static-libstdc++ -static-libgcc
, which should only go to exe’s.So I think we want:
HOST_LDFLAGS="-Wl,--as-needed -Wl,--dynamic-linker=$glibc_dynamic_linker -Wl,-O2"
CMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -static-libgcc"
Then for CMake, still pass
LDFLAGS
viaHOST_LDFLAGS
in addition toCMAKE_EXE_LINKER_FLAGS
. That way exe’s will (should?) end up with both. -
fanquake commented at 4:35 pm on September 9, 2025: memberYea, I need to rework this in any case, as the macOS build breaks with the changes here.
-
fanquake force-pushed on Sep 9, 2025
-
fanquake force-pushed on Sep 10, 2025
-
fanquake force-pushed on Sep 10, 2025
-
fanquake commented at 11:42 am on September 10, 2025: memberAdded dropping libatomic from
symbol-check.py
. -
fanquake commented at 12:51 pm on September 10, 2025: member
Guix Build:
0f5dd809bc855dcefed04e4f5d55385c9a4381a4939458db9c7c0e17fd2ad486a guix-build-0520713033eb/output/aarch64-linux-gnu/SHA256SUMS.part 19384da5429754f03755c5f0dda61c51ec13dc0402007691064da7d8baa8b215f guix-build-0520713033eb/output/aarch64-linux-gnu/bitcoin-0520713033eb-aarch64-linux-gnu-debug.tar.gz 2febdaab451c56edb669df98d04d4244766880c21f097b98c90f919129797294a guix-build-0520713033eb/output/aarch64-linux-gnu/bitcoin-0520713033eb-aarch64-linux-gnu.tar.gz 3dc30a64d619ea7b98060da13e104ebbdd766ed24a75dea9947d9eb4376485241 guix-build-0520713033eb/output/arm-linux-gnueabihf/SHA256SUMS.part 466ee27984047764c959a0377f5747e7b74acc112ff66de1211b48a3d21ef7785 guix-build-0520713033eb/output/arm-linux-gnueabihf/bitcoin-0520713033eb-arm-linux-gnueabihf-debug.tar.gz 547f354f01d803e59f4213108148dfe33d38216d8f9ac2988da78079a2fe38dd3 guix-build-0520713033eb/output/arm-linux-gnueabihf/bitcoin-0520713033eb-arm-linux-gnueabihf.tar.gz 64e881f4536abea590305fbd6fb780927d3fc3aa36754a1702ba14b951743a4b9 guix-build-0520713033eb/output/arm64-apple-darwin/SHA256SUMS.part 776203af4dffa7180351d588e61519354b5ea0310499f8d72a07e7e4a543392ef guix-build-0520713033eb/output/arm64-apple-darwin/bitcoin-0520713033eb-arm64-apple-darwin-codesigning.tar.gz 8599004c79c1b7e76862bc0eda428df2768e5211d1bd5a6843784d265dfe081c8 guix-build-0520713033eb/output/arm64-apple-darwin/bitcoin-0520713033eb-arm64-apple-darwin-unsigned.tar.gz 973bbdfa5b24861b445f25593616fd372dfef329673af9bf0119a7df41e869701 guix-build-0520713033eb/output/arm64-apple-darwin/bitcoin-0520713033eb-arm64-apple-darwin-unsigned.zip 10104a2882392e6c2ef90f3e20d5dd137d8f954df690ca9db0f3068ffe6b0b312f guix-build-0520713033eb/output/dist-archive/bitcoin-0520713033eb.tar.gz 11a7fd91b34269e4af76862c9b52e60699b876daab9e88370a9310591bf3f897c6 guix-build-0520713033eb/output/powerpc64-linux-gnu/SHA256SUMS.part 120b7c81756a3af585c036d66cf97f4d88030b7f4436533c54a17dfd4b7d6f90c6 guix-build-0520713033eb/output/powerpc64-linux-gnu/bitcoin-0520713033eb-powerpc64-linux-gnu-debug.tar.gz 132fceed7dc27e3b18e51978964c6c1f23799a7e67fdd2be02316ca3d3c2968d36 guix-build-0520713033eb/output/powerpc64-linux-gnu/bitcoin-0520713033eb-powerpc64-linux-gnu.tar.gz 142f7b94d93b339db9f9d7d16bc9e15da0851105386b10e75ed9090a1de4eeedc3 guix-build-0520713033eb/output/riscv64-linux-gnu/SHA256SUMS.part 15416eaf44b052e788a2bd99958bf8297ede6cb65c0784a19d23d4ba565e88797d guix-build-0520713033eb/output/riscv64-linux-gnu/bitcoin-0520713033eb-riscv64-linux-gnu-debug.tar.gz 1663768abf2707e84a1ab5cef73c7795883d96250744c9ea69d21f56fb57dd6221 guix-build-0520713033eb/output/riscv64-linux-gnu/bitcoin-0520713033eb-riscv64-linux-gnu.tar.gz 1762785d3c34291e1b6dab40fef484b7d2a3b24f6176445c78cc462aa208ba07b7 guix-build-0520713033eb/output/x86_64-apple-darwin/SHA256SUMS.part 181a1ae23c144e756a49baca0a126e612ff264d99d1f0fd885680ab1257efdec3c guix-build-0520713033eb/output/x86_64-apple-darwin/bitcoin-0520713033eb-x86_64-apple-darwin-codesigning.tar.gz 19ea7cecfb4bea05d677dd2bb2e625c34a01840375b9c40b07bcc5cefd5216a589 guix-build-0520713033eb/output/x86_64-apple-darwin/bitcoin-0520713033eb-x86_64-apple-darwin-unsigned.tar.gz 2093847aff38946bee3cf626e629c3de59b47ce36ee7e86246165bdfd5f65393bf guix-build-0520713033eb/output/x86_64-apple-darwin/bitcoin-0520713033eb-x86_64-apple-darwin-unsigned.zip 216aec43816f1b99e37403583ef102d262b1d00af6d24061f8f730254330eed5a6 guix-build-0520713033eb/output/x86_64-linux-gnu/SHA256SUMS.part 2215b046d2ec07e28e7c566e1a514e493138dfb5e0d8d7a8091a94f6104a816f82 guix-build-0520713033eb/output/x86_64-linux-gnu/bitcoin-0520713033eb-x86_64-linux-gnu-debug.tar.gz 2341ef4f1c7d19be8ae0eab43951fb0d9f1d9f3ae98e6936521e980274c5116878 guix-build-0520713033eb/output/x86_64-linux-gnu/bitcoin-0520713033eb-x86_64-linux-gnu.tar.gz 24c9b88e7b03a243989fe6d80f2947a96820057eccc3d99a4327e93bd87a64118b guix-build-0520713033eb/output/x86_64-w64-mingw32/SHA256SUMS.part 259904e76a1153fbf153beb46efa6431c99a1df1f2cc9c5cc5c6aa5794b07a55c1 guix-build-0520713033eb/output/x86_64-w64-mingw32/bitcoin-0520713033eb-win64-codesigning.tar.gz 26892bbedaea772b8be8481f6c014258730bd347a6cb786e63e8dee56fdcc27322 guix-build-0520713033eb/output/x86_64-w64-mingw32/bitcoin-0520713033eb-win64-debug.zip 27924bff3211a9ac471b8c73a3cbe515f7d16157759e775cd7e9f4bf7859ed2aa1 guix-build-0520713033eb/output/x86_64-w64-mingw32/bitcoin-0520713033eb-win64-setup-unsigned.exe 28e77c097be3694a7e873ffa861c05807f2d45c425af72745356fbdd37dcbadf53 guix-build-0520713033eb/output/x86_64-w64-mingw32/bitcoin-0520713033eb-win64-unsigned.zip
-
in contrib/guix/libexec/build.sh:234 in 0520713033 outdated
230 *mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;; 231 esac 232 233+# EXE FLAGS 234+case "$HOST" in 235+ *linux*) CMAKE_EXE_LINKER_FLAGS="-DCMAKE_EXE_LINKER_FLAGS=${HOST_LDFLAGS} -static-libstdc++ -static-libgcc" ;;
theuni commented at 7:11 pm on September 11, 2025:Hmm, is it necessary forCMAKE_EXE_LINKER_FLAGS
to also containHOST_LDFLAGS
? I would have expected CMake to use both for exe’s.
fanquake commented at 7:14 pm on September 11, 2025:I couldn’t find a way to pass these through, without it, without the build breaking in one way or another.fanquake force-pushed on Sep 19, 2025fanquake force-pushed on Sep 23, 2025maflcko added the label DrahtBot Guix build requested on Sep 24, 2025DrahtBot commented at 12:29 pm on September 27, 2025: contributorGuix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]
File commit 65e909dfdd934f033727e5404b5616a29dc18209(master) commit 7286a6d5e78d6f282f9fb011cf2913765eedd0c6(pull/33181/merge) *-aarch64-linux-gnu-debug.tar.gz 4fd6d7c7327626cc...
50059f609bc69406...
*-aarch64-linux-gnu.tar.gz 46ea646ded58ef36...
9ee2706d357c61ff...
*-arm-linux-gnueabihf-debug.tar.gz 97ca89f79e9b19be...
00f5493329ca9f6c...
*-arm-linux-gnueabihf.tar.gz e204e5d6a0a31303...
10d257954f4bec35...
*-arm64-apple-darwin-codesigning.tar.gz 8c22accaede649d1...
9d24547928fb7d33...
*-arm64-apple-darwin-unsigned.tar.gz 5b171a56369a9fc0...
18732e6483fc1bbc...
*-arm64-apple-darwin-unsigned.zip 9490dca6ae877e4e...
016b0bad910ad6de...
*-powerpc64-linux-gnu-debug.tar.gz 5447ef031926d960...
9b430bd240a02184...
*-powerpc64-linux-gnu.tar.gz d840954699b24b31...
0e300a74d7883de0...
*-riscv64-linux-gnu-debug.tar.gz 808324926ee7485d...
2a02f6d43829824d...
*-riscv64-linux-gnu.tar.gz 5245c0caa8d7899f...
ca318c4f49c6c98b...
*-x86_64-apple-darwin-codesigning.tar.gz f4db8b600e039a4b...
13cbc8c77a04f2ed...
*-x86_64-apple-darwin-unsigned.tar.gz 6d0bf91434423790...
e9731b198b60fac7...
*-x86_64-apple-darwin-unsigned.zip a3efe4e229a9f1a4...
8100624293a1e059...
*-x86_64-linux-gnu-debug.tar.gz 46cbfe9d21594221...
8d815a65d47f92be...
*-x86_64-linux-gnu.tar.gz 265c74a0faacd082...
b43caf04ab54719c...
*.tar.gz 3e0d96cf40b2aed8...
bc02f5d1ba69ae46...
SHA256SUMS.part 26706fcb1d45f2e6...
205764749024742a...
guix_build.log e8e08bef6311517f...
379bc66d0e3c97eb...
guix_build.log.diff 661c4ef2f29bfbb8...
DrahtBot removed the label DrahtBot Guix build requested on Sep 27, 2025guix: move static-libc++ into CMAKE_EXE_LINKER_FLAGS flags
Make it clearer that we are only applying this to executables.
guix: build for Linux HOSTS with -static-libgcc 633548dc40fanquake force-pushed on Oct 3, 2025Labels
Build system
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-10-10 15:13 UTC
More mirrored repositories can be found on mirror.b10c.me