From 5d9eedc6f4fe00e1e76dd1f06af690fe1fb775eb Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 5 Feb 2024 15:32:45 +0100 Subject: binutils: update to 2.42, fix kvx gcc/linux using the latest version from github --- toolchain/binutils/Makefile.inc | 7 +++++++ toolchain/binutils/patches/2.42/kvx.patch | 29 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 toolchain/binutils/patches/2.42/kvx.patch (limited to 'toolchain/binutils') diff --git a/toolchain/binutils/Makefile.inc b/toolchain/binutils/Makefile.inc index 633e03450..8f6baf2dd 100644 --- a/toolchain/binutils/Makefile.inc +++ b/toolchain/binutils/Makefile.inc @@ -2,6 +2,13 @@ # material, please see the LICENCE file in the top-level directory. PKG_NAME:= binutils +ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_42),y) +PKG_VERSION:= 2.42 +PKG_RELEASE:= 1 +PKG_HASH:= f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a800 +PKG_SITES:= ${MASTER_SITE_GNU:=binutils/} +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz +endif ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_41),y) PKG_VERSION:= 2.41 PKG_RELEASE:= 1 diff --git a/toolchain/binutils/patches/2.42/kvx.patch b/toolchain/binutils/patches/2.42/kvx.patch new file mode 100644 index 000000000..c3690ca8e --- /dev/null +++ b/toolchain/binutils/patches/2.42/kvx.patch @@ -0,0 +1,29 @@ +From 234938d8b7df2f069c6cbbaff47eb2ba338ec532 Mon Sep 17 00:00:00 2001 +From: Paul Iannetta +Date: Mon, 4 Sep 2023 15:31:53 +0200 +Subject: [PATCH] kvx: gas: fix the detection of negative powers of 2 + +gas/ChangeLog: + +2023-09-04 Paul Iannetta + + * config/kvx-parse.c (get_token_class): Use the signed value. + +--- + gas/config/kvx-parse.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gas/config/kvx-parse.c b/gas/config/kvx-parse.c +index bb51c861625..0bd6b75ef30 100644 +--- a/gas/config/kvx-parse.c ++++ b/gas/config/kvx-parse.c +@@ -525,7 +525,7 @@ get_token_class (struct token_s *token, struct token_classes *classes, int insn_ + : strtoull (tok + (tok[0] == '-') + (tok[0] == '+'), NULL, 0)); + int64_t val = uval; + int64_t pval = val < 0 ? -uval : uval; +- int neg_power2_p = val < 0 && !(uval & (uval - 1)); ++ int neg_power2_p = val < 0 && !(pval & (pval - 1)); + unsigned len = pval ? 8 * sizeof (pval) - __builtin_clzll (pval) : 0; + while (class[cur].class_id != -1 + && ((unsigned) (class[cur].sz < 0 + -- cgit v1.2.3