Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Nov 11, 2023

This PR is:

Qt relies on the __MAC_OS_X_VERSION_MIN_REQUIRED macro, which is set in the AvailabilityInternal.h SDK header to
the value provided by the Clang driver from the -mmacos-version-min / -mmacosx-version-min option.

Xcode 12 SDK expects the OS-specific __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro:

#ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
        /* compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ */
        #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
    #endif
#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED*/

In the other hand, Xcode 15 SDK expects a general __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ macro:

#ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
    #if defined(__has_builtin) && __has_builtin(__is_target_os)
        #if __is_target_os(macos)
            #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
            #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
        #endif
    #elif  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 
        #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
        #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
    #endif /*  __has_builtin(__is_target_os) && __is_target_os(macos) */
#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */

The latter macro is not provided by LLVM Clang until llvm/llvm-project@c8e2dd8, which is available in Clang 17.

The suggested patch makes Qt "borrow" the __MAC_OS_X_VERSION_MIN_REQUIRED value from MAC_OS_X_VERSION_MIN_REQUIRED, which is set in the AvailabilityMacros.h SDK header.

This change is required to switch to macOS 14 SDK (Xcode 15).
@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 11, 2023

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

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK maflcko
Concept ACK fanquake

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:

  • #21778 (build: LLD based macOS toolchain 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
Copy link
Member

Concept ACK. Looks better than the previous two changes, and it's clearer what's being done. Picked it into #28622.

@DrahtBot
Copy link
Contributor

Guix builds (on x86_64)

File commit 1fdd832
(master)
commit f7a7fe0
(master and this pull)
SHA256SUMS.part b69cad94fd2f2376... 312363aac101eeb6...
*-aarch64-linux-gnu-debug.tar.gz c5e885cbef21fce8... fba651f8cc4fc028...
*-aarch64-linux-gnu.tar.gz 613e5d3aa42cdb29... 1b311ce7dd801eb9...
*-arm-linux-gnueabihf-debug.tar.gz 34610cad8b54aec8... c84b2795f178fd3a...
*-arm-linux-gnueabihf.tar.gz a6c7c0e46fdbdc1b... e2954ea27e33e505...
*-arm64-apple-darwin-unsigned.tar.gz 4ccad0146c0282b1... 49cbfab3fa037333...
*-arm64-apple-darwin-unsigned.zip db5f3b1e5fe492e0... 803dc2a6c389de1d...
*-arm64-apple-darwin.tar.gz f1dfe9e15a325b9d... 30cc6df3f5d111db...
*-powerpc64-linux-gnu-debug.tar.gz db35919914fe7e30... 3e4260c28301ec85...
*-powerpc64-linux-gnu.tar.gz 3a50d515327b186b... e65c10300e9972fb...
*-powerpc64le-linux-gnu-debug.tar.gz dc75cdf3e1608519... 51094ab07741bc32...
*-powerpc64le-linux-gnu.tar.gz 888fb3f7f1b7eb10... 49be9e2e91079c5f...
*-riscv64-linux-gnu-debug.tar.gz 632e5ed4e3955ec9... ecb28e2e89ca8eeb...
*-riscv64-linux-gnu.tar.gz 51c9503f74accd96... 055d8ebbee90a3e2...
*-x86_64-apple-darwin-unsigned.tar.gz 8ec9bf39e88729a0... 20acd55934cb3fe0...
*-x86_64-apple-darwin-unsigned.zip 009e88419326ccb2... 5ee5d2feae1bceb0...
*-x86_64-apple-darwin.tar.gz 1dc19402c381ff77... 08baf4bf5269a031...
*-x86_64-linux-gnu-debug.tar.gz cefdd41b078711cb... 29dd150e6176901d...
*-x86_64-linux-gnu.tar.gz 9e1fd34c041d56ac... ee75bf339ea8e01b...
*.tar.gz 37227c35724bb9b6... b3d040a2ecd19118...
guix_build.log 6d65016e6083872a... b2930d6842956dd1...
guix_build.log.diff 49924b774578612a...

@fanquake
Copy link
Member

Guix build (aarch64):

