Merge bitcoin/bitcoin#22814: build: Add ability to build qt in depends with -stdlib=libc++

33796a964a build: Add ability to build qt in depends with -stdlib=libc++ (Hennadii Stepanov)

Pull request description:

  This PR makes possible to build the `qt` package in depends against `libc++` for x86_64 platform.

  Fixes #22344.

  Required for #22815.

  Also this PR [fixes](https://github.com/bitcoin/bitcoin/pull/23060#discussion_r716077050) the `[no wallet] [bionic]` task on CI:
  - on master (a8bbd4cc81), https://api.cirrus-ci.com/v1/task/5558609250615296/logs/ci.log:
  ```
  Options used to compile and link:
    external signer = yes
    multiprocess    = no
    with libs       = yes
    with wallet     = no
    with gui / qt   = no
  ```
  - this PR, https://api.cirrus-ci.com/v1/task/5502605561430016/logs/ci.log:
  ```
  Options used to compile and link:
    external signer = yes
    multiprocess    = no
    with libs       = yes
    with wallet     = no
    with gui / qt   = yes
  ```

ACKs for top commit:
  fanquake:
    ACK 33796a964a - While this sort of string matching is fragile, I think the risk of this causing any actual issues is low.

Tree-SHA512: 586dde2e9864cec7a49aeb4f2b77fb8c4ae96bd10b51f9c6de0cfe8512ad61db15bb7f8d1b0eb6a5a66fd2deee52ac52218f01eb6be107ac12f1a956190de54b
This commit is contained in:
fanquake 2021-12-30 11:32:24 +08:00
commit de28c348a0
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

View File

@ -147,7 +147,11 @@ $(package)_config_opts_linux += -no-feature-vulkan
$(package)_config_opts_linux += -dbus-runtime
$(package)_config_opts_arm_linux += -platform linux-g++ -xplatform bitcoin-linux-g++
$(package)_config_opts_i686_linux = -xplatform linux-g++-32
ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx)))
$(package)_config_opts_x86_64_linux = -xplatform linux-clang-libc++
else
$(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
endif
$(package)_config_opts_aarch64_linux = -xplatform linux-aarch64-gnu-g++
$(package)_config_opts_powerpc64_linux = -platform linux-g++ -xplatform bitcoin-linux-g++
$(package)_config_opts_powerpc64le_linux = -platform linux-g++ -xplatform bitcoin-linux-g++