summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/binutils/Makefile.inc2
-rw-r--r--toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0001-lm32.patch159
-rw-r--r--toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0006-lm32.patch190
-rw-r--r--toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0007-dont-waste-space.patch10
-rw-r--r--toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0009-no-build-date.patch11
-rw-r--r--toolchain/expat/Makefile4
-rw-r--r--toolchain/expat/Makefile.inc6
-rw-r--r--toolchain/gcc/Makefile2
-rw-r--r--toolchain/gcc/Makefile.inc10
-rw-r--r--toolchain/gcc/patches/15.1.0/add-crtreloc.frv12
-rw-r--r--toolchain/gcc/patches/15.1.0/csky.patch12
-rw-r--r--toolchain/gcc/patches/15.1.0/libgcc-fdpic-bfin.patch12
12 files changed, 262 insertions, 168 deletions
diff --git a/toolchain/binutils/Makefile.inc b/toolchain/binutils/Makefile.inc
index 1fcab41a2..af6479f15 100644
--- a/toolchain/binutils/Makefile.inc
+++ b/toolchain/binutils/Makefile.inc
@@ -73,7 +73,7 @@ PKG_SITES:= https://github.com/kalray/gdb-binutils.git
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
endif
ifeq ($(ADK_TOOLCHAIN_BINUTILS_ARC),y)
-PKG_VERSION:= arc-2023.09
+PKG_VERSION:= arc-2024.12
PKG_GIT:= tag
PKG_RELEASE:= 1
PKG_SITES:= https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb.git
diff --git a/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0001-lm32.patch b/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0001-lm32.patch
deleted file mode 100644
index 5ec55337b..000000000
--- a/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0001-lm32.patch
+++ /dev/null
@@ -1,159 +0,0 @@
-diff -Nur elf2flt-6d80ab6c93409e796f85da404bde84b841231531.orig/elf2flt.c elf2flt-6d80ab6c93409e796f85da404bde84b841231531/elf2flt.c
---- elf2flt-6d80ab6c93409e796f85da404bde84b841231531.orig/elf2flt.c 2017-09-27 06:06:04.000000000 +0200
-+++ elf2flt-6d80ab6c93409e796f85da404bde84b841231531/elf2flt.c 2017-09-27 06:07:51.032597579 +0200
-@@ -61,6 +61,8 @@
- #include <elf/bfin.h>
- #elif defined(TARGET_h8300)
- #include <elf/h8.h>
-+#elif defined(TARGET_lm32)
-+#include <elf/lm32.h>
- #elif defined(TARGET_m68k)
- #include <elf/m68k.h>
- #elif defined(TARGET_microblaze)
-@@ -120,6 +122,11 @@
- #define ARCH "nios"
- #elif defined(TARGET_nios2)
- #define ARCH "nios2"
-+#elif defined(TARGET_lm32)
-+#define ARCH "lm32"
-+#define FLAT_LM32_RELOC_TYPE_32_BIT 0
-+#define FLAT_LM32_RELOC_TYPE_HI16_BIT 1
-+#define FLAT_LM32_RELOC_TYPE_LO16_BIT 2
- #elif defined(TARGET_xtensa)
- #define ARCH "xtensa"
- #else
-@@ -357,7 +364,7 @@
- int bad_relocs = 0;
- asymbol **symb;
- long nsymb;
--#ifdef TARGET_bfin
-+#if defined (TARGET_bfin) || defined (TARGET_lm32)
- unsigned long persistent_data = 0;
- #endif
-
-@@ -682,6 +689,36 @@
- break;
- default:
- goto bad_resolved_reloc;
-+#elif defined(TARGET_lm32)
-+ case R_LM32_HI16:
-+ case R_LM32_LO16:
-+ if (q->howto->type == R_LM32_HI16) {
-+ pflags = FLAT_LM32_RELOC_TYPE_HI16_BIT << 29;
-+ } else {
-+ pflags = FLAT_LM32_RELOC_TYPE_LO16_BIT << 29;
-+ }
-+
-+ relocation_needed = 1;
-+
-+ /* remember the upper 16 bits */
-+ if ((0xffff0000 & sym_addr) != persistent_data) {
-+ flat_relocs = (uint32_t *)
-+ (realloc (flat_relocs, (flat_reloc_count + 1) * sizeof (uint32_t)));
-+ if (verbose)
-+ printf ("New persistent data for %08lx\n", sym_addr);
-+ persistent_data = 0xffff0000 & sym_addr;
-+ flat_relocs[flat_reloc_count++] = (sym_addr >> 16) | (3 << 29);
-+ }
-+ break;
-+ case R_LM32_32:
-+ pflags = FLAT_LM32_RELOC_TYPE_32_BIT << 29;
-+ relocation_needed = 1;
-+ break;
-+ case R_LM32_CALL:
-+ relocation_needed = 0;
-+ break;
-+ default:
-+ goto bad_resolved_reloc;
- #elif defined(TARGET_m68k)
- case R_68K_32:
- goto good_32bit_resolved_reloc;
-@@ -1459,6 +1496,63 @@
- #undef _30BITS_RELOC
- #undef _28BITS_RELOC
- #endif
-+#ifdef TARGET_lm32
-+ case R_LM32_32:
-+ {
-+ pflags = FLAT_LM32_RELOC_TYPE_32_BIT << 29;
-+ sym_vma = elf2flt_bfd_section_vma(abs_bfd, sym_section);
-+ sym_addr += sym_vma + q->addend;
-+ relocation_needed = 1;
-+ break;
-+ }
-+ case R_LM32_CALL:
-+ {
-+ sym_vma = 0;
-+ sym_addr += sym_vma + q->addend;
-+ sym_addr -= q->address;
-+ sym_addr = (int32_t)sym_addr >> q->howto->rightshift;
-+
-+ if ((int32_t)sym_addr < -0x8000000 || (int32_t)sym_addr > 0x7ffffff) {
-+ printf("ERROR: Relocation overflow for R_LM32_CALL relocation against %s\n", sym_name);
-+ bad_relocs++;
-+ continue;
-+ }
-+
-+ r_mem[0] |= (sym_addr >> 24) & 0x03;
-+ r_mem[1] = (sym_addr >> 16) & 0xff;
-+ r_mem[2] = (sym_addr >> 8) & 0xff;
-+ r_mem[3] = sym_addr & 0xff;
-+ break;
-+ }
-+ case R_LM32_HI16:
-+ case R_LM32_LO16:
-+ {
-+ if (q->howto->type == R_LM32_HI16) {
-+ pflags = FLAT_LM32_RELOC_TYPE_HI16_BIT << 29;
-+ } else {
-+ pflags = FLAT_LM32_RELOC_TYPE_LO16_BIT << 29;
-+ }
-+
-+ sym_vma = elf2flt_bfd_section_vma(abs_bfd, sym_section);
-+ sym_addr += sym_vma + q->addend;
-+
-+ relocation_needed = 1;
-+
-+ /* remember the upper 16 bits */
-+ if ((0xffff0000 & sym_addr) != persistent_data) {
-+ flat_relocs = (uint32_t *)
-+ (realloc (flat_relocs, (flat_reloc_count + 1) * sizeof (uint32_t)));
-+ if (verbose)
-+ printf ("New persistent data for %08lx\n", sym_addr);
-+ persistent_data = 0xffff0000 & sym_addr;
-+ flat_relocs[flat_reloc_count++] = (sym_addr >> 16) | (3 << 29);
-+ }
-+
-+ r_mem[2] = (sym_addr >> 8) & 0xff;
-+ r_mem[3] = sym_addr & 0xff;
-+ break;
-+ }
-+#endif /* TARGET_lm32 */
- default:
- /* missing support for other types of relocs */
- printf("ERROR: bad reloc type %d\n", (*p)->howto->type);
-@@ -1596,6 +1690,13 @@
- break;
- #endif
-
-+#ifdef TARGET_lm32
-+ case R_LM32_HI16:
-+ case R_LM32_LO16:
-+ case R_LM32_CALL:
-+ /* entry has already been written */
-+ break;
-+#endif
- default:
- /* The alignment of the build host
- might be stricter than that of the
-diff -Nur elf2flt-6d80ab6c93409e796f85da404bde84b841231531.orig/elf2flt.ld.in elf2flt-6d80ab6c93409e796f85da404bde84b841231531/elf2flt.ld.in
---- elf2flt-6d80ab6c93409e796f85da404bde84b841231531.orig/elf2flt.ld.in 2017-09-27 06:06:04.000000000 +0200
-+++ elf2flt-6d80ab6c93409e796f85da404bde84b841231531/elf2flt.ld.in 2017-09-29 18:11:30.999698955 +0200
-@@ -34,6 +34,7 @@
- W_RODAT *(.rodata1)
- W_RODAT *(.rodata.*)
- W_RODAT *(.gnu.linkonce.r*)
-+W_RODAT *(.rofixup)
-
- /* .ARM.extab name sections containing exception unwinding information */
- *(.ARM.extab* .gnu.linkonce.armextab.*)
diff --git a/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0006-lm32.patch b/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0006-lm32.patch
new file mode 100644
index 000000000..0e0a96092
--- /dev/null
+++ b/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0006-lm32.patch
@@ -0,0 +1,190 @@
+--- elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12.orig/elf2flt.c 2025-04-14 19:50:51.016711969 +0000
++++ elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12/elf2flt.c 2025-04-14 21:41:22.134771290 +0000
+@@ -62,6 +62,8 @@ const char *elf2flt_progname;
+ #include <elf/bfin.h>
+ #elif defined(TARGET_h8300)
+ #include <elf/h8.h>
++#elif defined(TARGET_lm32)
++#include <elf/lm32.h>
+ #elif defined(TARGET_m68k)
+ #include <elf/m68k.h>
+ #elif defined(TARGET_microblaze)
+@@ -115,6 +117,12 @@ const char *elf2flt_progname;
+ #define ARCH "sh2"
+ #elif defined(TARGET_h8300)
+ #define ARCH "h8300"
++#elif defined(TARGET_lm32)
++#define ARCH "lm32"
++#define FLAT_LM32_RELOC_TYPE_32_BIT 0
++#define FLAT_LM32_RELOC_TYPE_HI16_BIT 1
++#define FLAT_LM32_RELOC_TYPE_LO16_BIT 2
++#define FLAT_LM32_RELOC_TYPE_PERSIST 3
+ #elif defined(TARGET_microblaze)
+ #define ARCH "microblaze"
+ #elif defined(TARGET_e1)
+@@ -375,7 +383,7 @@ output_relocs (
+ int bad_relocs = 0;
+ asymbol **symb;
+ long nsymb;
+-#ifdef TARGET_bfin
++#if defined(TARGET_bfin) || defined(TARGET_lm32)
+ unsigned long persistent_data = 0;
+ #endif
+
+@@ -674,6 +682,40 @@ output_relocs (
+ break;
+ default:
+ goto bad_resolved_reloc;
++#elif defined(TARGET_lm32)
++ case R_LM32_HI16:
++ case R_LM32_LO16:
++ sym_vma = elf2flt_bfd_section_vma(abs_bfd, sym_section);
++ sym_addr += sym_vma + q->addend;
++ /* remember the upper 16 bits */
++ if ((0xFFFF0000UL & sym_addr) != persistent_data) {
++ flat_relocs = (uint32_t *)realloc(flat_relocs,
++ (flat_reloc_count + 1) * sizeof (uint32_t));
++ if (verbose)
++ printf("New persistent data for %08"PRIx32"\n", sym_addr);
++ persistent_data = 0xFFFF0000UL & sym_addr;
++ pflags = FLAT_LM32_RELOC_TYPE_PERSIST;
++ pflags <<= 29;
++ flat_relocs[flat_reloc_count++] = pflags | (sym_addr >> 16);
++ }
++ pflags = q->howto->type == R_LM32_HI16 ?
++ FLAT_LM32_RELOC_TYPE_HI16_BIT :
++ FLAT_LM32_RELOC_TYPE_LO16_BIT;
++ pflags <<= 29;
++ relocation_needed = 1;
++ break;
++ case R_LM32_32:
++ sym_vma = elf2flt_bfd_section_vma(abs_bfd, sym_section);
++ sym_addr += sym_vma + q->addend;
++ pflags = FLAT_LM32_RELOC_TYPE_32_BIT;
++ pflags <<= 29;
++ relocation_needed = 1;
++ break;
++ case R_LM32_CALL:
++ relocation_needed = 0;
++ break;
++ default:
++ goto bad_resolved_reloc;
+ #elif defined(TARGET_m68k)
+ case R_68K_32:
+ goto good_32bit_resolved_reloc;
+@@ -1010,6 +1052,63 @@ output_relocs (
+ continue;
+ #endif
+
++#ifdef TARGET_lm32
++ case R_LM32_HI16:
++ case R_LM32_LO16:
++ sym_vma = elf2flt_bfd_section_vma(abs_bfd, sym_section);
++ sym_addr += sym_vma + q->addend;
++ /* remember the upper 16 bits */
++ if ((0xFFFF0000UL & sym_addr) != persistent_data) {
++ flat_relocs = (uint32_t *)realloc(flat_relocs,
++ (flat_reloc_count + 1) * sizeof (uint32_t));
++ if (verbose)
++ printf("New persistent data for %08"PRIx32"\n", sym_addr);
++ persistent_data = 0xFFFF0000UL & sym_addr;
++ pflags = FLAT_LM32_RELOC_TYPE_PERSIST;
++ pflags <<= 29;
++ flat_relocs[flat_reloc_count++] = pflags | (sym_addr >> 16);
++ }
++ pflags = q->howto->type == R_LM32_HI16 ?
++ FLAT_LM32_RELOC_TYPE_HI16_BIT :
++ FLAT_LM32_RELOC_TYPE_LO16_BIT;
++ pflags <<= 29;
++ relocation_needed = 1;
++ break;
++ case R_LM32_32:
++ sym_vma = elf2flt_bfd_section_vma(abs_bfd, sym_section);
++ sym_addr += sym_vma + q->addend;
++ pflags = FLAT_LM32_RELOC_TYPE_32_BIT;
++ pflags <<= 29;
++ relocation_needed = 1;
++ break;
++ case R_LM32_CALL:
++ sym_vma = 0;
++ sym_addr += sym_vma + q->addend;
++ sym_addr -= q->address;
++ sym_addr = (int32_t)sym_addr >> q->howto->rightshift;
++ {
++ union {
++ uint32_t u;
++ int32_t s;
++ } rangecheck;
++
++ rangecheck.u = (unsigned)sym_addr << 6;
++ rangecheck.s >>= 6;
++ if (rangecheck.u != sym_addr) {
++ printf("ERROR: Relocation overflow for R_LM32_CALL relocation against %s\n", sym_name);
++ ++bad_relocs;
++ continue;
++ }
++ }
++ relocation_needed = 0;
++ r_mem[0] = (r_mem[0] & 0xFCU) |
++ ((sym_addr >> 24) & 0x03U);
++ r_mem[1] = (sym_addr >> 16) & 0xFFU;
++ r_mem[2] = (sym_addr >> 8) & 0xFFU;
++ r_mem[3] = sym_addr & 0xFFU;
++ break;
++#endif
++
+ #ifdef TARGET_microblaze
+ case R_MICROBLAZE_64:
+ /* The symbol is split over two consecutive instructions.
+@@ -1596,6 +1695,21 @@ DIS29_RELOCATION:
+ break;
+ #endif
+
++#ifdef TARGET_lm32
++ case R_LM32_HI16:
++ case R_LM32_LO16:
++ r_mem[2] = (sym_addr >> 8) & 0xFFU;
++ r_mem[3] = sym_addr & 0xFFU;
++ break;
++ case R_LM32_CALL:
++ /*
++ * use_resolved=…
++ * 0: already written above
++ * 1: no write necessary
++ */
++ break;
++#endif
++
+ default:
+ /* The alignment of the build host
+ might be stricter than that of the
+--- elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12.orig/elf2flt.ld.in 2025-04-14 19:50:51.020711942 +0000
++++ elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12/elf2flt.ld.in 2025-04-14 22:23:40.078052838 +0000
+@@ -34,6 +34,7 @@ W_RODAT *(.rodata)
+ W_RODAT *(.rodata1)
+ W_RODAT *(.rodata.*)
+ W_RODAT *(.gnu.linkonce.r*)
++W_RODAT *(.rofixup)
+
+ /* .ARM.extab name sections containing exception unwinding information */
+ *(.ARM.extab* .gnu.linkonce.armextab.*)
+--- elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12.orig/flthdr.c 2025-04-14 19:50:43.924759193 +0000
++++ elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12/flthdr.c 2025-04-14 22:01:24.467101158 +0000
+@@ -33,6 +33,8 @@ const char *elf2flt_progname;
+
+ #if defined TARGET_bfin
+ # define flat_get_relocate_addr(addr) (addr & 0x03ffffff)
++#elif defined(TARGET_lm32)
++# define flat_get_relocate_addr(addr) ((addr) & 0x1FFFFFFFU)
+ #else
+ # define flat_get_relocate_addr(addr) (addr)
+ #endif
+@@ -173,6 +175,8 @@ process_file(const char *ifile, const ch
+ addr = ntohl(addr);
+ if (r & 1)
+ addr &= 0x00ffffff;
++#elif defined(TARGET_lm32)
++ addr = ntohl(addr);
+ #endif
+ printf("%"PRIx32"\n", addr);
+ }
diff --git a/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0007-dont-waste-space.patch b/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0007-dont-waste-space.patch
new file mode 100644
index 000000000..66b0c12f1
--- /dev/null
+++ b/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0007-dont-waste-space.patch
@@ -0,0 +1,10 @@
+--- elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12.orig/elf2flt.ld.in 2025-04-14 19:50:51.020711942 +0000
++++ elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12/elf2flt.ld.in 2025-04-14 22:23:40.078052838 +0000
+@@ -13,7 +13,6 @@ PHDRS {
+ SECTIONS {
+
+ .text 0x0 : {
+- . = . + 4;
+ . = ALIGN(0x4) ;
+ @SYMBOL_PREFIX@_stext = . ;
+ *(.literal .text)
diff --git a/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0009-no-build-date.patch b/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0009-no-build-date.patch
new file mode 100644
index 000000000..06273ef4b
--- /dev/null
+++ b/toolchain/elf2flt/patches/453398f917d167f8c308c8f997270c48ae8f8b12/0009-no-build-date.patch
@@ -0,0 +1,11 @@
+--- elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12.orig/elf2flt.c 2025-04-14 19:50:51.016711969 +0000
++++ elf2flt-453398f917d167f8c308c8f997270c48ae8f8b12/elf2flt.c 2025-04-14 23:14:52.212092781 +0000
+@@ -2132,7 +2132,7 @@ int main(int argc, char *argv[])
+ | (pic_with_got ? FLAT_FLAG_GOTPIC : 0)
+ | (docompress ? (docompress == 2 ? FLAT_FLAG_GZDATA : FLAT_FLAG_GZIP) : 0)
+ );
+- hdr.build_date = htonl((uint32_t)get_build_date());
++ hdr.build_date = 0;
+ memset(hdr.filler, 0x00, sizeof(hdr.filler));
+
+ for (i=0; i<reloc_len; i++) reloc[i] = htonl(reloc[i]);
diff --git a/toolchain/expat/Makefile b/toolchain/expat/Makefile
index 1affc7b28..fedceb2a0 100644
--- a/toolchain/expat/Makefile
+++ b/toolchain/expat/Makefile
@@ -6,10 +6,6 @@ include Makefile.inc
include ../rules.mk
include ${ADK_TOPDIR}/mk/buildhlp.mk
-ifeq (${ADK_MAKE_PARALLEL},y)
-MPC_MAKEOPTS+= -j${ADK_MAKE_JOBS}
-endif
-
$(WRKBUILD)/.configured:
(cd $(WRKBUILD); \
$(WRKBUILD)/configure \
diff --git a/toolchain/expat/Makefile.inc b/toolchain/expat/Makefile.inc
index 7baf7f48d..b5b9f8932 100644
--- a/toolchain/expat/Makefile.inc
+++ b/toolchain/expat/Makefile.inc
@@ -2,8 +2,8 @@
# material, please see the LICENCE file in the top-level directory.
PKG_NAME:= expat
-PKG_VERSION:= 2.7.0
+PKG_VERSION:= 2.7.1
PKG_RELEASE:= 1
-PKG_HASH:= 362e89ca6b8a0d46fc5740a917eb2a8b4d6356edbe016eee09f49c0781215844
-PKG_SITES:= https://github.com/libexpat/libexpat/releases/download/R_2_7_0/
+PKG_HASH:= 0cce2e6e69b327fc607b8ff264f4b66bdf71ead55a87ffd5f3143f535f15cfa2
+PKG_SITES:= https://github.com/libexpat/libexpat/releases/download/R_2_7_1/
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index af036de1a..51fc1fe8b 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -132,8 +132,10 @@ GCC_CONFOPTS+= --with-arch=$(ADK_TARGET_GCC_ARCH)
endif
ifneq ($(ADK_TARGET_FLOAT),)
+ifneq ($(ADK_TARGET_ARCH_OR1K),y)
GCC_CONFOPTS+= --with-float=$(ADK_TARGET_FLOAT)
endif
+endif
ifneq ($(ADK_TARGET_FPU),)
GCC_CONFOPTS+= --with-fpu=$(ADK_TARGET_FPU)
diff --git a/toolchain/gcc/Makefile.inc b/toolchain/gcc/Makefile.inc
index bc0740cc9..e88b0ed10 100644
--- a/toolchain/gcc/Makefile.inc
+++ b/toolchain/gcc/Makefile.inc
@@ -2,6 +2,14 @@
# material, please see the LICENCE file in the top-level directory.
PKG_NAME:= gcc
+ifeq ($(ADK_TOOLCHAIN_GCC_15),y)
+PKG_VERSION:= 15.1.0
+PKG_HASH:= 51b9919ea69c980d7a381db95d4be27edf73b21254eb13d752a08003b4d013b1
+PKG_SITES:= ${MASTER_SITE_GNU:=gcc/gcc-${PKG_VERSION}/}
+PKG_RELEASE:= 1
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
+LIBSTDCXXVER:= 30
+endif
ifeq ($(ADK_TOOLCHAIN_GCC_14),y)
PKG_VERSION:= 14.2.0
PKG_HASH:= 7d376d445f93126dc545e2c0086d0f647c3094aae081cdb78f42ce2bc25e7293
@@ -91,7 +99,7 @@ DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
LIBSTDCXXVER:= 20
endif
ifeq ($(ADK_TOOLCHAIN_GCC_ARC),y)
-PKG_VERSION:= arc-2023.09
+PKG_VERSION:= arc-2024.12
PKG_GIT:= tag
PKG_SITES:= https://github.com/foss-for-synopsys-dwc-arc-processors/gcc.git
PKG_RELEASE:= 1
diff --git a/toolchain/gcc/patches/15.1.0/add-crtreloc.frv b/toolchain/gcc/patches/15.1.0/add-crtreloc.frv
new file mode 100644
index 000000000..30de24cdc
--- /dev/null
+++ b/toolchain/gcc/patches/15.1.0/add-crtreloc.frv
@@ -0,0 +1,12 @@
+diff -Nur gcc-8.3.0.orig/gcc/config/frv/linux.h gcc-8.3.0/gcc/config/frv/linux.h
+--- gcc-8.3.0.orig/gcc/config/frv/linux.h 2018-01-03 11:03:58.000000000 +0100
++++ gcc-8.3.0/gcc/config/frv/linux.h 2019-10-08 10:52:00.176295821 +0200
+@@ -27,7 +27,7 @@
+
+ #undef STARTFILE_SPEC
+ #define STARTFILE_SPEC \
+- "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
++ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crtreloc.o%s \
+ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+
+ #undef ENDFILE_SPEC
diff --git a/toolchain/gcc/patches/15.1.0/csky.patch b/toolchain/gcc/patches/15.1.0/csky.patch
new file mode 100644
index 000000000..ee352951b
--- /dev/null
+++ b/toolchain/gcc/patches/15.1.0/csky.patch
@@ -0,0 +1,12 @@
+diff -Nur gcc-11.2.0.orig/libgcc/config/csky/linux-atomic.c gcc-11.2.0/libgcc/config/csky/linux-atomic.c
+--- gcc-11.2.0.orig/libgcc/config/csky/linux-atomic.c 2021-07-28 08:55:08.760307899 +0200
++++ gcc-11.2.0/libgcc/config/csky/linux-atomic.c 2021-12-14 14:19:23.685729233 +0100
+@@ -24,7 +24,7 @@
+ <http://www.gnu.org/licenses/>. */
+
+ /* Kernel helper for compare-and-exchange. */
+-inline int
++int
+ __kernel_cmpxchg (int oldval, int newval, volatile int *ptr)
+ {
+ register int _a0 asm ("a0") = oldval;
diff --git a/toolchain/gcc/patches/15.1.0/libgcc-fdpic-bfin.patch b/toolchain/gcc/patches/15.1.0/libgcc-fdpic-bfin.patch
new file mode 100644
index 000000000..df0b94fc9
--- /dev/null
+++ b/toolchain/gcc/patches/15.1.0/libgcc-fdpic-bfin.patch
@@ -0,0 +1,12 @@
+diff -Nur gcc-14.2.0.orig/libgcc/unwind-pe.h gcc-14.2.0/libgcc/unwind-pe.h
+--- gcc-14.2.0.orig/libgcc/unwind-pe.h 2024-08-01 10:17:17.000000000 +0200
++++ gcc-14.2.0/libgcc/unwind-pe.h 2025-03-10 10:40:25.191585648 +0100
+@@ -264,7 +264,7 @@
+
+ if (result != 0)
+ {
+-#if __FDPIC__
++#if defined(__FDPIC__) && !defined(__BFIN_FDPIC__)
+ /* FDPIC relative addresses imply taking the GOT address
+ into account. */
+ if ((encoding & DW_EH_PE_pcrel) && (encoding & DW_EH_PE_indirect))