d832f85daf44833b8bdb8fbf3947e0c6e7a1364cf33991e8f5c32a68e3321c3b  guix-build-05aca093819b/output/arm64-apple-darwin/SHA256SUMS.part
6c163bfdb697ff4821e87645ad62bd1588c862cad07ec4ae901835e2368aba69  guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin-unsigned.tar.gz
bc73c31b3b45588264685ee98449e8cb6eff8885b5cb696d782dbb95f1608ce6  guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin-unsigned.zip
e13de2a319b857a7abbc6dbae3f3e22a3c7d75389f27d4bb48b0170bf760dbc4  guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin.tar.gz
2daf2522477cb6694944ee4174b5dbb18c2399da92b67372b80bb43915698280  guix-build-05aca093819b/output/dist-archive/bitcoin-05aca093819b.tar.gz
7ecd0ded664945a684f5de03658bbcfcf9cc201f0cf49ee30328b7077a7da943  guix-build-05aca093819b/output/x86_64-apple-darwin/SHA256SUMS.part
07991b5012af6e30a331faecf77ca1d4770c3f2f49a31b7c70069e0c23c02d2d  guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin-unsigned.tar.gz
284fbfb741a3002d225ebedbf393ec1c0f2f6fd9d8e9ba8cf4733c67cf2222f9  guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin-unsigned.zip
abcba6d0de6bea343ba916c504b5d9aaaed2ba6113652eb891176eead09cdc1a  guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin.tar.gz

@hebasto
Copy link
Member Author

hebasto commented Nov 11, 2023

My Guix builds:

