diff options
author | MacroFake <falke.marco@gmail.com> | 2022-08-19 10:30:30 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-08-19 10:30:36 +0200 |
commit | 02aefa169a9e6ed12c7bd8f3392adcd073d8d56b (patch) | |
tree | f0a0fe4e711b8439bd987a7e42802b795946908e /src/bench/coin_selection.cpp | |
parent | 0425ce577f9245386afd15c70ef01ae3b4d32153 (diff) | |
parent | 4349051dd47416b8daad98f5fb87dea9b8e370d0 (diff) |
Merge bitcoin/bitcoin#25852: build: reorder CXXFLAGS in intrinsic checks
4349051dd47416b8daad98f5fb87dea9b8e370d0 build: reorder cxxflags in intrinsic checks (fanquake)
Pull request description:
Let the user have the final say in regards to using intrinsics.
As outlined in https://github.com/bitcoin/bitcoin/issues/13758, on master:
```bash
./autogen.sh
./configure CXXFLAGS="-mno-avx -mno-avx2"
…
checking whether C++ compiler accepts -mavx -mavx2... yes
checking for AVX2 intrinsics... yes
…
make
…
crypto/sha256_avx2.cpp: In function ‘__m256i sha256d64_avx2::{anonymous}::K(uint32_t)’:
crypto/sha256_avx2.cpp:15:28: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
15 | __m256i inline K(uint32_t x) { return _mm256_set1_epi32(x); }
| ^
crypto/sha256_avx2.cpp: In function ‘__m256i sha256d64_avx2::{anonymous}::Inc(__m256i&, __m256i)’:
crypto/sha256_avx2.cpp:21:16: note: the ABI for passing parameters with 32-byte alignment has changed in GCC 4.6
21 | __m256i inline Inc(__m256i& x, __m256i y) { x = Add(x, y); return x; }
| ^~~
In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:43,
from crypto/sha256_avx2.cpp:8:
/usr/lib/gcc/x86_64-linux-gnu/11/include/avxintrin.h: In function ‘__m256i sha256d64_avx2::{anonymous}::K(uint32_t)’:
/usr/lib/gcc/x86_64-linux-gnu/11/include/avxintrin.h:1326:1: error: inlining failed in call to ‘always_inline’ ‘__m256i _mm256_set1_epi32(int)’: target specific option mismatch
1326 | _mm256_set1_epi32 (int __A)
| ^~~~~~~~~~~~~~~~~
crypto/sha256_avx2.cpp:15:56: note: called from here
15 | __m256i inline K(uint32_t x) { return _mm256_set1_epi32(x); }
| ~~~~~~~~~~~~~~~~~^~~
make[2]: *** [Makefile:13455: crypto/libbitcoin_crypto_avx2_la-sha256_avx2.lo] Error 1
```
with this branch:
```bash
./autogen.sh
./configure CXXFLAGS="-mno-avx -mno-avx2"
…
checking whether C++ compiler accepts -mavx -mavx2... yes
checking for AVX2 intrinsics... no
…
make check
```
Fixes: #13758
Alternative to #13789, which should work for all compilers.
Guix Build (x86_64):
```bash
1fe67be2fe83c79d3b01c1cd657bed09e573226bf283e335d052c65c08a8e085 guix-build-4349051dd474/output/aarch64-linux-gnu/SHA256SUMS.part
92904614f8792595c30c38c8aadfcd64ded658d58146dbae529c7b66e975d72e guix-build-4349051dd474/output/aarch64-linux-gnu/bitcoin-4349051dd474-aarch64-linux-gnu-debug.tar.gz
0e6c1d12caf87d9359d42eea4b652f10e69ab15a18bd572214f22046b2a019f1 guix-build-4349051dd474/output/aarch64-linux-gnu/bitcoin-4349051dd474-aarch64-linux-gnu.tar.gz
e1b7d9b65cf0233c13affd570a0b3247c806553d968188a79f87ce9aab4fee36 guix-build-4349051dd474/output/arm-linux-gnueabihf/SHA256SUMS.part
a7e0e53c2b6a0d0dc47a0740e501b280f82640e43d59e43d24dc236e9e9d3b4e guix-build-4349051dd474/output/arm-linux-gnueabihf/bitcoin-4349051dd474-arm-linux-gnueabihf-debug.tar.gz
1969980159033d1c9f73e199acb9f93ddbbbd1565ac717ac5a29b907b46aec9c guix-build-4349051dd474/output/arm-linux-gnueabihf/bitcoin-4349051dd474-arm-linux-gnueabihf.tar.gz
a1d679c8a861dc7b0422505e172745157680392227724bdbb6efb83ab564dd61 guix-build-4349051dd474/output/arm64-apple-darwin/SHA256SUMS.part
37441242a3b97e51087a1b5df953f0a3ecb57a9523713bae152ac8005427118a guix-build-4349051dd474/output/arm64-apple-darwin/bitcoin-4349051dd474-arm64-apple-darwin-unsigned.dmg
e86757e6f4b92080ed6504c245787d801a8f3ade07e1ed4cb0d1fa7a0088430e guix-build-4349051dd474/output/arm64-apple-darwin/bitcoin-4349051dd474-arm64-apple-darwin-unsigned.tar.gz
ba2405f0b4835a3cb82bba4b281f6ffef97eb402430b47588c7ac986a29c5ae3 guix-build-4349051dd474/output/arm64-apple-darwin/bitcoin-4349051dd474-arm64-apple-darwin.tar.gz
7a4675924f23b9a57c93077d4a00a3d87a3929269301f70709079ee2491d932a guix-build-4349051dd474/output/dist-archive/bitcoin-4349051dd474.tar.gz
4f45b1cd6a819fd1f0fe81ef2c3f3bbb6614c9cbeb2115bfd15ef0f8fb50da25 guix-build-4349051dd474/output/powerpc64-linux-gnu/SHA256SUMS.part
262db5ffba4d952e0b3eb2a4f97a795058d58dbd280c48e7a389809c699c7465 guix-build-4349051dd474/output/powerpc64-linux-gnu/bitcoin-4349051dd474-powerpc64-linux-gnu-debug.tar.gz
0a230d352da964fb8bd101aa690a49604ecbfaf1756c8da9aad88635598b0102 guix-build-4349051dd474/output/powerpc64-linux-gnu/bitcoin-4349051dd474-powerpc64-linux-gnu.tar.gz
f155e0039b78bf772db8047b5d9eb4445e30b210f1bfa1d184e5587a06cdc583 guix-build-4349051dd474/output/powerpc64le-linux-gnu/SHA256SUMS.part
6c32c429f5555cd5bab34a201352a3dae335f4bc23607996e170691c403db68f guix-build-4349051dd474/output/powerpc64le-linux-gnu/bitcoin-4349051dd474-powerpc64le-linux-gnu-debug.tar.gz
0c0d4d37eb75a04a702e1c7116fa89fd5d03439a0c08fdbcbc2d5349e071037e guix-build-4349051dd474/output/powerpc64le-linux-gnu/bitcoin-4349051dd474-powerpc64le-linux-gnu.tar.gz
bcc72b010ef0d53811d5b21e8b65a45ec861b0dc4658286c85b4eea3c5ef3264 guix-build-4349051dd474/output/riscv64-linux-gnu/SHA256SUMS.part
c9740aa9daac4a57361b563525bd273851bc607544cfa196260f715794ebbc4b guix-build-4349051dd474/output/riscv64-linux-gnu/bitcoin-4349051dd474-riscv64-linux-gnu-debug.tar.gz
049b1d9ef133fd5901bdbe1e77c5f11c43da4f3f8fca133c0be1dbfcddb6e900 guix-build-4349051dd474/output/riscv64-linux-gnu/bitcoin-4349051dd474-riscv64-linux-gnu.tar.gz
6d2ff63af68d5c6dd5709b3543e0ed59d2b6cd9c3b4f20fa873edb5a643ad929 guix-build-4349051dd474/output/x86_64-apple-darwin/SHA256SUMS.part
6dc850bed29860fc23b183ddf9bcf17c6e6ad3917a220c13d617a3bcd16b5788 guix-build-4349051dd474/output/x86_64-apple-darwin/bitcoin-4349051dd474-x86_64-apple-darwin-unsigned.dmg
2ff9849c2cf8504e1bbedc5bdc2bb1a11f439df84a6c2cfcbf195025c11289e8 guix-build-4349051dd474/output/x86_64-apple-darwin/bitcoin-4349051dd474-x86_64-apple-darwin-unsigned.tar.gz
4d284659d6df5d3ead86d313fb5794552a83102f5c30fa433f32c87a2be25679 guix-build-4349051dd474/output/x86_64-apple-darwin/bitcoin-4349051dd474-x86_64-apple-darwin.tar.gz
029b5dacfe77e865263fe3f9f0c12d65bf0fcfed152812e50cabd085a4a12b14 guix-build-4349051dd474/output/x86_64-linux-gnu/SHA256SUMS.part
3f8295482e9da6e5a3780a98ef9e58b0924f59f9e2ab76bc70e1dc9c8691a764 guix-build-4349051dd474/output/x86_64-linux-gnu/bitcoin-4349051dd474-x86_64-linux-gnu-debug.tar.gz
9dd5bb321c4bae36cfd8b6b23dd3df9462917c272bd36a7f562131db3a067d35 guix-build-4349051dd474/output/x86_64-linux-gnu/bitcoin-4349051dd474-x86_64-linux-gnu.tar.gz
632ad4f8d7c10f4eb8422e0ccb1ecf35c03260fe1eb91224b0ab3d18765960b7 guix-build-4349051dd474/output/x86_64-w64-mingw32/SHA256SUMS.part
fb6609c3f74b676a67d2334c150094a1be5f5d6a41ae40edcb26b073ce3ad841 guix-build-4349051dd474/output/x86_64-w64-mingw32/bitcoin-4349051dd474-win64-debug.zip
706074270e189a6e9bd32e1b522fc0c5c9f3c076839db9cc983d171bb2f2dd4a guix-build-4349051dd474/output/x86_64-w64-mingw32/bitcoin-4349051dd474-win64-setup-unsigned.exe
78ce8c104eb6496f76633c5ee3988965b8b687583c51d97957cf936e34e8c6ef guix-build-4349051dd474/output/x86_64-w64-mingw32/bitcoin-4349051dd474-win64-unsigned.tar.gz
0db748e76cb4d414f81f8b538e4b0a79ab1281fb16e480fcada9935e2bfc709d guix-build-4349051dd474/output/x86_64-w64-mingw32/bitcoin-4349051dd474-win64.zip
```
Guix Build (arm64):
```bash
e1b7d9b65cf0233c13affd570a0b3247c806553d968188a79f87ce9aab4fee36 guix-build-4349051dd474/output/arm-linux-gnueabihf/SHA256SUMS.part
a7e0e53c2b6a0d0dc47a0740e501b280f82640e43d59e43d24dc236e9e9d3b4e guix-build-4349051dd474/output/arm-linux-gnueabihf/bitcoin-4349051dd474-arm-linux-gnueabihf-debug.tar.gz
1969980159033d1c9f73e199acb9f93ddbbbd1565ac717ac5a29b907b46aec9c guix-build-4349051dd474/output/arm-linux-gnueabihf/bitcoin-4349051dd474-arm-linux-gnueabihf.tar.gz
a1d679c8a861dc7b0422505e172745157680392227724bdbb6efb83ab564dd61 guix-build-4349051dd474/output/arm64-apple-darwin/SHA256SUMS.part
37441242a3b97e51087a1b5df953f0a3ecb57a9523713bae152ac8005427118a guix-build-4349051dd474/output/arm64-apple-darwin/bitcoin-4349051dd474-arm64-apple-darwin-unsigned.dmg
e86757e6f4b92080ed6504c245787d801a8f3ade07e1ed4cb0d1fa7a0088430e guix-build-4349051dd474/output/arm64-apple-darwin/bitcoin-4349051dd474-arm64-apple-darwin-unsigned.tar.gz
ba2405f0b4835a3cb82bba4b281f6ffef97eb402430b47588c7ac986a29c5ae3 guix-build-4349051dd474/output/arm64-apple-darwin/bitcoin-4349051dd474-arm64-apple-darwin.tar.gz
7a4675924f23b9a57c93077d4a00a3d87a3929269301f70709079ee2491d932a guix-build-4349051dd474/output/dist-archive/bitcoin-4349051dd474.tar.gz
4f45b1cd6a819fd1f0fe81ef2c3f3bbb6614c9cbeb2115bfd15ef0f8fb50da25 guix-build-4349051dd474/output/powerpc64-linux-gnu/SHA256SUMS.part
262db5ffba4d952e0b3eb2a4f97a795058d58dbd280c48e7a389809c699c7465 guix-build-4349051dd474/output/powerpc64-linux-gnu/bitcoin-4349051dd474-powerpc64-linux-gnu-debug.tar.gz
0a230d352da964fb8bd101aa690a49604ecbfaf1756c8da9aad88635598b0102 guix-build-4349051dd474/output/powerpc64-linux-gnu/bitcoin-4349051dd474-powerpc64-linux-gnu.tar.gz
f155e0039b78bf772db8047b5d9eb4445e30b210f1bfa1d184e5587a06cdc583 guix-build-4349051dd474/output/powerpc64le-linux-gnu/SHA256SUMS.part
6c32c429f5555cd5bab34a201352a3dae335f4bc23607996e170691c403db68f guix-build-4349051dd474/output/powerpc64le-linux-gnu/bitcoin-4349051dd474-powerpc64le-linux-gnu-debug.tar.gz
0c0d4d37eb75a04a702e1c7116fa89fd5d03439a0c08fdbcbc2d5349e071037e guix-build-4349051dd474/output/powerpc64le-linux-gnu/bitcoin-4349051dd474-powerpc64le-linux-gnu.tar.gz
bcc72b010ef0d53811d5b21e8b65a45ec861b0dc4658286c85b4eea3c5ef3264 guix-build-4349051dd474/output/riscv64-linux-gnu/SHA256SUMS.part
c9740aa9daac4a57361b563525bd273851bc607544cfa196260f715794ebbc4b guix-build-4349051dd474/output/riscv64-linux-gnu/bitcoin-4349051dd474-riscv64-linux-gnu-debug.tar.gz
049b1d9ef133fd5901bdbe1e77c5f11c43da4f3f8fca133c0be1dbfcddb6e900 guix-build-4349051dd474/output/riscv64-linux-gnu/bitcoin-4349051dd474-riscv64-linux-gnu.tar.gz
6d2ff63af68d5c6dd5709b3543e0ed59d2b6cd9c3b4f20fa873edb5a643ad929 guix-build-4349051dd474/output/x86_64-apple-darwin/SHA256SUMS.part
6dc850bed29860fc23b183ddf9bcf17c6e6ad3917a220c13d617a3bcd16b5788 guix-build-4349051dd474/output/x86_64-apple-darwin/bitcoin-4349051dd474-x86_64-apple-darwin-unsigned.dmg
2ff9849c2cf8504e1bbedc5bdc2bb1a11f439df84a6c2cfcbf195025c11289e8 guix-build-4349051dd474/output/x86_64-apple-darwin/bitcoin-4349051dd474-x86_64-apple-darwin-unsigned.tar.gz
4d284659d6df5d3ead86d313fb5794552a83102f5c30fa433f32c87a2be25679 guix-build-4349051dd474/output/x86_64-apple-darwin/bitcoin-4349051dd474-x86_64-apple-darwin.tar.gz
029b5dacfe77e865263fe3f9f0c12d65bf0fcfed152812e50cabd085a4a12b14 guix-build-4349051dd474/output/x86_64-linux-gnu/SHA256SUMS.part
3f8295482e9da6e5a3780a98ef9e58b0924f59f9e2ab76bc70e1dc9c8691a764 guix-build-4349051dd474/output/x86_64-linux-gnu/bitcoin-4349051dd474-x86_64-linux-gnu-debug.tar.gz
9dd5bb321c4bae36cfd8b6b23dd3df9462917c272bd36a7f562131db3a067d35 guix-build-4349051dd474/output/x86_64-linux-gnu/bitcoin-4349051dd474-x86_64-linux-gnu.tar.gz
632ad4f8d7c10f4eb8422e0ccb1ecf35c03260fe1eb91224b0ab3d18765960b7 guix-build-4349051dd474/output/x86_64-w64-mingw32/SHA256SUMS.part
fb6609c3f74b676a67d2334c150094a1be5f5d6a41ae40edcb26b073ce3ad841 guix-build-4349051dd474/output/x86_64-w64-mingw32/bitcoin-4349051dd474-win64-debug.zip
706074270e189a6e9bd32e1b522fc0c5c9f3c076839db9cc983d171bb2f2dd4a guix-build-4349051dd474/output/x86_64-w64-mingw32/bitcoin-4349051dd474-win64-setup-unsigned.exe
78ce8c104eb6496f76633c5ee3988965b8b687583c51d97957cf936e34e8c6ef guix-build-4349051dd474/output/x86_64-w64-mingw32/bitcoin-4349051dd474-win64-unsigned.tar.gz
0db748e76cb4d414f81f8b538e4b0a79ab1281fb16e480fcada9935e2bfc709d guix-build-4349051dd474/output/x86_64-w64-mingw32/bitcoin-4349051dd474-win64.zip
```
Top commit has no ACKs.
Tree-SHA512: 0970b0dd07f6e237f7e2fed770649cc82ef4c22c4d9603a51818c353928833546fc76a3de5054979428d7309c073ce3120dd4bfc621245ff4319e8ac9e321472
Diffstat (limited to 'src/bench/coin_selection.cpp')
0 files changed, 0 insertions, 0 deletions