From 5573523ac9bbe366a18e128f41f25cb0f6c4d733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sat, 10 Aug 2019 07:42:41 +0200 Subject: [PATCH] zerotier-one: fix cross targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jürgen Buchmüller --- srcpkgs/zerotier-one/patches/fix-cross.patch | 59 ++++++++++++++++++++ srcpkgs/zerotier-one/template | 4 -- 2 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/zerotier-one/patches/fix-cross.patch diff --git a/srcpkgs/zerotier-one/patches/fix-cross.patch b/srcpkgs/zerotier-one/patches/fix-cross.patch new file mode 100644 index 00000000000..6f7bbd90e8f --- /dev/null +++ b/srcpkgs/zerotier-one/patches/fix-cross.patch @@ -0,0 +1,59 @@ +--- make-linux.mk 2019-07-31 22:25:58.000000000 +0200 ++++ make-linux.mk 2019-08-10 07:30:54.288571780 +0200 +@@ -147,6 +147,9 @@ + ifeq ($(CC_MACH),ppc64el) + ZT_ARCHITECTURE=8 + endif ++ifeq ($(CC_MACH),powerpc64) ++ ZT_ARCHITECTURE=8 ++endif + ifeq ($(CC_MACH),i386) + ZT_ARCHITECTURE=1 + endif +@@ -177,22 +177,22 @@ + ifeq ($(CC_MACH),armv6) + ZT_ARCHITECTURE=3 + override DEFS+=-DZT_NO_TYPE_PUNNING +- ZT_USE_ARM32_NEON_ASM_CRYPTO=1 ++ ZT_USE_ARM32_NEON_ASM_CRYPTO=0 + endif + ifeq ($(CC_MACH),armv6l) + ZT_ARCHITECTURE=3 + override DEFS+=-DZT_NO_TYPE_PUNNING +- ZT_USE_ARM32_NEON_ASM_CRYPTO=1 ++ ZT_USE_ARM32_NEON_ASM_CRYPTO=0 + endif + ifeq ($(CC_MACH),armv6zk) + ZT_ARCHITECTURE=3 + override DEFS+=-DZT_NO_TYPE_PUNNING +- ZT_USE_ARM32_NEON_ASM_CRYPTO=1 ++ ZT_USE_ARM32_NEON_ASM_CRYPTO=0 + endif + ifeq ($(CC_MACH),armv6kz) + ZT_ARCHITECTURE=3 + override DEFS+=-DZT_NO_TYPE_PUNNING +- ZT_USE_ARM32_NEON_ASM_CRYPTO=1 ++ ZT_USE_ARM32_NEON_ASM_CRYPTO=0 + endif + ifeq ($(CC_MACH),armv7) + ZT_ARCHITECTURE=3 +@@ -261,19 +261,6 @@ + override LDFLAGS+=-Wl,--wrap=memcpy -static-libstdc++ + endif + +-# ARM32 hell -- use conservative CFLAGS +-ifeq ($(ZT_ARCHITECTURE),3) +- ifeq ($(shell if [ -e /usr/bin/dpkg ]; then dpkg --print-architecture; fi),armel) +- override CFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm +- override CXXFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm +- ZT_USE_ARM32_NEON_ASM_CRYPTO=0 +- else +- override CFLAGS+=-march=armv5 -mno-unaligned-access -marm +- override CXXFLAGS+=-march=armv5 -mno-unaligned-access -marm +- ZT_USE_ARM32_NEON_ASM_CRYPTO=0 +- endif +-endif +- + # Build faster crypto on some targets + ifeq ($(ZT_USE_X64_ASM_SALSA),1) + override DEFS+=-DZT_USE_X64_ASM_SALSA2012 diff --git a/srcpkgs/zerotier-one/template b/srcpkgs/zerotier-one/template index f1c36090b5a..41e0a842c71 100644 --- a/srcpkgs/zerotier-one/template +++ b/srcpkgs/zerotier-one/template @@ -13,10 +13,6 @@ homepage="https://www.zerotier.com/" distfiles="https://github.com/zerotier/ZeroTierOne/archive/${version}.tar.gz" checksum=39f5cdbe589ff550dca9d407f579e87b55a750dbb46458914476fa7dbafb8214 -case "$XBPS_MACHINE" in - arm*) broken="Cross to arm6/7 is currently broken" ;; -esac - pre_install() { sed -i 's/sbin/bin/g' make-linux.mk }