x86_64
ad9dbeabb7fca2c4efa4057b3aee139c4325b6f5fb77c1ee10fe18940491b446  guix-build-05aca093819b/output/aarch64-linux-gnu/SHA256SUMS.part
afddca8689f4d21a08e448dd59ad4fa5329437f4042dd0d1cfc2d2cdc7d59b5f  guix-build-05aca093819b/output/aarch64-linux-gnu/bitcoin-05aca093819b-aarch64-linux-gnu-debug.tar.gz
9ea86d3294960c4c442f30259d3c1b17a105902b22d20f874cabeb01bd6bf995  guix-build-05aca093819b/output/aarch64-linux-gnu/bitcoin-05aca093819b-aarch64-linux-gnu.tar.gz
ee100a86ec9231ce4516c345b811ccedb090299bc33a1c5da958e5e3be4ea952  guix-build-05aca093819b/output/arm-linux-gnueabihf/SHA256SUMS.part
4a3b34b820962f6165680c3cd82a620a1bb6e0492913b8e2e24ba26ff918a9fc  guix-build-05aca093819b/output/arm-linux-gnueabihf/bitcoin-05aca093819b-arm-linux-gnueabihf-debug.tar.gz
992a566dc85faee25aa6274414d03f65dcb54b66436b0867cc6a896f0043202d  guix-build-05aca093819b/output/arm-linux-gnueabihf/bitcoin-05aca093819b-arm-linux-gnueabihf.tar.gz
d832f85daf44833b8bdb8fbf3947e0c6e7a1364cf33991e8f5c32a68e3321c3b  guix-build-05aca093819b/output/arm64-apple-darwin/SHA256SUMS.part
6c163bfdb697ff4821e87645ad62bd1588c862cad07ec4ae901835e2368aba69  guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin-unsigned.tar.gz
bc73c31b3b45588264685ee98449e8cb6eff8885b5cb696d782dbb95f1608ce6  guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin-unsigned.zip
e13de2a319b857a7abbc6dbae3f3e22a3c7d75389f27d4bb48b0170bf760dbc4  guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin.tar.gz
2daf2522477cb6694944ee4174b5dbb18c2399da92b67372b80bb43915698280  guix-build-05aca093819b/output/dist-archive/bitcoin-05aca093819b.tar.gz
5c8671a5141422eba6c6b5872e0fc727f2e3537fb4b2c29ec03e9d5ed7c84673  guix-build-05aca093819b/output/powerpc64-linux-gnu/SHA256SUMS.part
a581205b0e49058159a1973ee162b668b86e35222d5e6948504c58f664ce16d0  guix-build-05aca093819b/output/powerpc64-linux-gnu/bitcoin-05aca093819b-powerpc64-linux-gnu-debug.tar.gz
0926a4a816ff9ca5224814479c39404078661d5caffdcc6ffc8fa623038cb174  guix-build-05aca093819b/output/powerpc64-linux-gnu/bitcoin-05aca093819b-powerpc64-linux-gnu.tar.gz
ef774df10a7a18ff16b3954cee485d0980f3ec7180beae0faab401a512ed24f3  guix-build-05aca093819b/output/powerpc64le-linux-gnu/SHA256SUMS.part
af290d36f2f5c7dc4e9dec76782f2a3c48e9c20fcc74c2759959713d5dc97be9  guix-build-05aca093819b/output/powerpc64le-linux-gnu/bitcoin-05aca093819b-powerpc64le-linux-gnu-debug.tar.gz
05d61508d97a589d0b567365c6757d9414fb4d8d4d247241d5d53793bfe0136d  guix-build-05aca093819b/output/powerpc64le-linux-gnu/bitcoin-05aca093819b-powerpc64le-linux-gnu.tar.gz
51eb6df4ae5a0cc6a3846fa97ecf5f5ad3b5ac3ff2fdd08b07018f98819837a7  guix-build-05aca093819b/output/riscv64-linux-gnu/SHA256SUMS.part
9a0f1c712c92838e0627697efd7b1ebeb43ae693fe88c0a4ff37e0e0cbf471e1  guix-build-05aca093819b/output/riscv64-linux-gnu/bitcoin-05aca093819b-riscv64-linux-gnu-debug.tar.gz
763e887c3200b2f6751dcc3799847f604576391613b009817794b7ad19971f5f  guix-build-05aca093819b/output/riscv64-linux-gnu/bitcoin-05aca093819b-riscv64-linux-gnu.tar.gz
7ecd0ded664945a684f5de03658bbcfcf9cc201f0cf49ee30328b7077a7da943  guix-build-05aca093819b/output/x86_64-apple-darwin/SHA256SUMS.part
07991b5012af6e30a331faecf77ca1d4770c3f2f49a31b7c70069e0c23c02d2d  guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin-unsigned.tar.gz
284fbfb741a3002d225ebedbf393ec1c0f2f6fd9d8e9ba8cf4733c67cf2222f9  guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin-unsigned.zip
abcba6d0de6bea343ba916c504b5d9aaaed2ba6113652eb891176eead09cdc1a  guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin.tar.gz
8dae3d6a30cbf52dba36b7d912fa5354b541b1a837b8e7283983af09c0f5969d  guix-build-05aca093819b/output/x86_64-linux-gnu/SHA256SUMS.part
4796d8717321ab0c58abab938df6a2434eba5263fbfd07af493bc1c32edf07e3  guix-build-05aca093819b/output/x86_64-linux-gnu/bitcoin-05aca093819b-x86_64-linux-gnu-debug.tar.gz
b4cd5f2b7afb989d6038f7f2f3feec849c069d9262db0c37558e0fc86aaadd40  guix-build-05aca093819b/output/x86_64-linux-gnu/bitcoin-05aca093819b-x86_64-linux-gnu.tar.gz
caafed28357e934810767c052b013d9fd0e0d9ba66a450d81f64964079f1c798  guix-build-05aca093819b/output/x86_64-w64-mingw32/SHA256SUMS.part
47d6a9888f53d8642bd2298ffd31203311f0df366146fbdd43ffb1081388acad  guix-build-05aca093819b/output/x86_64-w64-mingw32/bitcoin-05aca093819b-win64-debug.zip
24ad030dcdfa74a772a182b7f6f6f9712f2788427b8ba7f09788b2035a5fc428  guix-build-05aca093819b/output/x86_64-w64-mingw32/bitcoin-05aca093819b-win64-setup-unsigned.exe
83bb1bebe378df16d8dc6d3c09d18288f0c028f14be184560b2ebfffafa35e8b  guix-build-05aca093819b/output/x86_64-w64-mingw32/bitcoin-05aca093819b-win64-unsigned.tar.gz
e3cd9ac6ccd51d7ec5076b9ad1a3775fafc36c8e744b0efd613c5f92860dc2bb  guix-build-05aca093819b/output/x86_64-w64-mingw32/bitcoin-05aca093819b-win64.zip

@Sjors
Copy link
Member

