Commit Graph

950 Commits

Author SHA1 Message Date
Luke Dashjr
6d349df39b Merge macos_dmg-27 2024-06-21 19:28:12 +00:00
Luke Dashjr
30d124d5bc Merge 14137 via win_taskbar_progress-27.1+knots 2024-06-21 19:28:12 +00:00
Luke Dashjr
e3ccdb9496 Merge 15421 via tor_subprocess-27+knots 2024-06-21 19:28:12 +00:00
Luke Dashjr
5b18402a07 Merge 13203 via dsha256_power8-27 2024-06-21 19:28:12 +00:00
Luke Dashjr
cdb68165ea Merge ionice_win 2024-06-21 19:28:12 +00:00
Luke Dashjr
9bd35157b4 Merge 9245 via ionice 2024-06-21 19:28:12 +00:00
Luke Dashjr
134e968df9 Merge 22159 via conf_append_cxxflags-23 2024-06-21 19:28:12 +00:00
Luke Dashjr
6819ce0c48 Merge 19873 via mempressure 2024-06-21 19:28:12 +00:00
Luke Dashjr
3dff7a4e62 Merge 28564 via fix_conf_fuzzbin_main 2024-06-21 19:28:12 +00:00
Luke Dashjr
4d1566dadc Merge hww_windows-27 2024-06-21 19:28:12 +00:00
Luke Dashjr
460baed096 Merge boost_171_177_workarounds 2024-06-21 19:28:12 +00:00
Luke Dashjr
040857352f Merge 22417 via bpchild_closefds 2024-06-21 19:28:12 +00:00
Luke Dashjr
8402df120b Merge 18427 via 2020mingwthrd-mini 2024-06-21 19:28:12 +00:00
Luke Dashjr
51bbc98f62 Merge nowarn_unreachable-code 2024-06-21 19:28:12 +00:00
Luke Dashjr
2dc1722f60 Merge 13789 via bugfix_asm_pragmas 2024-06-21 19:28:12 +00:00
Luke Dashjr
5bb4fd232d Merge 5416 via sys_libsecp256k1 2024-06-21 19:28:12 +00:00
Luke Dashjr
97b8727d34 Merge 2241 via sys_leveldb 2024-06-21 19:28:12 +00:00
Luke Dashjr
990080d6c6 Merge 29577 via fix_objcxxflags_pr29577-27 2024-06-21 19:28:12 +00:00
Luke Dashjr
526626ce9d macdeployqtplus: Restore Finder background image 2024-06-19 18:00:07 +00:00
Luke Dashjr
b1df560be6 Revert "build: Enable -Wunreachable-code"
This partially reverts commit fa8adbe7c1.
2024-06-19 17:41:22 +00:00
fanquake
93bb18f1c8
build: bump version to v27.1 final 2024-06-10 13:03:33 +01:00
fanquake
8d3448c59b build: ignore deprecated-declaration warnings in objc++ macOS code
These come from GUI code, and haven't/aren't being fixed, see discussion
in https://github.com/bitcoin-core/gui/issues/112. For now, just ignore
them entirely. Note that this only applies to ObjCXX code, so will not
hide any relevant warnings coming from C or CXX code (and they would be
unlikely in any case).

Alternative to #29362, which disables all compiler warnings, for macOS
builds in the CI.

Relevant output:
```bash
qt/macnotificationhandler.mm:27:9: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        NSUserNotification* userNotification = [[NSUserNotification alloc] init];
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
@interface NSUserNotification : NSObject <NSCopying> {
           ^
qt/macnotificationhandler.mm:27:50: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        NSUserNotification* userNotification = [[NSUserNotification alloc] init];
                                                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
@interface NSUserNotification : NSObject <NSCopying> {
           ^
qt/macnotificationhandler.mm:30:11: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification: userNotification];
          ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
@interface NSUserNotificationCenter : NSObject {
           ^
3 warnings generated.
```

