mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 14:37:42 -03:00
Merge bitcoin/bitcoin#30451: depends: remove Darwin ENV unsetting
bda537f7c4
depends: remove ENV unsetting for darwin (fanquake)1807760f09
guix: improve ENV unsetting for macOS (fanquake)0b2aeee21d
depends: patch explicit -lm usage out of Qt tools (fanquake) Pull request description: Now that we use the native compiler, and have fixed Qt, and these vars are (almost) unset in Guix, we can remove the unsetting from our compiler command here. I couldn't manage to make a darwin-clang-cross only exclusion of `-lm` work properly for Qt, so opted for just removing the explicit link entirely. I do not think this should have any other unwanted side-effects. Fixes #21552. ACKs for top commit: TheCharlatan: ACKbda537f7c4
Tree-SHA512: 97a2d85de7d4b1d65717ecb521399ecba5f53863b8aef21af62ede5ceee59ee1a9392663da3a3852cad1b6d8b420dd4b0b5f0eea38d30a81785d8b2718620b5f
This commit is contained in:
commit
4c62f4b535
4 changed files with 30 additions and 11 deletions
|
@ -71,11 +71,9 @@ unset OBJCPLUS_INCLUDE_PATH
|
||||||
|
|
||||||
export C_INCLUDE_PATH="${NATIVE_GCC}/include"
|
export C_INCLUDE_PATH="${NATIVE_GCC}/include"
|
||||||
export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
|
export CPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
|
||||||
export OBJC_INCLUDE_PATH="${NATIVE_GCC}/include"
|
|
||||||
export OBJCPLUS_INCLUDE_PATH="${NATIVE_GCC}/include/c++:${NATIVE_GCC}/include"
|
|
||||||
|
|
||||||
case "$HOST" in
|
case "$HOST" in
|
||||||
*darwin*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;;
|
*darwin*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;; # Required for qt/qmake
|
||||||
*mingw*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;;
|
*mingw*) export LIBRARY_PATH="${NATIVE_GCC}/lib" ;;
|
||||||
*)
|
*)
|
||||||
NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)"
|
NATIVE_GCC_STATIC="$(store_path gcc-toolchain static)"
|
||||||
|
@ -180,6 +178,14 @@ make -C depends --jobs="$JOBS" HOST="$HOST" \
|
||||||
x86_64_linux_NM=x86_64-linux-gnu-gcc-nm \
|
x86_64_linux_NM=x86_64-linux-gnu-gcc-nm \
|
||||||
x86_64_linux_STRIP=x86_64-linux-gnu-strip
|
x86_64_linux_STRIP=x86_64-linux-gnu-strip
|
||||||
|
|
||||||
|
case "$HOST" in
|
||||||
|
*darwin*)
|
||||||
|
# Unset now that Qt is built
|
||||||
|
unset C_INCLUDE_PATH
|
||||||
|
unset CPLUS_INCLUDE_PATH
|
||||||
|
unset LIBRARY_PATH
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
# Source Tarball Building #
|
# Source Tarball Building #
|
||||||
|
|
|
@ -50,17 +50,11 @@ darwin_STRIP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-strip")
|
||||||
# Disable adhoc codesigning (for now) when using LLVM tooling, to avoid
|
# Disable adhoc codesigning (for now) when using LLVM tooling, to avoid
|
||||||
# non-determinism issues with the Identifier field.
|
# non-determinism issues with the Identifier field.
|
||||||
|
|
||||||
darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
|
darwin_CC=$(clang_prog) --target=$(host) \
|
||||||
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
|
|
||||||
-u LIBRARY_PATH \
|
|
||||||
$(clang_prog) --target=$(host) \
|
|
||||||
-isysroot$(OSX_SDK) -nostdlibinc \
|
-isysroot$(OSX_SDK) -nostdlibinc \
|
||||||
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
|
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
|
||||||
|
|
||||||
darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
|
darwin_CXX=$(clangxx_prog) --target=$(host) \
|
||||||
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
|
|
||||||
-u LIBRARY_PATH \
|
|
||||||
$(clangxx_prog) --target=$(host) \
|
|
||||||
-isysroot$(OSX_SDK) -nostdlibinc \
|
-isysroot$(OSX_SDK) -nostdlibinc \
|
||||||
-iwithsysroot/usr/include/c++/v1 \
|
-iwithsysroot/usr/include/c++/v1 \
|
||||||
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
|
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
|
||||||
|
|
|
@ -23,6 +23,7 @@ $(package)_patches += memory_resource.patch
|
||||||
$(package)_patches += clang_18_libpng.patch
|
$(package)_patches += clang_18_libpng.patch
|
||||||
$(package)_patches += utc_from_string_no_optimize.patch
|
$(package)_patches += utc_from_string_no_optimize.patch
|
||||||
$(package)_patches += windows_lto.patch
|
$(package)_patches += windows_lto.patch
|
||||||
|
$(package)_patches += darwin_no_libm.patch
|
||||||
$(package)_patches += zlib-timebits64.patch
|
$(package)_patches += zlib-timebits64.patch
|
||||||
|
|
||||||
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
|
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
|
||||||
|
@ -236,6 +237,7 @@ define $(package)_preprocess_cmds
|
||||||
patch -p1 -i $($(package)_patch_dir)/utc_from_string_no_optimize.patch && \
|
patch -p1 -i $($(package)_patch_dir)/utc_from_string_no_optimize.patch && \
|
||||||
patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \
|
patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \
|
||||||
patch -p1 -i $($(package)_patch_dir)/windows_lto.patch && \
|
patch -p1 -i $($(package)_patch_dir)/windows_lto.patch && \
|
||||||
|
patch -p1 -i $($(package)_patch_dir)/darwin_no_libm.patch && \
|
||||||
patch -p1 -i $($(package)_patch_dir)/zlib-timebits64.patch && \
|
patch -p1 -i $($(package)_patch_dir)/zlib-timebits64.patch && \
|
||||||
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
|
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
|
||||||
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
|
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
|
||||||
|
|
17
depends/patches/qt/darwin_no_libm.patch
Normal file
17
depends/patches/qt/darwin_no_libm.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
build: remove explicit -lm link from qttools
|
||||||
|
|
||||||
|
This causes issues with at least the macOS cross build, and shouldn't
|
||||||
|
actually be required anywhere else. GCC with libstdc++ will already get libm.
|
||||||
|
|
||||||
|
--- a/qtbase/src/corelib/tools/tools.pri
|
||||||
|
+++ b/qtbase/src/corelib/tools/tools.pri
|
||||||
|
@@ -111,9 +111,6 @@ qtConfig(easingcurve) {
|
||||||
|
tools/qtimeline.cpp
|
||||||
|
}
|
||||||
|
|
||||||
|
-# Note: libm should be present by default becaue this is C++
|
||||||
|
-unix:!macx-icc:!vxworks:!haiku:!integrity:!wasm: LIBS_PRIVATE += -lm
|
||||||
|
-
|
||||||
|
TR_EXCLUDE += ../3rdparty/*
|
||||||
|
|
||||||
|
# MIPS DSP
|
Loading…
Add table
Reference in a new issue