Sjors commented Nov 13, 2023

Getting the same hashes as @hebasto. Briefly tested that the binary still works on Intel macOS 13.6

@fanquake
Copy link
Member

Now we can actually almost do #21778, and avoid having to do this patching.

@hebasto
Copy link
Member Author

hebasto commented Nov 15, 2023

Could be closed in favour of #28880.

@DrahtBot
Copy link
Contributor

Guix builds (on x86_64)

File commit 7bc8c53
(master)
commit 17314d9
(master and this pull)
SHA256SUMS.part 41271913616f9e9d... a277169dcd82f534...
*-aarch64-linux-gnu-debug.tar.gz 9a462abbea92c408... 6e08812a13fb88f9...
*-aarch64-linux-gnu.tar.gz 408db0ba23377e9a... 380fcdca11eb80b5...
*-arm-linux-gnueabihf-debug.tar.gz 24d5ac17eb43a3fe... 7cee406047ac2cc0...
*-arm-linux-gnueabihf.tar.gz 8efa0df8138de545... 824596f2124530d1...
*-arm64-apple-darwin-unsigned.tar.gz d12354115312adc9... aa0b15c0fd32bf68...
*-arm64-apple-darwin-unsigned.zip 66fda86732a6f7c7... b2dd1883457803a6...
*-arm64-apple-darwin.tar.gz 541a0c4df8c6ab1e... 119169eb8d4697db...
*-powerpc64-linux-gnu-debug.tar.gz 91da457635c06939... 2bc6b4b401afcd40...
*-powerpc64-linux-gnu.tar.gz 6de43a525fd613e7... 61bb7b81ec100af3...
*-powerpc64le-linux-gnu-debug.tar.gz 3f196e043c6f3862... d3398e974bcf7792...
*-powerpc64le-linux-gnu.tar.gz a28c3cdb9bcd51bc... 696b172662924853...
*-riscv64-linux-gnu-debug.tar.gz a5c07b18a9841847... 704a6e338a1a8c21...
*-riscv64-linux-gnu.tar.gz 6d6a7cbe184dc569... 384105bad069fc02...
*-x86_64-apple-darwin-unsigned.tar.gz f5e938e597ca6761... c989b65c4c235e59...
*-x86_64-apple-darwin-unsigned.zip 04a57f310fdfd88d... 287766a936269e38...
*-x86_64-apple-darwin.tar.gz a4c8d9f8a4235bbc... 3399e8f94d1292b3...
*-x86_64-linux-gnu-debug.tar.gz 04323b5a3a67a1b4... ec2abcc65cb87f20...
*-x86_64-linux-gnu.tar.gz ebf0412dba79f62e... ebc8be3e73c40f70...
*.tar.gz f8419b5b77cf3fe3... b44307c2bdddef40...
guix_build.log 28264c1254dec9dd... 0298b1aa535abcc6...
guix_build.log.diff 44c15356771bd4ac...

@maflcko
Copy link
Member

maflcko commented Dec 1, 2023

lgtm ACK 05aca09

@DrahtBot DrahtBot requested a review from fanquake December 1, 2023 10:01
@fanquake
Copy link
Member

fanquake commented Dec 1, 2023

WIll merge this, given #28880 is blocked on non-determinism issues in Qt. I'll rebase #28622 on top for C++20.

@fanquake fanquake merged commit 160d236 into bitcoin:master Dec 1, 2023
@hebasto hebasto deleted the 231110-qt-macos branch December 1, 2023 21:04
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 24, 2024
…properly

05aca09 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov)

Pull request description:

  This PR is:
  - required to [switch](bitcoin#28622) to macOS 14 SDK (Xcode 15).
  - an alternative to bitcoin#28732 and bitcoin#28775.

  Qt relies on the `__MAC_OS_X_VERSION_MIN_REQUIRED` macro, which is set in the `AvailabilityInternal.h` SDK header to
  the value provided by the Clang driver from the `-mmacos-version-min` / `-mmacosx-version-min` option.

  Xcode 12 SDK expects the OS-specific `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          /* compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ */
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
      #endif
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED*/
  ```

  In the other hand, Xcode 15 SDK expects a general `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #if defined(__has_builtin) && __has_builtin(__is_target_os)
          #if __is_target_os(macos)
              #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
              #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
          #endif
      #elif  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
      #endif /*  __has_builtin(__is_target_os) && __is_target_os(macos) */
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
  ```

  The latter macro is not provided by LLVM Clang until llvm/llvm-project@c8e2dd8, which is available in Clang 17.

  The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header.

ACKs for top commit:
  maflcko:
    lgtm ACK 05aca09

Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 24, 2024
…properly

05aca09 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov)

