mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-04 07:07:45 +01:00
guix: More thoroughly control native toolchain
This commit is contained in:
parent
39741128d3
commit
c1ae726a13
3 changed files with 41 additions and 5 deletions
|
@ -54,16 +54,34 @@ store_path() {
|
||||||
# Set environment variables to point the NATIVE toolchain to the right
|
# Set environment variables to point the NATIVE toolchain to the right
|
||||||
# includes/libs
|
# includes/libs
|
||||||
NATIVE_GCC="$(store_path gcc-toolchain)"
|
NATIVE_GCC="$(store_path gcc-toolchain)"
|
||||||
export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC}/lib64"
|
|
||||||
export CPATH="${NATIVE_GCC}/include"
|
unset LIBRARY_PATH
|
||||||
|
unset CPATH
|
||||||
unset C_INCLUDE_PATH
|
unset C_INCLUDE_PATH
|
||||||
unset CPLUS_INCLUDE_PATH
|
unset CPLUS_INCLUDE_PATH
|
||||||
|
unset OBJC_INCLUDE_PATH
|
||||||
|
unset OBJCPLUS_INCLUDE_PATH
|
||||||
|
|
||||||
|
export LIBRARY_PATH="${NATIVE_GCC}/lib:${NATIVE_GCC}/lib64"
|
||||||
|
export C_INCLUDE_PATH="${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"
|
||||||
|
|
||||||
|
prepend_to_search_env_var() {
|
||||||
|
export "${1}=${2}${!1:+:}${!1}"
|
||||||
|
}
|
||||||
|
|
||||||
case "$HOST" in
|
case "$HOST" in
|
||||||
*darwin*)
|
*darwin*)
|
||||||
# When targeting darwin, zlib is required by native_libdmg-hfsplus.
|
# When targeting darwin, zlib is required by native_libdmg-hfsplus.
|
||||||
zlib_store_path=$(store_path "zlib")
|
zlib_store_path=$(store_path "zlib")
|
||||||
export LIBRARY_PATH="${zlib_store_path}/lib:${LIBRARY_PATH}"
|
|
||||||
export CPATH="${zlib_store_path}/include:${CPATH}"
|
prepend_to_search_env_var LIBRARY_PATH "${zlib_store_path}/lib"
|
||||||
|
prepend_to_search_env_var C_INCLUDE_PATH "${zlib_store_path}/include"
|
||||||
|
prepend_to_search_env_var CPLUS_INCLUDE_PATH "${zlib_store_path}/include"
|
||||||
|
prepend_to_search_env_var OBJC_INCLUDE_PATH "${zlib_store_path}/include"
|
||||||
|
prepend_to_search_env_var OBJCPLUS_INCLUDE_PATH "${zlib_store_path}/include"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Set environment variables to point the CROSS toolchain to the right
|
# Set environment variables to point the CROSS toolchain to the right
|
||||||
|
|
|
@ -10,7 +10,7 @@ $(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no
|
||||||
$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
|
$(package)_patches+= fix_android_qmake_conf.patch fix_android_jni_static.patch dont_hardcode_pwd.patch
|
||||||
$(package)_patches+= drop_lrelease_dependency.patch no_sdk_version_check.patch
|
$(package)_patches+= drop_lrelease_dependency.patch no_sdk_version_check.patch
|
||||||
$(package)_patches+= fix_qpainter_non_determinism.patch fix_lib_paths.patch fix_android_pch.patch
|
$(package)_patches+= fix_qpainter_non_determinism.patch fix_lib_paths.patch fix_android_pch.patch
|
||||||
$(package)_patches+= fix_bigsur_drawing.patch
|
$(package)_patches+= fix_bigsur_drawing.patch qtbase-moc-ignore-gcc-macro.patch
|
||||||
|
|
||||||
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
|
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
|
||||||
$(package)_qttranslations_sha256_hash=e1de58ed108b7e0a138815ea60fd46a2c4e1fc31396a707e5630e92de79c53de
|
$(package)_qttranslations_sha256_hash=e1de58ed108b7e0a138815ea60fd46a2c4e1fc31396a707e5630e92de79c53de
|
||||||
|
@ -232,6 +232,7 @@ define $(package)_preprocess_cmds
|
||||||
patch -p1 -i $($(package)_patch_dir)/no_sdk_version_check.patch && \
|
patch -p1 -i $($(package)_patch_dir)/no_sdk_version_check.patch && \
|
||||||
patch -p1 -i $($(package)_patch_dir)/fix_lib_paths.patch && \
|
patch -p1 -i $($(package)_patch_dir)/fix_lib_paths.patch && \
|
||||||
patch -p1 -i $($(package)_patch_dir)/fix_bigsur_drawing.patch && \
|
patch -p1 -i $($(package)_patch_dir)/fix_bigsur_drawing.patch && \
|
||||||
|
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
|
||||||
sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
|
sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
|
||||||
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/qtbase-moc-ignore-gcc-macro.patch
Normal file
17
depends/patches/qt/qtbase-moc-ignore-gcc-macro.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
The moc executable loops through headers on CPLUS_INCLUDE_PATH and stumbles
|
||||||
|
on the GCC internal _GLIBCXX_VISIBILITY macro. Tell it to ignore it as it is
|
||||||
|
not supposed to be looking there to begin with.
|
||||||
|
|
||||||
|
Upstream report: https://bugreports.qt.io/browse/QTBUG-83160
|
||||||
|
|
||||||
|
diff --git a/qtbase/src/tools/moc/main.cpp b/qtbase/src/tools/moc/main.cpp
|
||||||
|
--- a/qtbase/src/tools/moc/main.cpp
|
||||||
|
+++ b/qtbase/src/tools/moc/main.cpp
|
||||||
|
@@ -188,6 +188,7 @@ int runMoc(int argc, char **argv)
|
||||||
|
dummyVariadicFunctionMacro.arguments += Symbol(0, PP_IDENTIFIER, "__VA_ARGS__");
|
||||||
|
pp.macros["__attribute__"] = dummyVariadicFunctionMacro;
|
||||||
|
pp.macros["__declspec"] = dummyVariadicFunctionMacro;
|
||||||
|
+ pp.macros["_GLIBCXX_VISIBILITY"] = dummyVariadicFunctionMacro;
|
||||||
|
|
||||||
|
QString filename;
|
||||||
|
QString output;
|
Loading…
Add table
Reference in a new issue