From 7c579a72150ee04713a19393356acc50af5ed573 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Fri, 25 Dec 2020 20:22:06 +0100 Subject: [PATCH] binutils: fix build with ndk-r23 --- packages/binutils/build.sh | 2 +- packages/binutils/gold-ffsll.c.patch | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 packages/binutils/gold-ffsll.c.patch diff --git a/packages/binutils/build.sh b/packages/binutils/build.sh index edd57a8e1..8bdbf6d6e 100644 --- a/packages/binutils/build.sh +++ b/packages/binutils/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Collection of binary tools, the main ones being ld, the TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=2.37 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/binutils/binutils-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SHA256=820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c TERMUX_PKG_DEPENDS="libc++, zlib" diff --git a/packages/binutils/gold-ffsll.c.patch b/packages/binutils/gold-ffsll.c.patch new file mode 100644 index 000000000..9392da8ab --- /dev/null +++ b/packages/binutils/gold-ffsll.c.patch @@ -0,0 +1,23 @@ +--- ./gold/ffsll.c.orig 2020-12-25 18:14:59.949086305 +0000 ++++ ./gold/ffsll.c 2020-12-25 19:16:32.733522188 +0000 +@@ -29,20 +29,3 @@ + /* This file implements ffsll for systems which don't have it. We use + ffsll if possible because gcc supports it as a builtin which will + use a machine instruction if there is one. */ +- +-int +-ffsll (long long arg) +-{ +- unsigned long long i; +- int ret; +- +- if (arg == 0) +- ret = 0; +- else +- { +- ret = 1; +- for (i = (unsigned long long) arg; (i & 1) == 0; i >>= 1) +- ++ret; +- } +- return ret; +-}