Pull request description:

  This PR is:
  - required to [switch](bitcoin#28622) to macOS 14 SDK (Xcode 15).
  - an alternative to bitcoin#28732 and bitcoin#28775.

  Qt relies on the `__MAC_OS_X_VERSION_MIN_REQUIRED` macro, which is set in the `AvailabilityInternal.h` SDK header to
  the value provided by the Clang driver from the `-mmacos-version-min` / `-mmacosx-version-min` option.

  Xcode 12 SDK expects the OS-specific `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          /* compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ */
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
      #endif
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED*/
  ```

  In the other hand, Xcode 15 SDK expects a general `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #if defined(__has_builtin) && __has_builtin(__is_target_os)
          #if __is_target_os(macos)
              #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
              #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
          #endif
      #elif  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
      #endif /*  __has_builtin(__is_target_os) && __is_target_os(macos) */
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
  ```

  The latter macro is not provided by LLVM Clang until llvm/llvm-project@c8e2dd8, which is available in Clang 17.

  The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header.

ACKs for top commit:
  maflcko:
    lgtm ACK 05aca09

Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 24, 2024
…properly

05aca09 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov)

Pull request description:

  This PR is:
  - required to [switch](bitcoin#28622) to macOS 14 SDK (Xcode 15).
  - an alternative to bitcoin#28732 and bitcoin#28775.

  Qt relies on the `__MAC_OS_X_VERSION_MIN_REQUIRED` macro, which is set in the `AvailabilityInternal.h` SDK header to
  the value provided by the Clang driver from the `-mmacos-version-min` / `-mmacosx-version-min` option.

  Xcode 12 SDK expects the OS-specific `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          /* compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ */
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
      #endif
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED*/
  ```

  In the other hand, Xcode 15 SDK expects a general `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #if defined(__has_builtin) && __has_builtin(__is_target_os)
          #if __is_target_os(macos)
              #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
              #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
          #endif
      #elif  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
      #endif /*  __has_builtin(__is_target_os) && __is_target_os(macos) */
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
  ```

  The latter macro is not provided by LLVM Clang until llvm/llvm-project@c8e2dd8, which is available in Clang 17.

  The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header.

ACKs for top commit:
  maflcko:
    lgtm ACK 05aca09

Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 24, 2024
…properly

05aca09 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov)

