summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2024-02-05 15:32:45 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2024-02-05 17:34:50 +0100
commit5d9eedc6f4fe00e1e76dd1f06af690fe1fb775eb (patch)
treea8d4b014ed32712f9744fbdae97b10ddbb1772e8
parent0f1c941e0a61012b662023df404ec0f6eb10559c (diff)
binutils: update to 2.42, fix kvx gcc/linux using the latest version from github
-rw-r--r--target/config/Config.in.binutils7
-rw-r--r--target/linux/Config.in.kernelcfg2
-rw-r--r--target/linux/Config.in.kernelversion2
-rw-r--r--toolchain/binutils/Makefile.inc7
-rw-r--r--toolchain/binutils/patches/2.42/kvx.patch29
-rw-r--r--toolchain/elf2flt/Makefile4
-rw-r--r--toolchain/gcc/Makefile.inc2
7 files changed, 49 insertions, 4 deletions
diff --git a/target/config/Config.in.binutils b/target/config/Config.in.binutils
index 4bc9e36e4..4af15eba9 100644
--- a/target/config/Config.in.binutils
+++ b/target/config/Config.in.binutils
@@ -6,16 +6,19 @@ prompt "Binutils version"
default ADK_TOOLCHAIN_BINUTILS_ARC if ADK_TARGET_CPU_ARC_ARC32
default ADK_TOOLCHAIN_BINUTILS_ARC if ADK_TARGET_CPU_ARC_ARC64
default ADK_TOOLCHAIN_BINUTILS_AVR32 if ADK_TARGET_ARCH_AVR32
-default ADK_TOOLCHAIN_BINUTILS_KVX if ADK_TARGET_ARCH_KVX
default ADK_TOOLCHAIN_BINUTILS_2_28 if ADK_TARGET_CPU_SH_J2
default ADK_TOOLCHAIN_BINUTILS_2_38 if ADK_TARGET_ARCH_NDS32
-default ADK_TOOLCHAIN_BINUTILS_2_41
+default ADK_TOOLCHAIN_BINUTILS_2_42
config ADK_TOOLCHAIN_BINUTILS_GIT
bool "git"
depends on !ADK_TARGET_ARCH_AVR32
depends on !ADK_TARGET_ARCH_KVX
+config ADK_TOOLCHAIN_BINUTILS_2_42
+ bool "2.42"
+ depends on !ADK_TARGET_ARCH_AVR32
+
config ADK_TOOLCHAIN_BINUTILS_2_41
bool "2.41"
depends on !ADK_TARGET_ARCH_AVR32
diff --git a/target/linux/Config.in.kernelcfg b/target/linux/Config.in.kernelcfg
index 8142fe576..b256685b3 100644
--- a/target/linux/Config.in.kernelcfg
+++ b/target/linux/Config.in.kernelcfg
@@ -12,6 +12,7 @@ default ADK_TARGET_LINUX_KERNEL_USE_DEFCONFIG if ADK_TARGET_SYSTEM_BEAGLEBONE_BL
default ADK_TARGET_LINUX_KERNEL_USE_DEFCONFIG if ADK_TARGET_SYSTEM_PHYTEC_WEGA && ADK_TARGET_LINUX_KERNEL_VERSION_GIT
default ADK_TARGET_LINUX_KERNEL_USE_DEFCONFIG if ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG && ADK_TARGET_LINUX_KERNEL_VERSION_GIT
default ADK_TARGET_LINUX_KERNEL_USE_DEFCONFIG if ADK_TARGET_BOARD_BCM28XX && ADK_TARGET_LINUX_KERNEL_VERSION_GIT
+default ADK_TARGET_LINUX_KERNEL_USE_DEFCONFIG if ADK_TARGET_ARCH_KVX
config ADK_TARGET_LINUX_KERNEL_USE_MINICONFIG
bool "Use mini.config from OpenADK"
@@ -64,6 +65,7 @@ config ADK_TARGET_LINUX_KERNEL_DEFCONFIG
default "haps_hs5x_defconfig" if ADK_TARGET_CPU_ARC_ARC32
default "haps_arc64_defconfig" if ADK_TARGET_CPU_ARC_ARC64
default "m5208evb_defconfig" if ADK_TARGET_SYSTEM_QEMU_M68K_MCF5208
+ default "default_defconfig" if ADK_TARGET_ARCH_KVX
default ""
config ADK_TARGET_LINUX_KERNEL_CUSTOMCONFIG_PATH
diff --git a/target/linux/Config.in.kernelversion b/target/linux/Config.in.kernelversion
index f16fc5450..85f3014d0 100644
--- a/target/linux/Config.in.kernelversion
+++ b/target/linux/Config.in.kernelversion
@@ -232,7 +232,7 @@ config ADK_TARGET_LINUX_KERNEL_GIT
string "git version"
depends on ADK_TARGET_LINUX_KERNEL_VERSION_GIT
default "f6e9dab9d1dc1e8fa2acb75504bf5ff86b885b8e" if ADK_TARGET_CPU_ARC_ARC32 || ADK_TARGET_CPU_ARC_ARC64
- default "b02c139d3608c8ae87f5398a3a29854f6df7a041" if ADK_TARGET_ARCH_KVX
+ default "8bc0c72fba298aa9d0f03748ed99acad18dd1bbe" if ADK_TARGET_ARCH_KVX
default "6a2f2e4198eaff63ee75f6085ce9f966c47b4441" if ADK_TARGET_ARCH_LM32
default "d5066442e39dd9bf4ba6431ffb3f99e3d5085d3f" if ADK_TARGET_BOARD_BCM28XX
default "f8d3b2a0fa5054aaed0f14cd457db9d8922bb167" if ADK_TARGET_SYSTEM_ADSP_BF537
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 <piannetta@kalrayinc.com>
+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 <piannetta@kalrayinc.com>
+
+ * 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
+
diff --git a/toolchain/elf2flt/Makefile b/toolchain/elf2flt/Makefile
index 3310cea04..801b6d6b2 100644
--- a/toolchain/elf2flt/Makefile
+++ b/toolchain/elf2flt/Makefile
@@ -10,6 +10,10 @@ ifeq ($(ADK_TOOLCHAIN_BINUTILS_GIT),y)
BINUTILS_VERSION:= git
BFDLIB:= .libs/libbfd.a
endif
+ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_42),y)
+BINUTILS_VERSION:= 2.42
+BFDLIB:= .libs/libbfd.a
+endif
ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_41),y)
BINUTILS_VERSION:= 2.41
BFDLIB:= .libs/libbfd.a
diff --git a/toolchain/gcc/Makefile.inc b/toolchain/gcc/Makefile.inc
index 9c77fd831..7b04d441d 100644
--- a/toolchain/gcc/Makefile.inc
+++ b/toolchain/gcc/Makefile.inc
@@ -91,7 +91,7 @@ DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
LIBSTDCXXVER:= 19
endif
ifeq ($(ADK_TOOLCHAIN_GCC_KVX),y)
-PKG_VERSION:= f98c17b1e78dd3a3da45c0ac1af7b105edf2bf66
+PKG_VERSION:= 2b772d878ea404f20ea94f43db8eceb0196d7fa7
PKG_GIT:= hash
PKG_SITES:= https://github.com/kalray/gcc.git
PKG_RELEASE:= 1