export LD_LIBRARY_PATH=/feather/contrib/depends/x86_64-linux-gnu/lib/:/gnu/store:/gnu/store/yk91cxchassi5ykxsyd4vci32vncgjkf-gcc-cross-x86_64-linux-gnu-10.3.0-lib/x86_64-linux-gnu/lib
-# fuck you linuxdeployqt
+# linuxdeployqt glibc moaning bypass
mkdir -p "$APPDIR/usr/share/doc/libc6"
touch "$APPDIR/usr/share/doc/libc6/copyright"
-linuxdeployqt feather.AppDir/usr/share/applications/feather.desktop -verbose=2 -bundle-non-qt-libs -unsupported-allow-new-glibc
+# TODO: linuxdeployqt can't build ARM appimages on x86_64, skip this step for ARM builds
+case "$HOST" in
+ x86_64*)
+ linuxdeployqt feather.AppDir/usr/share/applications/feather.desktop -verbose=2 -bundle-non-qt-libs -unsupported-allow-new-glibc
+ rm "$APPDIR/AppRun"
+ ;;
+esac
-rm "$APPDIR/AppRun"
cp "contrib/AppImage/AppRun" "$APPDIR/"
chmod +x "$APPDIR/AppRun"
printf '\x00\x00\x00\x00' | dd conv=notrunc of=feather.squashfs bs=1 seek=$((0x8))
rm -f feather.AppImage
-## Don't hardcode this
-cat /feather/contrib/depends/x86_64-linux-gnu/runtime-x86_64 >> feather.AppImage
+
+cat /feather/contrib/depends/${HOST}/runtime >> feather.AppImage
cat feather.squashfs >> feather.AppImage
chmod a+x feather.AppImage
built/
sources/
config.site
-x86_64*
-i686*
-mips*
-arm*
-aarch64*
-powerpc*
-riscv32*
-riscv64*
-s390x*
\ No newline at end of file
+x86_64-*
+i686-*
+mips-*
+arm-*
+aarch64-*
+powerpc-*
+riscv32-*
+riscv64-*
+s390x-*
endef
define $(package)_config_cmds
- $($(package)_cmake) -DCMAKE_INSTALL_PREFIX=$(host_prefix) .
+ $($(package)_cmake) -DCMAKE_INSTALL_PREFIX=$(host_prefix) -DHOST=$(host) -DGLIBC_DYNAMIC_LINKER=$(GLIBC_DYNAMIC_LINKER) .
endef
define $(package)_build_cmds
endef
define $(package)_stage_cmds
- cp -a runtime $($(package)_staging_prefix_dir)/runtime-x86_64
+ cp -a runtime $($(package)_staging_prefix_dir)/runtime
endef
--- /dev/null
+package=libXau
+$(package)_version=1.0.9
+$(package)_download_path=https://xorg.freedesktop.org/releases/individual/lib/
+$(package)_file_name=libXau-$($(package)_version).tar.bz2
+$(package)_sha256_hash=ccf8cbf0dbf676faa2ea0a6d64bcc3b6746064722b606c8c52917ed00dcb73ec
+$(package)_dependencies=xproto
+
+# When updating this package, check the default value of
+# --disable-xthreads. It is currently enabled.
+define $(package)_set_vars
+ $(package)_config_opts=--disable-shared --disable-lint-library --without-lint
+ $(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+ $(package)_config_opts += --with-pic
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share lib/*.la
+endef
$(package)_download_path=https://github.com/libfuse/libfuse/releases/download/fuse-2.9.9/
$(package)_file_name=fuse-$($(package)_version).tar.gz
$(package)_sha256_hash=d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5
+$(package)_patches = arm64.patch
define $(package)_config_cmds
$($(package)_autoconf)
endef
+define $(package)_preprocess_cmds
+ patch -p1 -i $($(package)_patch_dir)/arm64.patch
+endef
+
define $(package)_build_cmds
$(MAKE)
endef
patch -p1 < $($(package)_patch_dir)/no_gen_gost-sb.patch
endef
-# TODO: building on linux with $($(package)_autoconf) fails for mysterious reasons (related to --host)
+# TODO: building on linux with $($(package)_autoconf) fails for mysterious reasons
ifeq ($(host_os),linux)
define $(package)_config_cmds
- CFLAGS='-fPIE' CXXFLAGS='-fPIE' ./configure --enable-digests="sha256 blake2" --enable-ciphers=aes --disable-amd64-as-feature-detection --disable-asm --disable-avx-support --disable-avx2-support --disable-sse41-support --disable-shared --enable-static --disable-doc --with-libgpg-error-prefix=$(host_prefix) --prefix=$(host_prefix)
+ CFLAGS='-fPIE' CXXFLAGS='-fPIE' ./configure --host=$(host) --enable-digests="sha256 blake2" --enable-ciphers=aes --disable-amd64-as-feature-detection --disable-asm --disable-avx-support --disable-avx2-support --disable-sse41-support --disable-shared --enable-static --disable-doc --with-libgpg-error-prefix=$(host_prefix) --prefix=$(host_prefix)
endef
else
define $(package)_config_cmds
--- /dev/null
+package=libxcb
+$(package)_version=1.14
+$(package)_download_path=https://xcb.freedesktop.org/dist
+$(package)_file_name=libxcb-$($(package)_version).tar.xz
+$(package)_sha256_hash=a55ed6db98d43469801262d81dc2572ed124edc3db31059d4e9916eb9f844c34
+$(package)_dependencies=xcb_proto libXau
+$(package)_patches = remove_pthread_stubs.patch
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen --without-launchd
+$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+# Disable unneeded extensions.
+# More info is available from: https://doc.qt.io/qt-5.15/linux-requirements.html
+$(package)_config_opts += --disable-composite --disable-damage --disable-dpms
+$(package)_config_opts += --disable-dri2 --disable-dri3 --disable-glx
+$(package)_config_opts += --disable-present --disable-record --disable-resource
+$(package)_config_opts += --disable-screensaver --disable-xevie --disable-xfree86-dri
+$(package)_config_opts += --disable-xinput --disable-xprint --disable-selinux
+$(package)_config_opts += --disable-xtest --disable-xv --disable-xvmc
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux && \
+ patch -p1 -i $($(package)_patch_dir)/remove_pthread_stubs.patch
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share lib/*.la
+endef
\ No newline at end of file
--- /dev/null
+package=libxcb_util
+$(package)_version=0.4.0
+$(package)_download_path=https://xcb.freedesktop.org/dist
+$(package)_file_name=xcb-util-$($(package)_version).tar.bz2
+$(package)_sha256_hash=46e49469cb3b594af1d33176cd7565def2be3fa8be4371d62271fabb5eae50e9
+$(package)_dependencies=libxcb
+
+define $(package)_set_vars
+$(package)_config_opts = --disable-shared --disable-devel-docs --without-doxygen
+$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+$(package)_config_opts += --with-pic
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share/man share/doc lib/*.la
+endef
--- /dev/null
+package=libxcb_util_image
+$(package)_version=0.4.0
+$(package)_download_path=https://xcb.freedesktop.org/dist
+$(package)_file_name=xcb-util-image-$($(package)_version).tar.bz2
+$(package)_sha256_hash=2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc
+$(package)_dependencies=libxcb libxcb_util
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen
+$(package)_config_opts+= --disable-dependency-tracking --enable-option-checking
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share/man share/doc lib/*.la
+endef
--- /dev/null
+package=libxcb_util_keysyms
+$(package)_version=0.4.0
+$(package)_download_path=https://xcb.freedesktop.org/dist
+$(package)_file_name=xcb-util-keysyms-$($(package)_version).tar.bz2
+$(package)_sha256_hash=0ef8490ff1dede52b7de533158547f8b454b241aa3e4dcca369507f66f216dd9
+$(package)_dependencies=libxcb xproto
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen
+$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share/man share/doc lib/*.la
+endef
--- /dev/null
+package=libxcb_util_render
+$(package)_version=0.3.9
+$(package)_download_path=https://xcb.freedesktop.org/dist
+$(package)_file_name=xcb-util-renderutil-$($(package)_version).tar.bz2
+$(package)_sha256_hash=c6e97e48fb1286d6394dddb1c1732f00227c70bd1bedb7d1acabefdd340bea5b
+$(package)_dependencies=libxcb
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen
+$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share/man share/doc lib/*.la
+endef
--- /dev/null
+package=libxcb_util_wm
+$(package)_version=0.4.1
+$(package)_download_path=https://xcb.freedesktop.org/dist
+$(package)_file_name=xcb-util-wm-$($(package)_version).tar.bz2
+$(package)_sha256_hash=28bf8179640eaa89276d2b0f1ce4285103d136be6c98262b6151aaee1d3c2a3f
+$(package)_dependencies=libxcb
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-static --disable-devel-docs --without-doxygen
+$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf share/man share/doc lib/*.la
+endef
--- /dev/null
+package=libxkbcommon
+$(package)_version=0.8.4
+$(package)_download_path=https://xkbcommon.org/download/
+$(package)_file_name=libxkbcommon-$($(package)_version).tar.xz
+$(package)_sha256_hash=60ddcff932b7fd352752d51a5c4f04f3d0403230a584df9a2e0d5ed87c486c8b
+$(package)_dependencies=libxcb
+
+# This package explicitly enables -Werror=array-bounds, which causes build failures
+# with GCC 12.1+. Work around that by turning errors back into warnings.
+# This workaround would be dropped if the package was updated, as that would require
+# a different build system (Meson)
+define $(package)_set_vars
+$(package)_config_opts = --enable-option-checking --disable-dependency-tracking
+$(package)_config_opts += --disable-static --disable-docs
+$(package)_cflags += -Wno-error=array-bounds
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm lib/*.la
+endef
$(package)_config_opts += -no-feature-vnc
#$(package)_config_opts += -no-feature-wizard # Needed
$(package)_config_opts += -no-feature-fontconfig
-$(package)_config_opts += -no-feature-dbus
$(package)_config_opts += -xcb
$(package)_config_opts += -no-xcb-xlib
hardware_packages := hidapi protobuf libusb
hardware_native_packages := native_protobuf
-linux_packages := eudev libzip liblzma libarchive libfuse libsquashfuse libappimage
+linux_packages := eudev libzip liblzma libarchive libfuse libsquashfuse libappimage appimage_runtime
linux_native_packages = $(hardware_native_packages) native_patchelf
-qt_linux_packages:=qt native_expat native_libxcb native_xcb_proto native_libXau native_xproto native_freetype native_fontconfig native_libxkbcommon native_libxcb_util native_libxcb_util_render native_libxcb_util_keysyms native_libxcb_util_image native_libxcb_util_wm appimage_runtime
+linux_native_packages += native_qt native_expat native_libxcb native_xcb_proto native_libXau native_xproto native_freetype native_fontconfig native_libxkbcommon native_libxcb_util native_libxcb_util_render native_libxcb_util_keysyms native_libxcb_util_image native_libxcb_util_wm
+
+qt_linux_packages:=native_expat libxcb xcb_proto libXau xproto native_freetype native_fontconfig libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm qt
qt_darwin_packages=native_qt qt
qt_mingw32_packages=native_qt
$(package)_sha256_hash=cb6475a0bd8567c49f7ffbb072a05516ee6671171bed55db75b22b94ead9b37d
$(package)_darwin_dependencies=native_cctools native_qt openssl
$(package)_mingw32_dependencies=openssl native_cmake native_qt native_freetype native_fontconfig native_libxkbcommon
-$(package)_linux_dependencies=openssl native_cmake native_freetype native_fontconfig native_libxcb native_libxkbcommon native_libxcb_util native_libxcb_util_render native_libxcb_util_keysyms native_libxcb_util_image native_libxcb_util_wm
+$(package)_linux_dependencies=openssl native_qt native_cmake native_freetype native_fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
$(package)_qt_libs=corelib network widgets gui plugins testlib
$(package)_linguist_tools = lrelease lupdate lconvert
$(package)_patches = root_CMakeLists.txt
$(package)_patches += no-__builtin_available.patch
$(package)_patches += no-ffmpeg.patch
$(package)_patches += remove-shaders.patch
+$(package)_patches += aarch64Toolchain.cmake
+$(package)_patches += gnueabihfToolchain.cmake
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=7ab93a930b693eeb53ab97b038b4e6e057d06374e6f49a3814d99145a276925f
$(package)_config_opts_x86_64_linux = -xplatform linux-clang-libc++
endif
+$(package)_config_opts_arm_linux += -qt-host-path $(build_prefix)/qt-host
+$(package)_config_opts_arm_linux += -- -DCMAKE_TOOLCHAIN_FILE=gnueabihfToolchain.cmake -DCMAKE_LIBRARY_PATH=$(HOME)/.guix-profile/lib
+
+$(package)_config_opts_aarch64_linux += -qt-host-path $(build_prefix)/qt-host
+$(package)_config_opts_aarch64_linux += -- -DCMAKE_TOOLCHAIN_FILE=aarch64Toolchain.cmake -DCMAKE_LIBRARY_PATH=$(HOME)/.guix-profile/lib
+
$(package)_config_opts_mingw32 = -no-opengl
$(package)_config_opts_mingw32 += -no-dbus
$(package)_config_opts_mingw32 += -no-freetype
patch -p1 -i $($(package)_patch_dir)/no-__builtin_available.patch && \
mv $($(package)_patch_dir)/WindowsToolchain.cmake . && \
mv $($(package)_patch_dir)/MacToolchain.cmake . && \
+ mv $($(package)_patch_dir)/aarch64Toolchain.cmake . && \
+ mv $($(package)_patch_dir)/gnueabihfToolchain.cmake . && \
cd qtmultimedia && \
patch -p1 -i $($(package)_patch_dir)/no-ffmpeg.patch && \
patch -p1 -i $($(package)_patch_dir)/remove-shaders.patch && \
$(package)_config_opts+=--with-libevent-dir=$(host_prefix) --with-openssl-dir=$(host_prefix)
$(package)_config_opts+=--with-zlib-dir=$(host_prefix) --disable-tool-name-check --enable-fatal-warnings
$(package)_config_opts+=--prefix=$(host_prefix)
+ $(package)_cflags+=-O2
+ $(package)_cxxflags+=-O2
endef
define $(package)_config_cmds
- ./configure $($(package)_config_opts)
+ $($(package)_autoconf) $($(package)_config_opts)
endef
define $(package)_build_cmds
endef
define $(package)_postprocess_cmds
- strip -s -D bin/tor && \
+ $(host_toolchain)strip -s -D bin/tor && \
mkdir $($(package)_staging_prefix_dir)/Tor/ && \
cp bin/tor $($(package)_staging_prefix_dir)/Tor
endef
\ No newline at end of file
--- /dev/null
+package=xcb_proto
+$(package)_version=1.14.1
+$(package)_download_path=https://xorg.freedesktop.org/archive/individual/proto
+$(package)_file_name=xcb-proto-$($(package)_version).tar.xz
+$(package)_sha256_hash=f04add9a972ac334ea11d9d7eb4fc7f8883835da3e4859c9afa971efdf57fcc3
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+ rm -rf lib/python*/site-packages/xcbgen/__pycache__
+endef
--- /dev/null
+package=xproto
+$(package)_version=7.0.31
+$(package)_download_path=https://xorg.freedesktop.org/releases/individual/proto
+$(package)_file_name=xproto-$($(package)_version).tar.bz2
+$(package)_sha256_hash=c6f9747da0bd3a95f86b17fb8dd5e717c8f3ab7f0ece3ba1b247899ec1ef7747
+
+define $(package)_set_vars
+ $(package)_config_opts=--without-fop --without-xmlto --without-xsltproc --disable-specs
+ $(package)_config_opts += --disable-dependency-tracking --enable-option-checking
+endef
+
+define $(package)_preprocess_cmds
+ cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub .
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE)
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
# The runtime produced here is not guaranteed to run on all officially supported platforms.
# You have been warned.
+# TODO: Switch to https://github.com/AppImageCrafters/appimage-runtime
+
set(CMAKE_VERBOSE_MAKEFILE ON)
# C and C++ versions
# must not include -flto in the following flags, otherwise the data sections will be stripped out
set(runtime_cflags
-std=c99 -ffunction-sections -fdata-sections
- -I/feather/contrib/depends/x86_64-linux-gnu/include
- -I/feather/contrib/depends/x86_64-linux-gnu/include/appimage
+ -I/feather/contrib/depends/${HOST}/include
+ -I/feather/contrib/depends/${HOST}/include/appimage
)
# must not include -Wl,--gc-sections in the following flags, otherwise the data sections will be stripped out
set(runtime_ldflags -s -ffunction-sections -fdata-sections -flto)
# TODO: find out whether all the sections can be embedded in a single objcopy call
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/runtime.1.o
- COMMAND objcopy --add-section .digest_md5=16_blank_bytes --set-section-flags .digest_md5=noload,readonly runtime.0.o runtime.1.o
+ COMMAND ${HOST}-objcopy --add-section .digest_md5=16_blank_bytes --set-section-flags .digest_md5=noload,readonly runtime.0.o runtime.1.o
MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/runtime.0.o
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/16_blank_bytes
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/runtime.2.o
- COMMAND objcopy --add-section .upd_info=1024_blank_bytes --set-section-flags .upd_info=noload,readonly runtime.1.o runtime.2.o
+ COMMAND ${HOST}-objcopy --add-section .upd_info=1024_blank_bytes --set-section-flags .upd_info=noload,readonly runtime.1.o runtime.2.o
MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/runtime.1.o
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/1024_blank_bytes
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/runtime.3.o
- COMMAND objcopy --add-section .sha256_sig=1024_blank_bytes --set-section-flags .sha256_sig=noload,readonly runtime.2.o runtime.3.o
+ COMMAND ${HOST}-objcopy --add-section .sha256_sig=1024_blank_bytes --set-section-flags .sha256_sig=noload,readonly runtime.2.o runtime.3.o
MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/runtime.2.o
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/1024_blank_bytes
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/runtime.4.o
- COMMAND objcopy --add-section .sig_key=8192_blank_bytes --set-section-flags .sig_key=noload,readonly runtime.3.o runtime.4.o
+ COMMAND ${HOST}-objcopy --add-section .sig_key=8192_blank_bytes --set-section-flags .sig_key=noload,readonly runtime.3.o runtime.4.o
MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/runtime.3.o
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/8192_blank_bytes
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
endif()
# CMake gets confused by the .o object, therefore we need to tell it that it shall link everything using the C compiler
set_property(TARGET runtime PROPERTY LINKER_LANGUAGE C)
-target_link_libraries(runtime PRIVATE -Wl,--as-needed -Wl,--dynamic-linker=/lib64/ld-linux-x86-64.so.2 -static-libstdc++ -Wl,-O2 -zmuldefs -L/feather/contrib/depends/x86_64-linux-gnu/lib squashfuse squashfuse_ll fuseprivate lzma z dl pthread appimage_shared appimage_hashlib )
+target_link_libraries(runtime PRIVATE -Wl,--as-needed -Wl,--dynamic-linker=${GLIBC_DYNAMIC_LINKER} -static-libstdc++ -Wl,-no-pie -Wl,-O2 -zmuldefs -L/feather/contrib/depends/${HOST}/lib squashfuse squashfuse_ll fuseprivate lzma z dl pthread appimage_shared appimage_hashlib )
target_include_directories(runtime PRIVATE ${PROJECT_SOURCE_DIR}/include)
add_custom_command(
TARGET runtime
POST_BUILD
- COMMAND strip ${CMAKE_CURRENT_BINARY_DIR}/runtime
+ COMMAND ${HOST}-strip ${CMAKE_CURRENT_BINARY_DIR}/runtime
)
add_custom_command(
--- /dev/null
+From 914871b20a901e3e1e981c92bc42b1c93b7ab81b Mon Sep 17 00:00:00 2001
+From: Riku Voipio <riku.voipio@linaro.org>
+Date: Thu, 07 Feb 2013 11:04:21 +0000
+Subject: fuse_kernel.h: clean includes
+
+Use <linux/types.h> for linux and define types used for other operating systems
+using <stdint.h> types.
+---
+(limited to 'include/fuse_kernel.h')
+
+diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h
+index 501450c..df8e9b9 100644
+--- a/include/fuse_kernel.h
++++ b/include/fuse_kernel.h
+@@ -91,12 +91,16 @@
+ #ifndef _LINUX_FUSE_H
+ #define _LINUX_FUSE_H
+
+-#include <sys/types.h>
++#ifdef __linux__
++#include <linux/types.h>
++#else
++#include <stdint.h>
+ #define __u64 uint64_t
+ #define __s64 int64_t
+ #define __u32 uint32_t
+ #define __s32 int32_t
+ #define __u16 uint16_t
++#endif
+
+ /*
+ * Version negotiation:
+--
+cgit v0.9.0.3-67-gacbf
+
--- /dev/null
+Remove uneeded pthread-stubs dependency
+--- a/configure
++++ b/configure
+@@ -19695,7 +19695,7 @@ fi
+ NEEDED="xau >= 0.99.2"
+ case $host_os in
+ linux*) ;;
+- *) NEEDED="$NEEDED pthread-stubs" ;;
++ *) NEEDED="$NEEDED" ;;
+ esac
+
+ pkg_failed=no
\ No newline at end of file
--- /dev/null
+set(CMAKE_SYSTEM_NAME Linux)
+
+set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
+set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
+set(CMAKE_FIND_ROOT_PATH /feather/contrib/depends/aarch64-linux-gnu/)
+
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
--- /dev/null
+set(CMAKE_SYSTEM_NAME Linux)
+
+set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
+set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
+set(CMAKE_FIND_ROOT_PATH /feather/contrib/depends/arm-linux-gnueabihf/)
+
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
################
# Default to building for all supported HOSTs (overridable by environment)
-export HOSTS="${HOSTS:-x86_64-linux-gnu x86_64-linux-gnu.tails x86_64-w64-mingw32 x86_64-w64-mingw32.installer x86_64-apple-darwin}"
+export HOSTS="${HOSTS:-x86_64-linux-gnu x86_64-linux-gnu.tails aarch64-linux-gnu arm-linux-gnueabihf x86_64-w64-mingw32 x86_64-w64-mingw32.installer x86_64-apple-darwin}"
# Usage: distsrc_for_host HOST
#
;;
esac
+export GLIBC_DYNAMIC_LINKER=${glibc_dynamic_linker}
+
# Environment variables for determinism
export TAR_OPTIONS="--owner=0 --group=0 --numeric-owner --mtime='@${SOURCE_DATE_EPOCH}' --sort=name"
export TZ="UTC"
;;
esac
;;
+ *gnueabihf)
+ CMAKEVARS+=" -DNO_AES=On" # Raspberry Pi
+ ;;
esac
# Configure this DISTSRC for $HOST