Pull request description:

  This PR is:
  - required to [switch](bitcoin#28622) to macOS 14 SDK (Xcode 15).
  - an alternative to bitcoin#28732 and bitcoin#28775.

  Qt relies on the `__MAC_OS_X_VERSION_MIN_REQUIRED` macro, which is set in the `AvailabilityInternal.h` SDK header to
  the value provided by the Clang driver from the `-mmacos-version-min` / `-mmacosx-version-min` option.

  Xcode 12 SDK expects the OS-specific `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          /* compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ */
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
      #endif
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED*/
  ```

  In the other hand, Xcode 15 SDK expects a general `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #if defined(__has_builtin) && __has_builtin(__is_target_os)
          #if __is_target_os(macos)
              #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
              #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
          #endif
      #elif  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
      #endif /*  __has_builtin(__is_target_os) && __is_target_os(macos) */
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
  ```

  The latter macro is not provided by LLVM Clang until llvm/llvm-project@c8e2dd8, which is available in Clang 17.

  The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header.

ACKs for top commit:
  maflcko:
    lgtm ACK 05aca09

Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Oct 24, 2024
…properly

05aca09 build: Patch Qt to handle minimum macOS version properly (Hennadii Stepanov)

Pull request description:

  This PR is:
  - required to [switch](bitcoin#28622) to macOS 14 SDK (Xcode 15).
  - an alternative to bitcoin#28732 and bitcoin#28775.

  Qt relies on the `__MAC_OS_X_VERSION_MIN_REQUIRED` macro, which is set in the `AvailabilityInternal.h` SDK header to
  the value provided by the Clang driver from the `-mmacos-version-min` / `-mmacosx-version-min` option.

  Xcode 12 SDK expects the OS-specific `__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          /* compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ */
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
      #endif
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED*/
  ```

  In the other hand, Xcode 15 SDK expects a general `__ENVIRONMENT_OS_VERSION_MIN_REQUIRED__` macro:
  ```c++
  #ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
      #if defined(__has_builtin) && __has_builtin(__is_target_os)
          #if __is_target_os(macos)
              #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
              #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
          #endif
      #elif  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
          #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
      #endif /*  __has_builtin(__is_target_os) && __is_target_os(macos) */
  #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
  ```

  The latter macro is not provided by LLVM Clang until llvm/llvm-project@c8e2dd8, which is available in Clang 17.

  The suggested patch makes Qt "borrow" the `__MAC_OS_X_VERSION_MIN_REQUIRED` value from `MAC_OS_X_VERSION_MIN_REQUIRED`, which is set in the `AvailabilityMacros.h` SDK header.

ACKs for top commit:
  maflcko:
    lgtm ACK 05aca09

Tree-SHA512: 8891aefde4b8a48885abf0648f4ec71a22f7fcfca1e17ebb8c70ce1ef44751ea5db6b8b652de6ee8a716ca5f96f720fef01600bc23986162d0146c946e2e8743
PastaPastaPasta added a commit to dashpay/dash that referenced this pull request Oct 24, 2024
c75a0d4 Merge bitcoin#29177: build: Fix check whether `-latomic` needed (fanquake)
f670118 Merge bitcoin#28851: build: Patch Qt to handle minimum macOS version properly (fanquake)
685ee8a Merge bitcoin#28884: doc: remove x86_64 build assumption from depends doc (fanquake)
47f6126 Merge bitcoin#28881: doc: remove mention of missing bdb being a configure error (fanquake)
a9021db Merge bitcoin#28777: doc: update docs for `CHECK_ATOMIC` macro (fanquake)
d5e15df Merge bitcoin#26839: Add support for RNDR/RNDRRS for AArch64 on Linux (Andrew Chow)
5aedcbf Merge bitcoin#28778: depends: drop -O1 workaround from arm64 apple Qt build (fanquake)
95a8d8c Merge bitcoin#21161: Fee estimation: extend bucket ranges consistently (glozow)
f4ea48e Merge bitcoin#28693: build: Include `config/bitcoin-config.h` explicitly in `util/trace.h` (fanquake)
f160e0d Merge bitcoin#28691: refactor: Remove CBlockFileInfo::SetNull (fanquake)
0278163 Merge bitcoin#28697: fuzz: Increase merge -rss_limit_mb (fanquake)
90a1fb0 Merge bitcoin#28650: fuzz: Merge with -set_cover_merge=1 (fanquake)
f007abd Merge bitcoin#28459: build: add `-mbranch-protection=bti` (aarch64) to hardening flags (fanquake)
af8d124 Merge bitcoin#28624: docs: fix typo (fanquake)
c740264 Merge bitcoin#28532: qt: enable` -ltcg` for windows under LTO (fanquake)
ccd3920 Merge bitcoin#28556: doc: fix link to developer-notes.md file in multiprocess.md (fanquake)

Pull request description:

  ## Issue being fixed or feature implemented
  Batch of trivial backports

  ## What was done?
  See commits

  ## How Has This Been Tested?
  built locally; large combined merge passed tests locally

  ## Breaking Changes
  Should be none

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK c75a0d4

Tree-SHA512: 035dc3fa9812c7f381946ae4798b8e729a58b38a090d94502a8d992e9cfaab3307173c602d7b782c637a79c5c41b62570dc73bb4bb367e4505a039964926181b
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Nov 27, 2024
Summary:
```
This change is required to switch to macOS 14 SDK (Xcode 15).
```

Backport of [[bitcoin/bitcoin#28851 | core#28851]].

Depends on D17205.

Test Plan: Run the GUIX builds.

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D17206
@bitcoin bitcoin locked and limited conversation to collaborators Nov 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants