guix: pass --enable-initfini-array to release GCC #27153

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:guix_gcc_init_fini_array changing 1 files +5 −3
  1. fanquake commented at 10:00 am on February 24, 2023: member

    This returns us to pre-Guix behaviour, where the compilers we were using to build releases, were configured with this option.

    –enable-initfini-array Force the use of sections .init_array and .fini_array (instead of .init and .fini) for constructors and destructors. Option –disable-initfini-array has the opposite effect. If neither option is specified, the configure script will try to guess whether the .init_array and .fini_array sections are supported and, if they are, use them.

  2. fanquake added the label DrahtBot Guix build requested on Feb 24, 2023
  3. DrahtBot commented at 10:00 am on February 24, 2023: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK vincenzopalazzo, TheCharlatan

    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:

    • #25391 (guix: Use LTO to build releases by fanquake)
    • #24123 (build: Pointer Authentication and Branch Target Identification for aarch64 Linux (Guix) 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.

  4. DrahtBot commented at 7:45 pm on February 24, 2023: contributor

    Guix builds

    File commit 6758bd7de75d65d08f9f588378b92a56cc79a49e(master) commit eb0001f97ac243684cc0271e4a2affc7e72614c7(master and this pull)
    guix_build.log c9f3b61129ef5eaa... f43619666b3bf2ab...
    SHA256SUMS.part 59801b7847e25ba3...
    *-aarch64-linux-gnu-debug.tar.gz aaeb87759fb44f65...
    *-aarch64-linux-gnu.tar.gz 6169cb09754d6ee9...
    *-arm-linux-gnueabihf-debug.tar.gz e392179b68ea3496...
    *-arm-linux-gnueabihf.tar.gz e184d97b23797e0d...
    *-arm64-apple-darwin-unsigned.dmg c226df9820efed31...
    *-arm64-apple-darwin-unsigned.tar.gz 6716325e87c75116...
    *-arm64-apple-darwin.tar.gz 3b4deedbe65806be...
    *-powerpc64-linux-gnu-debug.tar.gz 389feeeedf98ea08...
    *-powerpc64-linux-gnu.tar.gz aa0e8a78fbfa37b0...
    *-powerpc64le-linux-gnu-debug.tar.gz 3209908895b5aae1...
    *-powerpc64le-linux-gnu.tar.gz b97762c0c26f9a2b...
    *-riscv64-linux-gnu-debug.tar.gz 5a3f1be6956236e8...
    *-riscv64-linux-gnu.tar.gz 60be79ac200ae300...
    *-win64-debug.zip a99c02cbf0c61d93...
    *-win64-setup-unsigned.exe 4e44c8d08544d243...
    *-win64-unsigned.tar.gz b6e9686c90422ebd...
    *-win64.zip 632055fb437de297...
    *-x86_64-apple-darwin-unsigned.dmg fcffdecba0402dbb...
    *-x86_64-apple-darwin-unsigned.tar.gz 4a9ba9659855ede8...
    *-x86_64-apple-darwin.tar.gz 1dd0143f0a07df32...
    *-x86_64-linux-gnu-debug.tar.gz 0600d5a663a119f5...
    *-x86_64-linux-gnu.tar.gz 1b9edb4a5b2bd3ad...
    *.tar.gz 7ec36a6d5126018b...
    guix_build.log.diff 9e370216c2e9c706...
  5. DrahtBot removed the label DrahtBot Guix build requested on Feb 24, 2023
  6. DrahtBot added the label Build system on Feb 24, 2023
  7. fanquake force-pushed on Feb 28, 2023
  8. fanquake marked this as ready for review on Feb 28, 2023
  9. TheCharlatan commented at 5:35 pm on March 1, 2023: contributor

    I can confirm that this adds relevant .fini_arraysections and gets rid of the .ctors and .dtors sections in the bitcoin x86 _64 linux binaries by comparing the binaries of this PR’s HEAD and its HEAD~1.

    objdump -h bitcoind on fc733e9 (HEAD) :

     0bitcoind:     file format elf64-x86-64
     1Sections:
     2Idx Name          Size      VMA               LMA               File off  Algn
     3  0 .interp       0000001c  0000000000000350  0000000000000350  00000350  2**0
     4                  CONTENTS, ALLOC, LOAD, READONLY, DATA
     5...
     6 22 .init_array   00000598  0000000000e5dfa0  0000000000e5dfa0  00e5cfa0  2**3
     7                  CONTENTS, ALLOC, LOAD, DATA
     8 23 .fini_array   00000008  0000000000e5e538  0000000000e5e538  00e5d538  2**3
     9                  CONTENTS, ALLOC, LOAD, DATA
    10 24 .data.rel.ro  0001c6f8  0000000000e5e540  0000000000e5e540  00e5d540  2**5
    11                  CONTENTS, ALLOC, LOAD, DATA
    12 25 .dynamic      00000250  0000000000e7ac38  0000000000e7ac38  00e79c38  2**3
    13                  CONTENTS, ALLOC, LOAD, DATA
    14 26 .got          00001168  0000000000e7ae88  0000000000e7ae88  00e79e88  2**3
    15                  CONTENTS, ALLOC, LOAD, DATA
    16 27 .data         00003830  0000000000e7c000  0000000000e7c000  00e7b000  2**5
    17                  CONTENTS, ALLOC, LOAD, DATA
    18 28 .bss          000103d8  0000000000e7f840  0000000000e7f840  00e7e830  2**5
    19                  ALLOC
    20 29 .comment      00000012  0000000000000000  0000000000000000  00e7e830  2**0
    21                  CONTENTS, READONLY
    22 30 .note.stapsdt 000004fc  0000000000000000  0000000000000000  00e7e844  2**2
    23                  CONTENTS, READONLY
    24 31 .gnu_debuglink 00000014  0000000000000000  0000000000000000  00e7ed40  2**2
    25                  CONTENTS, READONLY
    

    objdump -h bitcoind on 4398cfb2 (HEAD~1):

     0bitcoind:     file format elf64-x86-64
     1Sections:
     2Idx Name          Size      VMA               LMA               File off  Algn
     3  0 .interp       0000001c  0000000000000350  0000000000000350  00000350  2**0
     4                  CONTENTS, ALLOC, LOAD, READONLY, DATA
     5...
     6 22 .init_array   00000590  0000000000e5dfb0  0000000000e5dfb0  00e5cfb0  2**3
     7                  CONTENTS, ALLOC, LOAD, DATA
     8 23 .ctors        00000010  0000000000e5e540  0000000000e5e540  00e5d540  2**3
     9                  CONTENTS, ALLOC, LOAD, DATA
    10 24 .dtors        00000010  0000000000e5e550  0000000000e5e550  00e5d550  2**3
    11                  CONTENTS, ALLOC, LOAD, DATA
    12 25 .data.rel.ro  0001c6f8  0000000000e5e560  0000000000e5e560  00e5d560  2**5
    13                  CONTENTS, ALLOC, LOAD, DATA
    14 26 .dynamic      00000230  0000000000e7ac58  0000000000e7ac58  00e79c58  2**3
    15                  CONTENTS, ALLOC, LOAD, DATA
    16 27 .got          00001168  0000000000e7ae88  0000000000e7ae88  00e79e88  2**3
    17                  CONTENTS, ALLOC, LOAD, DATA
    18 28 .data         00003830  0000000000e7c000  0000000000e7c000  00e7b000  2**5
    19                  CONTENTS, ALLOC, LOAD, DATA
    20 29 .bss          000103d8  0000000000e7f840  0000000000e7f840  00e7e830  2**5
    21                  ALLOC
    22 30 .comment      00000012  0000000000000000  0000000000000000  00e7e830  2**0
    23                  CONTENTS, READONLY
    24 31 .note.stapsdt 000004fc  0000000000000000  0000000000000000  00e7e844  2**2
    25                  CONTENTS, READONLY
    26 32 .gnu_debuglink 00000014  0000000000000000  0000000000000000  00e7ed40  2**2
    27                  CONTENTS, READONLY
    

    EDIT: I am also seeing around ~0.1kb binary size reduction :P

  10. guix: pass --enable-initfini-array to release GCC
    This returns us to pre-Guix behaviour, where the compilers we were using
    to build releases, were configured with this option.
    127c637cf0
  11. fanquake force-pushed on Mar 1, 2023
  12. TheCharlatan commented at 10:02 pm on March 1, 2023: contributor

    Guix builds 127c637

     0ae145877193079ceb71b86582b86294efba941d8898480e16920f8588bb25fca  guix-build-127c637cf0a8/output/aarch64-linux-gnu/SHA256SUMS.part
     1b50822b488f79eba521dca2538b98ced15da3f175deeccce4030a6690bd4b077  guix-build-127c637cf0a8/output/aarch64-linux-gnu/bitcoin-127c637cf0a8-aarch64-linux-gnu-debug.tar.gz
     2a04d495f8338dc30afdc258df91708c20197f74fe7c84070d8e9ebc9d3924780  guix-build-127c637cf0a8/output/aarch64-linux-gnu/bitcoin-127c637cf0a8-aarch64-linux-gnu.tar.gz
     3827e3e980631e17a813a6bc1a74e9b2c323492e4b71114d788f61df551c388c0  guix-build-127c637cf0a8/output/arm-linux-gnueabihf/SHA256SUMS.part
     40d665407a1c2017f3896edaeabffe4682859bf519ad0b4a7b35c3103879be954  guix-build-127c637cf0a8/output/arm-linux-gnueabihf/bitcoin-127c637cf0a8-arm-linux-gnueabihf-debug.tar.gz
     57454a77358c9c2fd6da16c740cc0470aff757f6bba20f0cc65942cdda9090986  guix-build-127c637cf0a8/output/arm-linux-gnueabihf/bitcoin-127c637cf0a8-arm-linux-gnueabihf.tar.gz
     64f358fa4812897081e4348dd0d2c4fad7d3cc7ee4ca36d038969b429e1b74514  guix-build-127c637cf0a8/output/arm64-apple-darwin/SHA256SUMS.part
     75ae3602d2867678b6d9ab95d8313c07971bdfd5bbe7266710f218ff2c0238789  guix-build-127c637cf0a8/output/arm64-apple-darwin/bitcoin-127c637cf0a8-arm64-apple-darwin-unsigned.dmg
     82f39b61b328e3e52bb514d2a428139ffffa04545d93daf282c10ff590a43a6ed  guix-build-127c637cf0a8/output/arm64-apple-darwin/bitcoin-127c637cf0a8-arm64-apple-darwin-unsigned.tar.gz
     955d54c87a7026190ed50650b741a5936faf762ab069cd9862b364eabf55355a6  guix-build-127c637cf0a8/output/arm64-apple-darwin/bitcoin-127c637cf0a8-arm64-apple-darwin.tar.gz
    100888a44f58955f82a1c9e4b4805f5368f421123983a158c0e41e54a6c2604908  guix-build-127c637cf0a8/output/dist-archive/bitcoin-127c637cf0a8.tar.gz
    11d9047095a70f409c6105960c2bd695e8e4004bd5143c3aabbbb7759501d5223d  guix-build-127c637cf0a8/output/powerpc64-linux-gnu/SHA256SUMS.part
    1258f2f2c84f10a8401d552c0b697d9135e3696e6a45b30b0ee66b4bcda666810e  guix-build-127c637cf0a8/output/powerpc64-linux-gnu/bitcoin-127c637cf0a8-powerpc64-linux-gnu-debug.tar.gz
    133beed3c123cdef21444541ab7232145d3270ff7ecbf6c8f4e4090ac618c5c295  guix-build-127c637cf0a8/output/powerpc64-linux-gnu/bitcoin-127c637cf0a8-powerpc64-linux-gnu.tar.gz
    14c350eaaa84fc7d158cf21f2a90cb4ec9d9ab91395e19e54e6761b723cf46ad28  guix-build-127c637cf0a8/output/powerpc64le-linux-gnu/SHA256SUMS.part
    15ee2139dde970b19f51b607252d4e80f524ff752110c3478d16fdf9b9e0c4adf3  guix-build-127c637cf0a8/output/powerpc64le-linux-gnu/bitcoin-127c637cf0a8-powerpc64le-linux-gnu-debug.tar.gz
    1642fd146f9f595e5aa6c24384e37e47a2ba4ecd75192d44d437e658f92aea18ff  guix-build-127c637cf0a8/output/powerpc64le-linux-gnu/bitcoin-127c637cf0a8-powerpc64le-linux-gnu.tar.gz
    1733d2490ee2ea2835b0f8fa8ce7fb107c1ae76756c05574087fb73e2222166ece  guix-build-127c637cf0a8/output/riscv64-linux-gnu/SHA256SUMS.part
    18ebeea43e60e2897f6adc7cbc9d469ca26da9f5b4935ba6385d88729f6289198c  guix-build-127c637cf0a8/output/riscv64-linux-gnu/bitcoin-127c637cf0a8-riscv64-linux-gnu-debug.tar.gz
    1948e543236f01689084c4c65e1394796d1943dd5c9cdd0c594812227368775b72  guix-build-127c637cf0a8/output/riscv64-linux-gnu/bitcoin-127c637cf0a8-riscv64-linux-gnu.tar.gz
    20011ffddefd89e5449f88d9f3291a49a46e37fc5e9eb42a24ebd8a1004fbfa0f9  guix-build-127c637cf0a8/output/x86_64-apple-darwin/SHA256SUMS.part
    21c7474fe1e546781c9bdca78dd30903d850a98b7195bf76140e0383850f7d96b4  guix-build-127c637cf0a8/output/x86_64-apple-darwin/bitcoin-127c637cf0a8-x86_64-apple-darwin-unsigned.dmg
    22be3ca6d0243b10dd81656f085854121e00bdfff6831f578129692938ff657727  guix-build-127c637cf0a8/output/x86_64-apple-darwin/bitcoin-127c637cf0a8-x86_64-apple-darwin-unsigned.tar.gz
    23d1fc59507cba1bfb3e9b1b3e909fc24bf388259b2d2ed4eeb86d4da159d3447f  guix-build-127c637cf0a8/output/x86_64-apple-darwin/bitcoin-127c637cf0a8-x86_64-apple-darwin.tar.gz
    24891014347c78d114882f081f6cc074a8ce28755c78f6ac55718a36a2a7e7e5d4  guix-build-127c637cf0a8/output/x86_64-linux-gnu/SHA256SUMS.part
    25316534b436f654068ad31d689364010e71d887c80d01e760cafa1ce607da665b  guix-build-127c637cf0a8/output/x86_64-linux-gnu/bitcoin-127c637cf0a8-x86_64-linux-gnu-debug.tar.gz
    26b6d24756ecd1dc98bd6d1f2483ddea8511e35cc5ea028dfbf1acf63fcd8c62fd  guix-build-127c637cf0a8/output/x86_64-linux-gnu/bitcoin-127c637cf0a8-x86_64-linux-gnu.tar.gz
    27e319baafacce5985db98e18666ff17d7633d7d866cbe6add93d674ec7ac5575e  guix-build-127c637cf0a8/output/x86_64-w64-mingw32/SHA256SUMS.part
    289beb8b1492d25e6681d4c73127a0a82d41dbbc96afe5ab1c66d1d095a20d8cbe  guix-build-127c637cf0a8/output/x86_64-w64-mingw32/bitcoin-127c637cf0a8-win64-debug.zip
    29b9b1c9a8f59ee05c360572f0a0a15419ea66058ee9f860f1d9444f5371a65840  guix-build-127c637cf0a8/output/x86_64-w64-mingw32/bitcoin-127c637cf0a8-win64-setup-unsigned.exe
    30e76d9d34ea8ccdb977d65f60ffdcea0dc9e68b650603339afa6d10cc25987986  guix-build-127c637cf0a8/output/x86_64-w64-mingw32/bitcoin-127c637cf0a8-win64-unsigned.tar.gz
    31a17420f664deb1866f856be5181a27ee8442e4c40ebf205cbb74fe530460bc83  guix-build-127c637cf0a8/output/x86_64-w64-mingw32/bitcoin-127c637cf0a8-win64.zip
    
  13. vincenzopalazzo approved
  14. TheCharlatan commented at 9:16 am on March 6, 2023: contributor
    ACK 127c637cf0a80e0ea68a7c5aaa088e5ccc9d3d13
  15. fanquake merged this on Mar 15, 2023
  16. fanquake closed this on Mar 15, 2023

  17. fanquake deleted the branch on Mar 15, 2023
  18. sidhujag referenced this in commit 6b8a4b2e38 on Mar 15, 2023
  19. sidhujag referenced this in commit cc06cce075 on Mar 15, 2023
  20. PastaPastaPasta referenced this in commit 0fe1f732e2 on Jan 14, 2024
  21. PastaPastaPasta referenced this in commit 5835823d93 on Jan 16, 2024
  22. PastaPastaPasta referenced this in commit ec8edc4287 on Jan 19, 2024
  23. PastaPastaPasta referenced this in commit 68ad8b6bee on Jan 24, 2024
  24. PastaPastaPasta referenced this in commit 12afe0c995 on Feb 7, 2024
  25. bitcoin locked this on Mar 14, 2024

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: 2024-12-04 18:12 UTC

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