Github-Pull: #29577
Rebased-From: 8b7630cb1f
2024-06-08 01:56:52 +00:00
Luke Dashjr
32f1caee52 build: Restore support for macOS .dmg creation
This partially reverts b5790c35f7, 33ae0bd1e4, and a128111c29.
2024-06-07 18:48:32 +00:00
Luke Dashjr
562869d114 Revert "depends: remove PYTHONPATH from config.site"
This reverts commit 3b19100303.
2024-06-07 18:48:32 +00:00
Luke Dashjr
d45861a01a GUI: If QWinTaskbarButton is missing, just build without it 2024-06-04 18:31:27 +00:00
Luke Dashjr
8abaf66b44 Add QtWinExtras optional dependency
Co-authored-by: Chun Kuan Lee <ken2812221@gmail.com>
2024-06-04 18:31:25 +00:00
fanquake
9e919072bd
build: bump version to 27.1rc1 2024-05-28 12:28:11 +01:00
Luke Dashjr
527b8bd8e0 configure: Split --with-boost-process out of --enable-external-signer option 2024-05-21 20:20:33 +00:00
Luke Dashjr
6b0b754eed Merge branch 'bpchild_closefds' into tor_subprocess-27+knots 2024-05-21 20:20:22 +00:00
Matt Corallo
e3b76d76aa Add POWER8 vector impl for 4-way SHA256
This speeds up 4-way SHA256 by about 3.75x over the C impl.
2024-05-18 23:46:29 +00:00
Luke Dashjr
8f397d99cd utilioprio: Add Windows support as ioprio_set_file_idle 2024-05-17 20:29:11 +00:00
Luke Dashjr
2c0bc6ff49 util/ioprio: Add Mac support using iopolicy functions 2024-05-17 20:24:53 +00:00
Luke Dashjr
92f2b9c511 Drop IO priority to idle while reading blocks for peer requests and startup verification 2024-05-17 20:24:52 +00:00
Luke Dashjr
aed813cc1b Flush dbcache early if system is under memory pressure
No point forcing memory to get pushed out to swap just to cache db changes when we can write the db changes out instead
2024-05-15 23:00:40 +00:00
Luke Dashjr
b228803dcf Bugfix: configure: Correct check for fuzz binary needing a main function 2024-05-15 17:50:53 +00:00
Luke Dashjr
e310e17cad Diff-minimise 2024-05-15 16:47:00 +00:00
Luke Dashjr
7f59fa85fc Revert "build: disable external-signer for Windows"
This reverts commit 308aec3e56.
2024-05-15 16:47:00 +00:00
Luke Dashjr
857532797f configure: Check that libsecp256k1 is new enough and error clearly if not 2024-05-15 00:06:04 +00:00
Luke Dashjr
7c70b396b1 configure: Add unsupported --with-system-libsecp256k1 configure flag 2024-05-15 00:06:03 +00:00
fanquake
2d2a0a369e
build: bump version to v27.0 final 2024-04-15 09:49:19 +01:00
fanquake
7589ce3997
build: bump version to v27.0rc1 2024-03-06 14:50:10 +00:00
fanquake
8da62a1041
Merge bitcoin/bitcoin#29263: serialization: c++20 endian/byteswap/clz modernization
86b7f28d6c serialization: use internal endian conversion functions (Cory Fields)
432b18ca8d serialization: detect byteswap builtins without autoconf tests (Cory Fields)
297367b3bb crypto: replace CountBits with std::bit_width (Cory Fields)
52f9bba889 crypto: replace non-standard CLZ builtins with c++20's bit_width (Cory Fields)

