diff options
author | merge-script <fanquake@gmail.com> | 2024-04-17 12:22:11 +0100 |
---|---|---|
committer | merge-script <fanquake@gmail.com> | 2024-04-17 12:22:11 +0100 |
commit | 3b70ce231e8d45b25a02f12ceb604498306aadf5 (patch) | |
tree | c3a0f41eddb2d70dbccc7b90b860501f4ce0a23e /contrib/guix/manifest.scm | |
parent | 8cd9475321737a69454f3b54a588b7bfe9f32847 (diff) | |
parent | a0dc2ebcda9e33aa5320221cd4ea371f84d221fd (diff) |
Merge bitcoin/bitcoin#29846: guix: replace GCC unaligned VMOV patch with binutils patch
a0dc2ebcda9e33aa5320221cd4ea371f84d221fd guix: replace GCC unaligned VMOV patch with binutils patch (fanquake)
Pull request description:
Rather than invasively patching GCC, given we have binutils 2.38 available, we can patch it to flip the default for
`-muse-unaligned-vector-move`.
A 1 line binutils patch, is much more maintainable than the ~300 line patch into GCC. It's also a slight inprovement in regards to patching out ualigned instructions in the release binaries. For comparison:
Master:
```bash
objdump -D bin/*.exe | rg "vmova|vmovdqa|vmovaps|vmovapd|vmovdqa64|vmovdqa32"
141b8be20: c5 f8 28 1a vmovaps(%rdx), %xmm3
1420564b3: c5 79 29 36 vmovapd%xmm14, (%rsi)
1403060f3: c5 79 29 36 vmovapd%xmm14, (%rsi)
140792b13: c5 79 29 36 vmovapd%xmm14, (%rsi)
140cb0693: c5 79 29 36 vmovapd%xmm14, (%rsi)
1415ea0f3: c5 79 29 36 vmovapd%xmm14, (%rsi)
```
This PR:
```bash
objdump -D bin/*.exe | rg "vmova|vmovdqa|vmovaps|vmovapd|vmovdqa64|vmovdqa32"
141b8be20: c5 f8 28 1a vmovaps(%rdx), %xmm3
1420564b3: c5 79 29 36 vmovapd%xmm14, (%rsi)
1403060f3: c5 79 29 36 vmovapd%xmm14, (%rsi)
140792b13: c5 79 29 36 vmovapd%xmm14, (%rsi)
140cb0693: c5 79 29 36 vmovapd%xmm14, (%rsi)
```
ACKs for top commit:
laanwj:
Code review ACK a0dc2ebcda9e33aa5320221cd4ea371f84d221fd
Tree-SHA512: b3b6dcd2efaaa825d32c768302651d26a120a3e47b93fafb862a1884ff68fd96edb42ea9bc9974c005c8f5a1d15c217deec0ed462cc4a3365cab1bad5a0b5fef
Diffstat (limited to 'contrib/guix/manifest.scm')
-rw-r--r-- | contrib/guix/manifest.scm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 41a87eec57..8f13c642d3 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -110,12 +110,15 @@ desirable for building Bitcoin Core release binaries." (define (gcc-mingw-patches gcc) (package-with-extra-patches gcc - (search-our-patches "gcc-remap-guix-store.patch" - "vmov-alignment.patch"))) + (search-our-patches "gcc-remap-guix-store.patch"))) + +(define (binutils-mingw-patches binutils) + (package-with-extra-patches binutils + (search-our-patches "binutils-unaligned-default.patch"))) (define (make-mingw-pthreads-cross-toolchain target) "Create a cross-compilation toolchain package for TARGET" - (let* ((xbinutils (cross-binutils target)) + (let* ((xbinutils (binutils-mingw-patches (cross-binutils target))) (pthreads-xlibc mingw-w64-x86_64-winpthreads) (pthreads-xgcc (cross-gcc target #:xgcc (gcc-mingw-patches mingw-w64-base-gcc) |