mirror of
https://github.com/feather-wallet/feather.git
synced 2025-01-03 09:29:37 +00:00
depends: fix some hardcodes
This commit is contained in:
parent
f975748713
commit
579725dd8d
6 changed files with 44 additions and 37 deletions
|
@ -90,24 +90,27 @@ $(foreach TOOL,$(cctools_TOOLS),$(eval darwin_$(TOOL) = $$(build_prefix)/bin/$$(
|
||||||
# include search paths, as that would be wrong in general but would also
|
# include search paths, as that would be wrong in general but would also
|
||||||
# break #include_next's.
|
# break #include_next's.
|
||||||
#
|
#
|
||||||
|
darwin_CC_=--target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
|
||||||
|
-B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
|
||||||
|
-isysroot$(OSX_SDK) \
|
||||||
|
-Xclang -internal-externc-isystem$(clang_resource_dir)/include \
|
||||||
|
-Xclang -internal-externc-isystem$(OSX_SDK)/usr/include
|
||||||
darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
|
darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
|
||||||
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
|
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
|
||||||
-u LIBRARY_PATH \
|
-u LIBRARY_PATH \
|
||||||
$(clang_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
|
$(clang_prog) $(darwin_CC_)
|
||||||
-B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
|
|
||||||
-isysroot$(OSX_SDK) \
|
darwin_CXX_=--target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
|
||||||
-Xclang -internal-externc-isystem$(clang_resource_dir)/include \
|
-B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
|
||||||
-Xclang -internal-externc-isystem$(OSX_SDK)/usr/include
|
-isysroot$(OSX_SDK) \
|
||||||
|
-stdlib=libc++ \
|
||||||
|
-stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1 \
|
||||||
|
-Xclang -internal-externc-isystem$(clang_resource_dir)/include \
|
||||||
|
-Xclang -internal-externc-isystem$(OSX_SDK)/usr/include
|
||||||
darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
|
darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
|
||||||
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
|
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
|
||||||
-u LIBRARY_PATH \
|
-u LIBRARY_PATH \
|
||||||
$(clangxx_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
|
$(clangxx_prog) $(darwin_CXX_)
|
||||||
-B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
|
|
||||||
-isysroot$(OSX_SDK) \
|
|
||||||
-stdlib=libc++ \
|
|
||||||
-stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1 \
|
|
||||||
-Xclang -internal-externc-isystem$(clang_resource_dir)/include \
|
|
||||||
-Xclang -internal-externc-isystem$(OSX_SDK)/usr/include
|
|
||||||
|
|
||||||
darwin_CFLAGS=-pipe
|
darwin_CFLAGS=-pipe
|
||||||
darwin_CXXFLAGS=$(darwin_CFLAGS)
|
darwin_CXXFLAGS=$(darwin_CFLAGS)
|
||||||
|
|
|
@ -155,6 +155,7 @@ $(package)_config_opts_linux += -system-freetype
|
||||||
$(package)_config_opts_linux += -fontconfig
|
$(package)_config_opts_linux += -fontconfig
|
||||||
$(package)_config_opts_linux += -no-opengl
|
$(package)_config_opts_linux += -no-opengl
|
||||||
$(package)_config_opts_linux += -no-feature-vulkan
|
$(package)_config_opts_linux += -no-feature-vulkan
|
||||||
|
$(package)_config_opts_linux += -no-feature-backtrace
|
||||||
$(package)_config_opts_linux += -dbus-runtime
|
$(package)_config_opts_linux += -dbus-runtime
|
||||||
ifneq ($(LTO),)
|
ifneq ($(LTO),)
|
||||||
$(package)_config_opts_linux += -ltcg
|
$(package)_config_opts_linux += -ltcg
|
||||||
|
@ -251,8 +252,14 @@ define $(package)_preprocess_cmds
|
||||||
patch -p1 -i $($(package)_patch_dir)/no_wraprt_on_apple.patch && \
|
patch -p1 -i $($(package)_patch_dir)/no_wraprt_on_apple.patch && \
|
||||||
mv $($(package)_patch_dir)/WindowsToolchain.cmake . && \
|
mv $($(package)_patch_dir)/WindowsToolchain.cmake . && \
|
||||||
mv $($(package)_patch_dir)/MacToolchain.cmake . && \
|
mv $($(package)_patch_dir)/MacToolchain.cmake . && \
|
||||||
|
sed -i -e 's|@cmake_c_flags@|$(darwin_CC_)|' \
|
||||||
|
-e 's|@cmake_cxx_flags@|$(darwin_CXX_)|' \
|
||||||
|
MacToolchain.cmake && \
|
||||||
mv $($(package)_patch_dir)/aarch64Toolchain.cmake . && \
|
mv $($(package)_patch_dir)/aarch64Toolchain.cmake . && \
|
||||||
mv $($(package)_patch_dir)/arm64-apple-toolchain.cmake . && \
|
mv $($(package)_patch_dir)/arm64-apple-toolchain.cmake . && \
|
||||||
|
sed -i -e 's|@cmake_c_flags@|$(darwin_CC_)|' \
|
||||||
|
-e 's|@cmake_cxx_flags@|$(darwin_CXX_)|' \
|
||||||
|
arm64-apple-toolchain.cmake && \
|
||||||
mv $($(package)_patch_dir)/gnueabihfToolchain.cmake . && \
|
mv $($(package)_patch_dir)/gnueabihfToolchain.cmake . && \
|
||||||
mv $($(package)_patch_dir)/riscvToolchain.cmake . && \
|
mv $($(package)_patch_dir)/riscvToolchain.cmake . && \
|
||||||
cd qtbase && \
|
cd qtbase && \
|
||||||
|
@ -275,18 +282,18 @@ define $(package)_config_cmds
|
||||||
endef
|
endef
|
||||||
else ifeq ($(host_os),mingw32)
|
else ifeq ($(host_os),mingw32)
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
cp $(HOME)/.guix-profile/lib/libstrmiids.a \
|
cp $(WMF_LIBS)/lib/libstrmiids.a \
|
||||||
$(HOME)/.guix-profile/lib/libamstrmid.a \
|
$(WMF_LIBS)/lib/libamstrmid.a \
|
||||||
$(HOME)/.guix-profile/lib/libdmoguids.a \
|
$(WMF_LIBS)/lib/libdmoguids.a \
|
||||||
$(HOME)/.guix-profile/lib/libuuid.a \
|
$(WMF_LIBS)/lib/libuuid.a \
|
||||||
$(HOME)/.guix-profile/lib/libmsdmo.a \
|
$(WMF_LIBS)/lib/libmsdmo.a \
|
||||||
$(HOME)/.guix-profile/lib/libole32.a \
|
$(WMF_LIBS)/lib/libole32.a \
|
||||||
$(HOME)/.guix-profile/lib/liboleaut32.a \
|
$(WMF_LIBS)/lib/liboleaut32.a \
|
||||||
$(HOME)/.guix-profile/lib/libmf.a \
|
$(WMF_LIBS)/lib/libmf.a \
|
||||||
$(HOME)/.guix-profile/lib/libmfuuid.a \
|
$(WMF_LIBS)/lib/libmfuuid.a \
|
||||||
$(HOME)/.guix-profile/lib/libmfplat.a \
|
$(WMF_LIBS)/lib/libmfplat.a \
|
||||||
$(HOME)/.guix-profile/lib/libmfcore.a \
|
$(WMF_LIBS)/lib/libmfcore.a \
|
||||||
$(HOME)/.guix-profile/lib/libpropsys.a \
|
$(WMF_LIBS)/lib/libpropsys.a \
|
||||||
/feather/contrib/depends/x86_64-w64-mingw32/lib/ && \
|
/feather/contrib/depends/x86_64-w64-mingw32/lib/ && \
|
||||||
export OPENSSL_LIBS=${$(package)_openssl_flags_$(host_os)} \
|
export OPENSSL_LIBS=${$(package)_openssl_flags_$(host_os)} \
|
||||||
export PKG_CONFIG_SYSROOT_DIR=/ && \
|
export PKG_CONFIG_SYSROOT_DIR=/ && \
|
||||||
|
|
|
@ -9,9 +9,8 @@ set(CMAKE_OSX_SYSROOT ${TARGET_SYSROOT})
|
||||||
set(CMAKE_C_COMPILER clang)
|
set(CMAKE_C_COMPILER clang)
|
||||||
set(CMAKE_CXX_COMPILER clang++)
|
set(CMAKE_CXX_COMPILER clang++)
|
||||||
|
|
||||||
# TODO: don't hardcode this
|
set(CMAKE_C_FLAGS "@cmake_c_flags@")
|
||||||
set(CMAKE_C_FLAGS "--target=x86_64-apple-darwin -mmacosx-version-min=10.14 -B/feather/contrib/depends/x86_64-apple-darwin/native/bin -mlinker-version=609 -isysroot/feather/contrib/depends/x86_64-apple-darwin/native/SDK -Xclang -internal-externc-isystem/gnu/store/rwsysyzpxzwi7g1jv4hxwi3m8i36iwcc-clang-10.0.1/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/feather/contrib/depends/x86_64-apple-darwin/native/SDK/usr/include")
|
set(CMAKE_CXX_FLAGS "@cmake_cxx_flags@")
|
||||||
set(CMAKE_CXX_FLAGS "--target=x86_64-apple-darwin -mmacosx-version-min=10.14 -B/feather/contrib/depends/x86_64-apple-darwin/native/bin -mlinker-version=609 -isysroot/feather/contrib/depends/x86_64-apple-darwin/native/SDK -stdlib=libc++ -stdlib++-isystem/feather/contrib/depends/x86_64-apple-darwin/native/SDK/usr/include/c++/v1 -isystem/feather/contrib/depends/x86_64-apple-darwin/native/SDK/usr/include/c++/v1 -isystem/feather/contrib/depends/x86_64-apple-darwin/native/SDK/usr/include -Xclang -internal-externc-isystem/gnu/store/rwsysyzpxzwi7g1jv4hxwi3m8i36iwcc-clang-10.0.1/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/feather/contrib/depends/x86_64-apple-darwin/native/SDK/usr/include")
|
|
||||||
|
|
||||||
set(CMAKE_INSTALL_NAME_TOOL x86_64-apple-darwin-install_name_tool)
|
set(CMAKE_INSTALL_NAME_TOOL x86_64-apple-darwin-install_name_tool)
|
||||||
set(CMAKE_FIND_ROOT_PATH /feather/contrib/depends/x86_64-apple-darwin/)
|
set(CMAKE_FIND_ROOT_PATH /feather/contrib/depends/x86_64-apple-darwin/)
|
||||||
|
|
|
@ -9,9 +9,8 @@ set(CMAKE_OSX_SYSROOT ${TARGET_SYSROOT})
|
||||||
set(CMAKE_C_COMPILER clang)
|
set(CMAKE_C_COMPILER clang)
|
||||||
set(CMAKE_CXX_COMPILER clang++)
|
set(CMAKE_CXX_COMPILER clang++)
|
||||||
|
|
||||||
# TODO: don't hardcode this
|
set(CMAKE_C_FLAGS "@cmake_c_flags@")
|
||||||
set(CMAKE_C_FLAGS "--target=arm64-apple-darwin -mmacosx-version-min=10.14 -B/feather/contrib/depends/arm64-apple-darwin/native/bin -mlinker-version=609 -isysroot/feather/contrib/depends/arm64-apple-darwin/native/SDK -Xclang -internal-externc-isystem/gnu/store/rwsysyzpxzwi7g1jv4hxwi3m8i36iwcc-clang-10.0.1/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/feather/contrib/depends/arm64-apple-darwin/native/SDK/usr/include")
|
set(CMAKE_CXX_FLAGS "@cmake_cxx_flags@")
|
||||||
set(CMAKE_CXX_FLAGS "--target=arm64-apple-darwin -mmacosx-version-min=10.14 -B/feather/contrib/depends/arm64-apple-darwin/native/bin -mlinker-version=609 -isysroot/feather/contrib/depends/arm64-apple-darwin/native/SDK -stdlib=libc++ -stdlib++-isystem/feather/contrib/depends/arm64-apple-darwin/native/SDK/usr/include/c++/v1 -isystem/feather/contrib/depends/arm64-apple-darwin/native/SDK/usr/include/c++/v1 -isystem/feather/contrib/depends/arm64-apple-darwin/native/SDK/usr/include -Xclang -internal-externc-isystem/gnu/store/rwsysyzpxzwi7g1jv4hxwi3m8i36iwcc-clang-10.0.1/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/feather/contrib/depends/arm64-apple-darwin/native/SDK/usr/include")
|
|
||||||
|
|
||||||
set(CMAKE_INSTALL_NAME_TOOL arm64-apple-darwin-install_name_tool)
|
set(CMAKE_INSTALL_NAME_TOOL arm64-apple-darwin-install_name_tool)
|
||||||
set(CMAKE_FIND_ROOT_PATH /feather/contrib/depends/arm64-apple-darwin/)
|
set(CMAKE_FIND_ROOT_PATH /feather/contrib/depends/arm64-apple-darwin/)
|
||||||
|
|
|
@ -15,15 +15,11 @@ SET(BUILD_TESTS @build_tests@)
|
||||||
SET(TREZOR_DEBUG @build_tests@)
|
SET(TREZOR_DEBUG @build_tests@)
|
||||||
|
|
||||||
# where is the target environment
|
# where is the target environment
|
||||||
SET(CMAKE_FIND_ROOT_PATH @prefix@ /home/user/.guix-profile/@HOST@)
|
SET(CMAKE_FIND_ROOT_PATH @prefix@)
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND ARCHITECTURE STREQUAL "x86_64")
|
|
||||||
SET(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} /home/user/.guix-profile/)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
# MWF libs
|
# WMF libs
|
||||||
SET(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} /gnu/store/3hw9n6yl57lgv01ffi15nk3cj2rjk1km-mingw-w64-x86_64-winpthreads-10.0.0-10.0.0)
|
SET(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} $ENV{WMF_LIBS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
SET(ENV{PKG_CONFIG_PATH} @prefix@/lib/pkgconfig)
|
SET(ENV{PKG_CONFIG_PATH} @prefix@/lib/pkgconfig)
|
||||||
|
|
|
@ -107,6 +107,9 @@ case "$HOST" in
|
||||||
export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include"
|
export CROSS_C_INCLUDE_PATH="${CROSS_GCC_LIB}/include:${CROSS_GCC_LIB}/include-fixed:${CROSS_GLIBC}/include"
|
||||||
export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
|
export CROSS_CPLUS_INCLUDE_PATH="${CROSS_GCC}/include/c++:${CROSS_GCC}/include/c++/${HOST}:${CROSS_GCC}/include/c++/backward:${CROSS_C_INCLUDE_PATH}"
|
||||||
export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib"
|
export CROSS_LIBRARY_PATH="${CROSS_GCC_LIB_STORE}/lib:${CROSS_GCC_LIB}:${CROSS_GLIBC}/lib"
|
||||||
|
|
||||||
|
WMF_LIBS="$(store_path "mingw-w64-x86_64-winpthreads")"
|
||||||
|
export WMF_LIBS
|
||||||
;;
|
;;
|
||||||
*darwin*)
|
*darwin*)
|
||||||
# The CROSS toolchain for darwin uses the SDK and ignores environment variables.
|
# The CROSS toolchain for darwin uses the SDK and ignores environment variables.
|
||||||
|
|
Loading…
Reference in a new issue