Pull request description:

  This replaces #28674, #29036, and #29057. Now ready for testing and review.

  Replaces platform-specific endian and byteswap functions. This is especially useful for kernel, as it means that our deep serialization code no longer requires bitcoin-config.h.

  I apologize for the size of the last commit, but it's hard to avoid making those changes at once.

  All platforms now use our internal functions rather than libc or platform-specific ones, with the exception of MSVC.

  Sadly, benchmarking showed that not all compilers are capable of detecting and optimizing byteswap functions, so compiler builtins are instead used where possible. However, they're now detected via macros rather than autoconf checks.

  This[ matches how libc++ implements std::byteswap for c++23](https://github.com/llvm/llvm-project/blob/main/libcxx/include/__bit/byteswap.h#L26).

  I suggest we move/rename `compat/endian.h`, but I left that out of this PR to avoid bikeshedding.

  #29057 pointed out some irregularities in benchmarks. After messing with various compilers and configs for a few weeks with these changes, I'm of the opinion that we can't win on every platform every time, so we should take the code that makes sense going forward. That said, if any real-world slowdowns are caused here, we should obviously investigate.

ACKs for top commit:
  maflcko:
    ACK 86b7f28d6c 📘
  fanquake:
    ACK 86b7f28d6c - we can finish pruning out the __builtin_clz* checks/usage once the minisketch code has been updated. This is more good cleanup pre-CMake & for the kernal.

Tree-SHA512: 715a32ec190c70505ffbce70bfe81fc7b6aa33e376b60292e801f60cf17025aabfcab4e8c53ebb2e28ffc5cf4c20b74fe3dd8548371ad772085c13aec8b7970e
2024-03-01 11:19:58 -05:00
Cory Fields
376f0f6d07 build: remove confusing and inconsistent disable-asm option
1. It didn't actually disable asm usage in our code. Regardless of the setting,
   asm is used in random.cpp and support/cleanse.cpp.
2. The value wasn't forwarded to libsecp as a user might have reasonably
   expected.
3. We now have the DISABLE_OPTIMIZED_SHA256 define which is what disable-asm
   actually did in practice.

If there is any desire, we can hook DISABLE_OPTIMIZED_SHA256 up to a new
configure option that actually does what it says.
2024-02-29 19:05:45 +00:00
fanquake
bbfddb3998
Merge bitcoin/bitcoin#29484: serialization: replace char-is-int8_t autoconf detection with c++20 concept
ad7584d8b6 serialization: replace char-is-int8_t autoconf detection with c++20 concept (Cory Fields)

Pull request description:

  Doesn't depend on #29263, but it's really only relevant after that one's merged.

  This removes the only remaining autoconf macro in our serialization code (after #29263), so it can now be used trivially and safely out-of-tree.

  ~Our code does not currently contain any concepts, but couldn't find any discussion or docs about avoiding them. I guess we'll see if this blows up our c-i.~
  Edit: Ignore this. ajtowns pointed out that we're already using a few concepts.

  This was introduced in #13580. Please check my logic on this as I'm unable to test on a SmartOS system. Even better would be a confirmation from someone who can build there.

ACKs for top commit:
  Empact:
    Code review ACK ad7584d8b6

Tree-SHA512: 1faf65c900700efb1cf3092c607a2230321b393cb2f029fbfb94bc8e50df1dabd7a9e4b91e3b34f0d2f3471aaf18ee7e56d91869db5c5f4bae84da95443e1120
2024-02-28 22:04:33 +00:00
Cory Fields
86b7f28d6c serialization: use internal endian conversion functions
These replace our platform-specific mess in favor of c++20 endian detection
via std::endian and internal byteswap functions when necessary.

They no longer rely on autoconf detection.
2024-02-28 13:42:38 +00:00
Cory Fields
432b18ca8d serialization: detect byteswap builtins without autoconf tests
Rather than a complicated set of tests to decide which bswap functions to
use, always prefer the compiler built-ins when available.

These builtins and fallbacks can all be removed once we're using c++23, which
adds std::byteswap.
2024-02-28 13:42:38 +00:00
Cory Fields
ad7584d8b6 serialization: replace char-is-int8_t autoconf detection with c++20 concept
This removes the only remaining autoconf macro in our serialization code,
so it can now be used trivially and safely out-of-tree.
2024-02-27 19:03:26 +00:00
fanquake
b052b2d1f2
build: remove -Wdocumentation conditional
Now that --enable-suppress-external-warnings is on by default, we can
drop it.
2024-02-27 09:53:42 +00:00
fanquake
e3b68b3b83
Merge bitcoin/bitcoin#28875: build: Pass sanitize flags to instrument libsecp256k1 code
cbea49c0d3 build: Pass sanitize flags to instrument `libsecp256k1` code (Hennadii Stepanov)

Pull request description:

  This PR is a revived https://github.com/bitcoin/bitcoin/pull/27991 with an addressed [comment](https://github.com/bitcoin/bitcoin/pull/27991#discussion_r1252148488).

  Fixes https://github.com/bitcoin/bitcoin/issues/27990.

  Might be tested as follows:
  ```
  $ ./autogen.sh && ./configure --enable-fuzz --with-sanitizers=fuzzer CC=clang-13 CXX=clang++-13
  $ make clean > /dev/null && make
  $ objdump --disassemble=secp256k1_xonly_pubkey_serialize src/test/fuzz/fuzz | grep __sanitizer_cov
   1953bd0:e8 bb c6 05 ff       call   9b0290 <__sanitizer_cov_trace_const_cmp8>
   1953d32:e8 69 c4 05 ff       call   9b01a0 <__sanitizer_cov_trace_pc_indir>
   1953d58:e8 43 c4 05 ff       call   9b01a0 <__sanitizer_cov_trace_pc_indir>
   1953d82:e8 19 c4 05 ff       call   9b01a0 <__sanitizer_cov_trace_pc_indir>
  ```

ACKs for top commit:
  fanquake:
    ACK cbea49c0d3
  dergoegge:
    reACK cbea49c0d3

Tree-SHA512: 801994e75b711d20eaf0d675f378da07d693f4a7de026efd93860f5f1deabed855a83eca3561725263e4fe605fcc5f91eb73c021ec91c831864e6deb575e3885
2024-01-26 11:31:34 +00:00
Hennadii Stepanov
cbea49c0d3
build: Pass sanitize flags to instrument libsecp256k1 code
Also a new UBSan suppression has been added.
2024-01-19 10:08:41 +00:00