From bb39f7d5563a90372db032c040a750344cf2e10b Mon Sep 17 00:00:00 2001 From: Hubert Badocha Date: Wed, 25 Sep 2024 18:22:39 +0200 Subject: [PATCH] toolchain: update GCC to 14.2.0 JIRA: RTOS-927 --- toolchain/build-toolchain.sh | 2 +- ... gcc-14.2.0-01-arm-phoenix-multilib.patch} | 9 ++- toolchain/gcc-14.2.0-02-i386-pc-phoenix.patch | 40 ++++++++++ toolchain/gcc-14.2.0-03-riscv64-phoenix.patch | 22 +++++ ...m.patch => gcc-14.2.0-04-disable_tm.patch} | 8 +- ...h => gcc-14.2.0-05-arm-pic_crtstuff.patch} | 30 +++---- ...pp.patch => gcc-14.2.0-06-libstdcpp.patch} | 80 ++++++++++++++----- ...atch => gcc-14.2.0-07-sparc-phoenix.patch} | 46 ++++++----- ...ch => gcc-14.2.0-08-sparc-mno-pditr.patch} | 70 ++++++++-------- ...=> gcc-14.2.0-09-sparc-pic_crtstuff.patch} | 29 ++++--- ...atch => gcc-14.2.0-10-fix-libc-spec.patch} | 8 +- ...c-14.2.0-11-armv-r-phoenix-multilib.patch} | 46 ++++++----- toolchain/gcc-9.5.0-02-i386-pc-phoenix.patch | 38 --------- toolchain/gcc-9.5.0-03-riscv64-phoenix.patch | 21 ----- 14 files changed, 249 insertions(+), 200 deletions(-) rename toolchain/{gcc-9.5.0-01-arm-phoenix-multilib.patch => gcc-14.2.0-01-arm-phoenix-multilib.patch} (75%) create mode 100644 toolchain/gcc-14.2.0-02-i386-pc-phoenix.patch create mode 100644 toolchain/gcc-14.2.0-03-riscv64-phoenix.patch rename toolchain/{gcc-9.5.0-04-disable_tm.patch => gcc-14.2.0-04-disable_tm.patch} (64%) rename toolchain/{gcc-9.5.0-05-arm-pic_crtstuff.patch => gcc-14.2.0-05-arm-pic_crtstuff.patch} (67%) rename toolchain/{gcc-9.5.0-06-libstdcpp.patch => gcc-14.2.0-06-libstdcpp.patch} (82%) rename toolchain/{gcc-9.5.0-07-sparc-phoenix.patch => gcc-14.2.0-07-sparc-phoenix.patch} (56%) rename toolchain/{gcc-9.5.0-08-sparc-mno-pditr.patch => gcc-14.2.0-08-sparc-mno-pditr.patch} (50%) rename toolchain/{gcc-9.5.0-09-sparc-pic_crtstuff.patch => gcc-14.2.0-09-sparc-pic_crtstuff.patch} (57%) rename toolchain/{gcc-9.5.0-10-fix-libc-spec.patch => gcc-14.2.0-10-fix-libc-spec.patch} (72%) rename toolchain/{gcc-9.5.0-11-armv-r-phoenix-multilib.patch => gcc-14.2.0-11-armv-r-phoenix-multilib.patch} (72%) delete mode 100644 toolchain/gcc-9.5.0-02-i386-pc-phoenix.patch delete mode 100644 toolchain/gcc-9.5.0-03-riscv64-phoenix.patch diff --git a/toolchain/build-toolchain.sh b/toolchain/build-toolchain.sh index c525efbb..c4d33097 100755 --- a/toolchain/build-toolchain.sh +++ b/toolchain/build-toolchain.sh @@ -66,7 +66,7 @@ fi #GCC=gcc-7.1.0 BINUTILS=binutils-2.43 -GCC=gcc-9.5.0 +GCC=gcc-14.2.0 TOOLCHAIN_PREFIX="${BUILD_ROOT}/${TARGET}" SYSROOT="${TOOLCHAIN_PREFIX}/${TARGET}" diff --git a/toolchain/gcc-9.5.0-01-arm-phoenix-multilib.patch b/toolchain/gcc-14.2.0-01-arm-phoenix-multilib.patch similarity index 75% rename from toolchain/gcc-9.5.0-01-arm-phoenix-multilib.patch rename to toolchain/gcc-14.2.0-01-arm-phoenix-multilib.patch index 71e12768..16184f38 100644 --- a/toolchain/gcc-9.5.0-01-arm-phoenix-multilib.patch +++ b/toolchain/gcc-14.2.0-01-arm-phoenix-multilib.patch @@ -1,6 +1,8 @@ ---- gcc-9.3.0-orig/gcc/config.gcc 2020-03-12 12:07:21.000000000 +0100 -+++ gcc-9.3.0/gcc/config.gcc 2020-03-18 19:25:57.937836171 +0100 -@@ -1205,7 +1205,9 @@ +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 95c91ee02be..7ad62278cfa 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1465,7 +1465,9 @@ arm*-*-phoenix*) tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h" tm_file="${tm_file} newlib-stdint.h phoenix.h" tm_file="${tm_file} arm/aout.h arm/arm.h" @@ -11,3 +13,4 @@ target_cpu_cname="arm7tdmi" ;; arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems* | arm*-*-fuchsia*) + diff --git a/toolchain/gcc-14.2.0-02-i386-pc-phoenix.patch b/toolchain/gcc-14.2.0-02-i386-pc-phoenix.patch new file mode 100644 index 00000000..c37a8389 --- /dev/null +++ b/toolchain/gcc-14.2.0-02-i386-pc-phoenix.patch @@ -0,0 +1,40 @@ +diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh +--- a/fixincludes/mkfixinc.sh ++++ b/fixincludes/mkfixinc.sh +@@ -11,6 +11,7 @@ target=fixinc.sh + + # Check for special fix rules for particular targets + case $machine in ++ *-phoenix* | \ + i?86-*-cygwin* | \ + i?86-*-mingw32* | \ + x86_64-*-mingw32* | \ +diff --git a/gcc/config.gcc b/gcc/config.gcc +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1934,6 +1934,9 @@ i[34567]86-*-elfiamcu) + i[34567]86-*-elf*) + tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h" + ;; ++i[34567]86-*-phoenix*) ++ tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h phoenix.h" ++ ;; + x86_64-*-elf*) + tm_file="${tm_file} i386/unix.h i386/att.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h" + ;; +diff --git a/libgcc/config.host b/libgcc/config.host +index e75a7af647f..9ec10581966 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -818,6 +818,10 @@ i[34567]86-pc-msdosdjgpp*) + ;; + i[34567]86-*-lynxos*) + ;; ++i[34567]86-*-phoenix*) ++ extra_parts="$extra_parts crti.o crtbegin.o crtend.o crtn.o" ++ tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic" ++ ;; + i[34567]86-*-nto-qnx*) + tmake_file="$tmake_file i386/t-nto t-libgcc-pic" + extra_parts=crtbegin.o + diff --git a/toolchain/gcc-14.2.0-03-riscv64-phoenix.patch b/toolchain/gcc-14.2.0-03-riscv64-phoenix.patch new file mode 100644 index 00000000..6dd17032 --- /dev/null +++ b/toolchain/gcc-14.2.0-03-riscv64-phoenix.patch @@ -0,0 +1,22 @@ +diff --git a/gcc/config.gcc b/gcc/config.gcc +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2509,13 +2509,16 @@ riscv*-*-linux*) + gcc_cv_initfini_array=yes + with_tls=${with_tls:-trad} + ;; +-riscv*-*-elf* | riscv*-*-rtems*) ++riscv*-*-elf* | riscv*-*-rtems* | riscv*-*-phoenix*) + tm_file="elfos.h newlib-stdint.h ${tm_file} riscv/elf.h" + case ${target} in + *-*-rtems*) + tm_file="${tm_file} riscv/rtems.h rtems.h" + tmake_file="${tmake_file} riscv/t-rtems" + ;; ++ *-*-phoenix*) ++ tm_file="${tm_file} phoenix.h" ++ ;; + *) + if test "x${with_multilib_generator}" = xdefault; then + case "x${enable_multilib}" in + diff --git a/toolchain/gcc-9.5.0-04-disable_tm.patch b/toolchain/gcc-14.2.0-04-disable_tm.patch similarity index 64% rename from toolchain/gcc-9.5.0-04-disable_tm.patch rename to toolchain/gcc-14.2.0-04-disable_tm.patch index 01643626..db836cd1 100644 --- a/toolchain/gcc-9.5.0-04-disable_tm.patch +++ b/toolchain/gcc-14.2.0-04-disable_tm.patch @@ -1,10 +1,10 @@ -diff --git gcc-9.3.0-orig/gcc/config/phoenix.h gcc-9.3.0/gcc/config/phoenix.h -index c1aad95..1985dde 100644 ---- gcc-9.3.0-orig/gcc/config/phoenix.h -+++ gcc-9.3.0/gcc/config/phoenix.h +diff --git a/gcc/config/phoenix.h b/gcc/config/phoenix.h +--- a/gcc/config/phoenix.h ++++ b/gcc/config/phoenix.h @@ -31,3 +31,5 @@ along with GCC; see the file COPYING3. If not see /* This will prevent selecting 'unsigned long int' instead of 'unsigned int' as 'uint32_t' in stdint-newlib.h. */ #undef STDINT_LONG32 #define STDINT_LONG32 0 +/* libitm is not supported on Phoenix - disable it in crtstuff */ +#define USE_TM_CLONE_REGISTRY 0 + diff --git a/toolchain/gcc-9.5.0-05-arm-pic_crtstuff.patch b/toolchain/gcc-14.2.0-05-arm-pic_crtstuff.patch similarity index 67% rename from toolchain/gcc-9.5.0-05-arm-pic_crtstuff.patch rename to toolchain/gcc-14.2.0-05-arm-pic_crtstuff.patch index 71e66ab8..e700638c 100644 --- a/toolchain/gcc-9.5.0-05-arm-pic_crtstuff.patch +++ b/toolchain/gcc-14.2.0-05-arm-pic_crtstuff.patch @@ -1,6 +1,18 @@ -diff -Naur gcc-9.3.0-orig/libgcc/config/arm/t-phoenix gcc-9.3.0/libgcc/config/arm/t-phoenix ---- gcc-9.3.0-orig/libgcc/config/arm/t-phoenix 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-9.3.0/libgcc/config/arm/t-phoenix 2021-08-23 13:40:28.290478307 +0200 +diff --git a/libgcc/config.host b/libgcc/config.host +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -556,6 +556,7 @@ arm*-*-uclinux*) # ARM ucLinux + arm*-*-phoenix*) + tmake_file="t-hardfp t-softfp arm/t-arm arm/t-elf arm/t-softfp arm/t-phoenix" + tmake_file="${tmake_file} arm/t-bpabi" ++ tmake_file="${tmake_file} t-crtstuff-pic t-libgcc-pic" + tm_file="$tm_file arm/bpabi-lib.h" + extra_parts="crtbegin.o crtend.o crti.o crtn.o" + unwind_header=config/arm/unwind-arm.h +diff --git a/libgcc/config/arm/t-phoenix b/libgcc/config/arm/t-phoenix +new file mode 100644 +--- /dev/null ++++ b/libgcc/config/arm/t-phoenix @@ -0,0 +1,13 @@ +# PhoenixRTOS uses relocatable ELFs on NOMMU platforms +# if this is ARM Cortex-M/R subvariant -> build libgcc/crtstuff with PIC @@ -15,14 +27,4 @@ diff -Naur gcc-9.3.0-orig/libgcc/config/arm/t-phoenix gcc-9.3.0/libgcc/config/ar + CRTSTUFF_T_CFLAGS = $(PICFLAG) -mno-pic-data-is-text-relative + INTERNAL_CFLAGS += $(PICFLAG) -mno-pic-data-is-text-relative +endif -diff -Naur gcc-9.3.0-orig/libgcc/config.host gcc-9.3.0/libgcc/config.host ---- gcc-9.3.0-orig/libgcc/config.host 2020-03-12 12:07:23.000000000 +0100 -+++ gcc-9.3.0/libgcc/config.host 2021-07-23 10:19:14.900201201 +0200 -@@ -454,6 +454,7 @@ - arm*-*-phoenix*) - tmake_file="t-hardfp t-softfp arm/t-arm arm/t-elf arm/t-softfp arm/t-phoenix" - tmake_file="${tmake_file} arm/t-bpabi" -+ tmake_file="${tmake_file} t-crtstuff-pic t-libgcc-pic" - tm_file="$tm_file arm/bpabi-lib.h" - extra_parts="crtbegin.o crtend.o crti.o crtn.o" - unwind_header=config/arm/unwind-arm.h + diff --git a/toolchain/gcc-9.5.0-06-libstdcpp.patch b/toolchain/gcc-14.2.0-06-libstdcpp.patch similarity index 82% rename from toolchain/gcc-9.5.0-06-libstdcpp.patch rename to toolchain/gcc-14.2.0-06-libstdcpp.patch index 40e43abb..814b52af 100644 --- a/toolchain/gcc-9.5.0-06-libstdcpp.patch +++ b/toolchain/gcc-14.2.0-06-libstdcpp.patch @@ -1,7 +1,7 @@ -diff -Naur gcc-9.3.0-orig/libstdc++-v3/configure gcc-9.3.0/libstdc++-v3/configure ---- gcc-9.3.0-orig/libstdc++-v3/configure 2020-03-12 12:07:24.000000000 +0100 -+++ cc-9.3.0/libstdc++-v3/configure 2023-02-24 13:44:47.346288244 +0100 -@@ -899,6 +899,7 @@ +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -921,6 +921,7 @@ enable_largefile with_target_subdir with_cross_host with_newlib @@ -9,7 +9,7 @@ diff -Naur gcc-9.3.0-orig/libstdc++-v3/configure gcc-9.3.0/libstdc++-v3/configur enable_maintainer_mode enable_shared enable_static -@@ -1653,6 +1654,7 @@ +@@ -1697,6 +1698,7 @@ Optional Packages: configuring in a subdirectory --with-cross-host=HOST configuring with a cross compiler --with-newlib assume newlib as a system C library @@ -17,7 +17,7 @@ diff -Naur gcc-9.3.0-orig/libstdc++-v3/configure gcc-9.3.0/libstdc++-v3/configur --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] -@@ -5447,6 +5449,13 @@ +@@ -5571,6 +5573,13 @@ if test "${with_newlib+set}" = set; then : fi @@ -31,7 +31,7 @@ diff -Naur gcc-9.3.0-orig/libstdc++-v3/configure gcc-9.3.0/libstdc++-v3/configur # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't # available). Uncomment the next line to force a particular method. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -@@ -9070,6 +9079,30 @@ +@@ -9239,6 +9248,30 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_static='-static' case $host_os in @@ -62,7 +62,7 @@ diff -Naur gcc-9.3.0-orig/libstdc++-v3/configure gcc-9.3.0/libstdc++-v3/configur aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then -@@ -9344,6 +9377,36 @@ +@@ -9513,6 +9546,36 @@ case $host_os in *djgpp*) lt_prog_compiler_pic= ;; @@ -99,17 +99,17 @@ diff -Naur gcc-9.3.0-orig/libstdc++-v3/configure gcc-9.3.0/libstdc++-v3/configur *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; -@@ -11757,6 +11820,9 @@ +@@ -11987,6 +12050,9 @@ else lt_cv_dlopen_libs= case $host_os in + phoenix*) + ;; -+ ++ beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= -@@ -13953,6 +14019,31 @@ +@@ -14235,6 +14301,31 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_static_CXX='-static' case $host_os in @@ -141,7 +141,7 @@ diff -Naur gcc-9.3.0-orig/libstdc++-v3/configure gcc-9.3.0/libstdc++-v3/configur aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then -@@ -14263,6 +14354,36 @@ +@@ -14545,6 +14636,36 @@ case $host_os in *djgpp*) lt_prog_compiler_pic_CXX= ;; @@ -178,13 +178,13 @@ diff -Naur gcc-9.3.0-orig/libstdc++-v3/configure gcc-9.3.0/libstdc++-v3/configur *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; -@@ -15466,6 +15587,13 @@ +@@ -15783,6 +15904,13 @@ if test "$enable_shared" = yes; then glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX" glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED" +elif test "$pic_mode" = yes; then + # It was not possible to use pic without shared libraries in the default configure file -+ # due to the above code. If the "shaded" option is not enabled, the selected ++ # due to the above code. If the "shaded" option is not enabled, the selected + # lt_prog_compiler_pic_CXX flags will not be propagated to makefiles. + + glibcxx_lt_pic_flag="-prefer-pic" @@ -192,7 +192,7 @@ diff -Naur gcc-9.3.0-orig/libstdc++-v3/configure gcc-9.3.0/libstdc++-v3/configur else glibcxx_lt_pic_flag= glibcxx_compiler_pic_flag= -@@ -28848,7 +28976,7 @@ +@@ -27336,7 +27464,7 @@ else # Construct crosses by hand, eliminating bits that need ld... # GLIBCXX_CHECK_MATH_SUPPORT @@ -201,10 +201,10 @@ diff -Naur gcc-9.3.0-orig/libstdc++-v3/configure gcc-9.3.0/libstdc++-v3/configur # on a hosted environment. if test "x${with_newlib}" = "xyes"; then os_include_dir="os/newlib" -@@ -28908,6 +29036,61 @@ - - $as_echo "#define HAVE_MEMALIGN 1" >>confdefs.h +@@ -28612,6 +28740,60 @@ _ACEOF + ;; + esac + elif test "x${with_libphoenix}" = "xyes"; then + os_include_dir="os/generic" + printf "%s\n" "#define HAVE_HYPOT 1" >>confdefs.h @@ -257,9 +257,47 @@ diff -Naur gcc-9.3.0-orig/libstdc++-v3/configure gcc-9.3.0/libstdc++-v3/configur + printf "%s\n" "#define HAVE_TANF 1" >>confdefs.h + + printf "%s\n" "#define HAVE_TANHF 1" >>confdefs.h -+ -+ printf "%s\n" "#define HAVE_STRTOLD 1" >>confdefs.h + - else ++ printf "%s\n" "#define HAVE_STRTOLD 1" >>confdefs.h + elif test "x$with_headers" != "xno"; then # Base decisions on target environment. +@@ -53875,6 +54057,9 @@ done + *) have_fcntl=yes ;; + esac + else ++ case "${host}" in ++ *-*-phoenix*) have_fcntl=yes ;; ++ *) + ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" + if test "x$ac_cv_func_fcntl" = xyes; then : + have_fcntl=yes +@@ -53882,6 +54067,8 @@ else + have_fcntl=no + fi + ++ ;; ++ esac + fi + if test "$have_fcntl" = "yes"; then + BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_FCNTL=1" +@@ -53906,6 +54093,9 @@ _ACEOF + *) have_getexecname=no ;; + esac + else ++ case "${host}" in ++ *-*-phoenix*) have_fcntl=yes ;; ++ *) + ac_fn_c_check_func "$LINENO" "getexecname" "ac_cv_func_getexecname" + if test "x$ac_cv_func_getexecname" = xyes; then : + have_getexecname=yes +@@ -53913,6 +54103,8 @@ else + have_getexecname=no + fi + ++ ;; ++ esac + fi + if test "$have_getexecname" = "yes"; then + BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_GETEXECNAME=1" + diff --git a/toolchain/gcc-9.5.0-07-sparc-phoenix.patch b/toolchain/gcc-14.2.0-07-sparc-phoenix.patch similarity index 56% rename from toolchain/gcc-9.5.0-07-sparc-phoenix.patch rename to toolchain/gcc-14.2.0-07-sparc-phoenix.patch index 4c936418..6dc7b495 100644 --- a/toolchain/gcc-9.5.0-07-sparc-phoenix.patch +++ b/toolchain/gcc-14.2.0-07-sparc-phoenix.patch @@ -1,6 +1,21 @@ -diff -Naur gcc-9.3.0-orig/gcc/config/sparc/t-phoenix gcc-9.3.0/gcc/config/sparc/t-phoenix ---- gcc-9.3.0-orig/gcc/config/sparc/t-phoenix -+++ gcc-9.3.0/gcc/config/sparc/t-phoenix +diff --git a/gcc/config.gcc b/gcc/config.gcc +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -3446,6 +3446,10 @@ sparc-*-rtems*) + tm_file="${tm_file} elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h" + tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems" + ;; ++sparc-*-phoenix*) ++ tm_file="${tm_file} elfos.h sparc/sysv4.h sparc/sp-elf.h phoenix.h newlib-stdint.h" ++ tmake_file="${tmake_file} sparc/t-sparc sparc/t-phoenix" ++ ;; + sparc-*-linux*) + tm_file="${tm_file} elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h" + extra_options="${extra_options} sparc/long-double-switch.opt" +diff --git a/gcc/config/sparc/t-phoenix b/gcc/config/sparc/t-phoenix +new file mode 100644 +--- /dev/null ++++ b/gcc/config/sparc/t-phoenix @@ -0,0 +1,14 @@ +MULTILIB_OPTIONS = mcpu=leon3 msoft-float mfix-gr712rc fPIC mno-pic-data-is-text-relative mpic-register=g6 +MULTILIB_DIRNAMES = leon3 soft gr712rc pic no-pditr pic-reg-g6 @@ -16,25 +31,11 @@ diff -Naur gcc-9.3.0-orig/gcc/config/sparc/t-phoenix gcc-9.3.0/gcc/config/sparc/ +# LEON3 no pic/pie +MULTILIB_REQUIRED += mcpu=leon3 +MULTILIB_REQUIRED += mcpu=leon3/msoft-float -diff -Naur gcc-9.3.0-orig/gcc/config.gcc gcc-9.3.0/gcc/config.gcc ---- gcc-9.3.0-orig/gcc/config.gcc 2020-03-12 12:07:21.000000000 +0100 -+++ gcc-9.3.0/gcc/config.gcc 2020-03-18 19:25:57.937836171 +0100 -@@ -3028,6 +3028,10 @@ - sparc-*-rtems*) - tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h" - tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems" - ;; -+sparc-*-phoenix*) -+ tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h phoenix.h newlib-stdint.h" -+ tmake_file="${tmake_file} sparc/t-sparc sparc/t-phoenix" -+ ;; - sparc-*-linux*) - tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h" -diff -Naur gcc-9.3.0-orig/libgcc/config.host gcc-9.3.0/libgcc/config.host ---- gcc-9.3.0-orig/libgcc/config.host 2020-03-12 12:07:23.000000000 +0100 -+++ gcc-9.3.0/libgcc/config.host 2020-03-18 15:31:59.377075283 +0100 -@@ -1312,7 +1312,11 @@ - sparc-*-rtems*) +diff --git a/libgcc/config.host b/libgcc/config.host +index 213c07f106a..d4e893d918e 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -1486,6 +1486,10 @@ sparc-*-rtems*) tmake_file="$tmake_file sparc/t-elf sparc/t-softmul t-crtfm t-fdpbit" extra_parts="$extra_parts crti.o crtn.o crtfastmath.o" ;; @@ -45,3 +46,4 @@ diff -Naur gcc-9.3.0-orig/libgcc/config.host gcc-9.3.0/libgcc/config.host sparc*-*-solaris2*) tmake_file="$tmake_file t-crtfm" extra_parts="$extra_parts crtfastmath.o" + diff --git a/toolchain/gcc-9.5.0-08-sparc-mno-pditr.patch b/toolchain/gcc-14.2.0-08-sparc-mno-pditr.patch similarity index 50% rename from toolchain/gcc-9.5.0-08-sparc-mno-pditr.patch rename to toolchain/gcc-14.2.0-08-sparc-mno-pditr.patch index cb8e6ed7..d20472f8 100644 --- a/toolchain/gcc-9.5.0-08-sparc-mno-pditr.patch +++ b/toolchain/gcc-14.2.0-08-sparc-mno-pditr.patch @@ -1,33 +1,31 @@ -diff -Naur gcc-9.3.0-orig/gcc/config/sparc/sparc.c gcc-9.3.0/gcc/config/sparc/sparc.c ---- gcc-9.3.0-orig/gcc/config/sparc/sparc.c -+++ gcc-9.3.0/gcc/config/sparc/sparc.c -@@ -575,6 +575,8 @@ struct GTY(()) machine_function +diff --git a/gcc/config/sparc/sparc.cc b/gcc/config/sparc/sparc.cc +--- a/gcc/config/sparc/sparc.cc ++++ b/gcc/config/sparc/sparc.cc +@@ -581,6 +581,8 @@ struct GTY(()) machine_function bool prologue_data_valid_p; }; -+static GTY(()) rtx got_register_rtx = NULL_RTX; ++static unsigned int sparc_got_register; + #define sparc_frame_size cfun->machine->frame_size #define sparc_apparent_frame_size cfun->machine->apparent_frame_size #define sparc_frame_base_reg cfun->machine->frame_base_reg -@@ -2116,6 +2118,16 @@ sparc_option_override (void) - if (!global_options_set.x_flag_ree && TARGET_ARCH32) +@@ -2177,6 +2179,14 @@ sparc_option_override (void) + if (!OPTION_SET_P (flag_ree) && TARGET_ARCH32) flag_ree = 0; + if (!sparc_pic_data_is_text_relative && !flag_pic) -+ error ("-mno-pic-data-is-text-relative cannot be used without -fpic/-fPIC"); ++ warning (0, "-mno-pic-data-is-text-relative cannot be used without -fpic/-fPIC"); /* Warning instead of error to handle special case of strub.c disabling pic during libgcc build. */ + + if (sparc_pic_register_string != NULL) + { -+ int pic_register = decode_reg_name (sparc_pic_register_string); -+ -+ got_register_rtx = gen_rtx_REG (Pmode, pic_register); ++ sparc_got_register = decode_reg_name (sparc_pic_register_string); + } + /* Do various machine dependent initializations. */ sparc_init_modes (); - -@@ -2219,6 +2231,9 @@ can_use_mov_pic_label_ref (rtx label) + +@@ -2280,6 +2290,9 @@ can_use_mov_pic_label_ref (rtx label) if (flag_reorder_blocks_and_partition) return false; @@ -37,28 +35,24 @@ diff -Naur gcc-9.3.0-orig/gcc/config/sparc/sparc.c gcc-9.3.0/gcc/config/sparc/sp return true; } -@@ -4242,6 +4257,5 @@ sparc_cannot_force_const_mem (machine_mode mode, rtx x) - /* Global Offset Table support. */ - static GTY(()) rtx got_symbol_rtx = NULL_RTX; --static GTY(()) rtx got_register_rtx = NULL_RTX; - static GTY(()) rtx got_helper_rtx = NULL_RTX; - - static GTY(()) bool got_helper_needed = false; -@@ -4314,6 +4325,9 @@ load_got_register (void) +@@ -4321,6 +4334,13 @@ load_got_register (void) { rtx insn; -+ if (!sparc_pic_data_is_text_relative) ++ if (!sparc_pic_data_is_text_relative) { ++ gcc_assert(flag_pic); ++ if (!got_register_rtx) ++ got_register_rtx = gen_rtx_REG (Pmode, sparc_got_register); + return; ++ } + if (TARGET_VXWORKS_RTP) { if (!got_register_rtx) - -diff -Naur gcc-9.3.0-orig/gcc/config/sparc/sparc.h gcc-9.3.0/gcc/config/sparc/sparc.h ---- gcc-9.3.0-orig/gcc/config/sparc/sparc.h -+++ gcc-9.3.0/gcc/config/sparc/sparc.h -@@ -810,6 +810,10 @@ along with GCC; see the file COPYING3. If not see +diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h +--- a/gcc/config/sparc/sparc.h ++++ b/gcc/config/sparc/sparc.h +@@ -791,6 +791,10 @@ along with GCC; see the file COPYING3. If not see #define PIC_OFFSET_TABLE_REGNUM \ (TARGET_VXWORKS_RTP && flag_pic ? GLOBAL_OFFSET_TABLE_REGNUM : INVALID_REGNUM) @@ -69,27 +63,26 @@ diff -Naur gcc-9.3.0-orig/gcc/config/sparc/sparc.h gcc-9.3.0/gcc/config/sparc/sp /* Pick a default value we can notice from override_options: !v9: Default is on. v9: Default is off. - -diff -Naur gcc-9.3.0-orig/gcc/config/sparc/sparc.opt gcc-9.3.0/gcc/config/sparc/sparc.opt ---- gcc-9.3.0-orig/gcc/config/sparc/sparc.opt -+++ gcc-9.3.0/gcc/config/sparc/sparc.opt -@@ -321,3 +321,11 @@ Enum(sparc_memory_model) String(tso) Value(SMM_TSO) +diff --git a/gcc/config/sparc/sparc.opt b/gcc/config/sparc/sparc.opt +index afede3f40ce..c0ab020a4b6 100644 +--- a/gcc/config/sparc/sparc.opt ++++ b/gcc/config/sparc/sparc.opt +@@ -324,3 +324,11 @@ Enum(sparc_memory_model) String(tso) Value(SMM_TSO) EnumValue Enum(sparc_memory_model) String(sc) Value(SMM_SC) + +mpic-data-is-text-relative -+Target Report Var(sparc_pic_data_is_text_relative) Init(TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE) ++Target Var(sparc_pic_data_is_text_relative) Init(TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE) +Assume data segments are relative to text segment. + +mpic-register= +Target RejectNegative Joined Var(sparc_pic_register_string) +Specify the register to be used for PIC addressing. - -diff -Naur gcc-9.3.0-orig/gcc/configure gcc-9.3.0/gcc/configure ---- gcc-9.3.0-orig/gcc/configure -+++ gcc-9.3.0/gcc/configure -@@ -25548,11 +25548,11 @@ bar: +diff --git a/gcc/configure b/gcc/configure +--- a/gcc/configure ++++ b/gcc/configure +@@ -28698,11 +28698,11 @@ bar: fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_sparc_gotdata_op" >&5 $as_echo "$gcc_cv_as_sparc_gotdata_op" >&6; } @@ -104,3 +97,4 @@ diff -Naur gcc-9.3.0-orig/gcc/configure gcc-9.3.0/gcc/configure { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for unaligned pcrel relocs" >&5 + diff --git a/toolchain/gcc-9.5.0-09-sparc-pic_crtstuff.patch b/toolchain/gcc-14.2.0-09-sparc-pic_crtstuff.patch similarity index 57% rename from toolchain/gcc-9.5.0-09-sparc-pic_crtstuff.patch rename to toolchain/gcc-14.2.0-09-sparc-pic_crtstuff.patch index 339afaa2..8314bf2c 100644 --- a/toolchain/gcc-9.5.0-09-sparc-pic_crtstuff.patch +++ b/toolchain/gcc-14.2.0-09-sparc-pic_crtstuff.patch @@ -1,19 +1,22 @@ -diff -Naur gcc-9.3.0-orig/libgcc/config/sparc/t-phoenix gcc-9.3.0/libgcc/config/sparc/t-phoenix ---- gcc-9.3.0-orig/libgcc/config/sparc/t-phoenix -+++ gcc-9.3.0/libgcc/config/sparc/t-phoenix -@@ -0,0 +1,5 @@ -+# Phoenix-RTOS uses relocatable ELFs on NOMMU platforms -+# On SPARC without MMU -> build crtstuff with PIC -+ifneq (,$(findstring pic,$(CC))) -+ CRTSTUFF_T_CFLAGS = $(PICFLAG) -mcpu=leon3 -mno-pic-data-is-text-relative -mpic-register=g6 -+endif -diff -Naur gcc-9.3.0-orig/libgcc/config.host gcc-9.3.0/libgcc/config.host ---- gcc-9.3.0-orig/libgcc/config.host -+++ gcc-9.3.0/libgcc/config.host -@@ -1316,5 +1316,6 @@ +diff --git a/libgcc/config.host b/libgcc/config.host +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -1488,6 +1488,7 @@ sparc-*-rtems*) + ;; sparc-*-phoenix*) tmake_file="$tmake_file sparc/t-softmul t-fdpbit" + tmake_file="$tmake_file sparc/t-phoenix t-crtstuff-pic t-libgcc-pic" extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o" ;; sparc*-*-solaris2*) +diff --git a/libgcc/config/sparc/t-phoenix b/libgcc/config/sparc/t-phoenix +new file mode 100644 +--- /dev/null ++++ b/libgcc/config/sparc/t-phoenix +@@ -0,0 +1,5 @@ ++# Phoenix-RTOS uses relocatable ELFs on NOMMU platforms ++# On SPARC without MMU -> build crtstuff with PIC ++ifneq (,$(findstring pic,$(CC))) ++ CRTSTUFF_T_CFLAGS = $(PICFLAG) -mcpu=leon3 -mno-pic-data-is-text-relative -mpic-register=g6 ++endif + diff --git a/toolchain/gcc-9.5.0-10-fix-libc-spec.patch b/toolchain/gcc-14.2.0-10-fix-libc-spec.patch similarity index 72% rename from toolchain/gcc-9.5.0-10-fix-libc-spec.patch rename to toolchain/gcc-14.2.0-10-fix-libc-spec.patch index 69b00e92..fe92bd4e 100644 --- a/toolchain/gcc-9.5.0-10-fix-libc-spec.patch +++ b/toolchain/gcc-14.2.0-10-fix-libc-spec.patch @@ -1,6 +1,7 @@ ---- gcc-9.5.0/gcc/config/phoenix.h 2023-09-20 13:34:58.528162463 +0200 -+++ gcc-9.5.0.phoenix/gcc/config/phoenix.h 2023-09-20 11:15:19.083504061 +0200 -@@ -26,7 +26,9 @@ +diff --git a/gcc/config/phoenix.h b/gcc/config/phoenix.h +--- a/gcc/config/phoenix.h ++++ b/gcc/config/phoenix.h +@@ -26,7 +26,9 @@ along with GCC; see the file COPYING3. If not see builtin_assert ("system=unix"); \ } while (0) @@ -11,3 +12,4 @@ /* This will prevent selecting 'unsigned long int' instead of 'unsigned int' as 'uint32_t' in stdint-newlib.h. */ #undef STDINT_LONG32 + diff --git a/toolchain/gcc-9.5.0-11-armv-r-phoenix-multilib.patch b/toolchain/gcc-14.2.0-11-armv-r-phoenix-multilib.patch similarity index 72% rename from toolchain/gcc-9.5.0-11-armv-r-phoenix-multilib.patch rename to toolchain/gcc-14.2.0-11-armv-r-phoenix-multilib.patch index a655c9b1..fa6eaec2 100644 --- a/toolchain/gcc-9.5.0-11-armv-r-phoenix-multilib.patch +++ b/toolchain/gcc-14.2.0-11-armv-r-phoenix-multilib.patch @@ -1,16 +1,15 @@ diff --git a/gcc/config/arm/t-multilib b/gcc/config/arm/t-multilib -index 87069f71ecc..d1c1d2f0132 100644 --- a/gcc/config/arm/t-multilib +++ b/gcc/config/arm/t-multilib -@@ -77,6 +77,7 @@ v8_2_a_simd_variants := $(call all_feat_combs, simd fp16 fp16fml crypto dotprod) - v8_4_a_simd_variants := $(call all_feat_combs, simd fp16 crypto) - v8_5_a_simd_variants := $(call all_feat_combs, simd fp16 crypto) +@@ -78,6 +78,7 @@ v8_4_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16) + v8_5_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16) + v8_6_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16) v8_r_nosimd_variants := +crc +v8_r_simd_variants := $(call all_feat_combs, crc simd crypto) + v9_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16) ifneq (,$(HAS_APROFILE)) - include $(srcdir)/config/arm/t-aprofile -@@ -107,12 +108,11 @@ MULTILIB_REQUIRED += mthumb/march=armv7+fp/mfloat-abi=hard +@@ -109,12 +110,11 @@ MULTILIB_REQUIRED += mthumb/march=armv7+fp/mfloat-abi=hard MULTILIB_REQUIRED += mthumb/march=armv7-r+fp.sp/mfloat-abi=softfp MULTILIB_REQUIRED += mthumb/march=armv7-r+fp.sp/mfloat-abi=hard @@ -27,7 +26,7 @@ index 87069f71ecc..d1c1d2f0132 100644 # Map v7-r single precision variants to v7-r with single precision. MULTILIB_MATCHES += $(foreach ARCH, \ $(filter-out +fp.sp, $(v7_r_sp_variants)), \ -@@ -120,13 +120,13 @@ MULTILIB_MATCHES += $(foreach ARCH, \ +@@ -122,13 +122,13 @@ MULTILIB_MATCHES += $(foreach ARCH, \ MULTILIB_MATCHES += $(foreach ARCH, $(all_early_arch), \ march?armv5te+fp=march?$(ARCH)+fp) @@ -47,7 +46,7 @@ index 87069f71ecc..d1c1d2f0132 100644 MULTILIB_MATCHES += march?armv7-r+fp.sp=march?armv8-r+fp.sp MULTILIB_MATCHES += march?armv7-r+fp.sp=march?armv8-r+crc+fp.sp -@@ -199,13 +199,15 @@ endif # Not APROFILE. +@@ -214,13 +214,15 @@ endif # Not APROFILE. # Use Thumb libraries for everything. MULTILIB_REUSE += mthumb/march.armv7/mfloat-abi.soft=marm/march.armv7/mfloat-abi.soft @@ -66,21 +65,20 @@ index 87069f71ecc..d1c1d2f0132 100644 mthumb/march.$(ARCH)/mfloat-abi.soft=m$(MODE)/march.$(ARCH)/mfloat-abi.softfp)) diff --git a/gcc/config/arm/t-rmprofile b/gcc/config/arm/t-rmprofile -index 807e69eaf78..7b78d7b67bf 100644 --- a/gcc/config/arm/t-rmprofile +++ b/gcc/config/arm/t-rmprofile @@ -27,8 +27,8 @@ # Arch and FPU variants to build libraries with --MULTI_ARCH_OPTS_RM = march=armv6s-m/march=armv7-m/march=armv7e-m/march=armv7e-m+fp/march=armv7e-m+fp.dp/march=armv8-m.base/march=armv8-m.main/march=armv8-m.main+fp/march=armv8-m.main+fp.dp --MULTI_ARCH_DIRS_RM = v6-m v7-m v7e-m v7e-m+fp v7e-m+dp v8-m.base v8-m.main v8-m.main+fp v8-m.main+dp -+MULTI_ARCH_OPTS_RM = march=armv6s-m/march=armv7-m/march=armv7e-m/march=armv7e-m+fp/march=armv7e-m+fp.dp/march=armv8-m.base/march=armv8-m.main/march=armv8-m.main+fp/march=armv8-m.main+fp.dp/march=armv7-r/march=armv7-r+fp/march=armv8-r/march=armv8-r+simd -+MULTI_ARCH_DIRS_RM = v6-m v7-m v7e-m v7e-m+fp v7e-m+dp v8-m.base v8-m.main v8-m.main+fp v8-m.main+dp v7-r v7-r+fp v8-r v8r+simd +-MULTI_ARCH_OPTS_RM = march=armv6s-m/march=armv7-m/march=armv7e-m/march=armv7e-m+fp/march=armv7e-m+fp.dp/march=armv8-m.base/march=armv8-m.main/march=armv8-m.main+fp/march=armv8-m.main+fp.dp/march=armv8.1-m.main+mve/march=armv8.1-m.main+pacbti/march=armv8.1-m.main+pacbti+fp/march=armv8.1-m.main+pacbti+fp.dp/march=armv8.1-m.main+pacbti+mve +-MULTI_ARCH_DIRS_RM = v6-m v7-m v7e-m v7e-m+fp v7e-m+dp v8-m.base v8-m.main v8-m.main+fp v8-m.main+dp v8.1-m.main+mve v8.1-m.main+pacbti v8.1-m.main+pacbti+fp v8.1-m.main+pacbti+dp v8.1-m.main+pacbti+mve ++MULTI_ARCH_OPTS_RM = march=armv6s-m/march=armv7-m/march=armv7e-m/march=armv7e-m+fp/march=armv7e-m+fp.dp/march=armv8-m.base/march=armv8-m.main/march=armv8-m.main+fp/march=armv8-m.main+fp.dp/march=armv8.1-m.main+mve/march=armv8.1-m.main+pacbti/march=armv8.1-m.main+pacbti+fp/march=armv8.1-m.main+pacbti+fp.dp/march=armv8.1-m.main+pacbti+mve/march=armv7-r/march=armv7-r+fp/march=armv8-r/march=armv8-r+simd ++MULTI_ARCH_DIRS_RM = v6-m v7-m v7e-m v7e-m+fp v7e-m+dp v8-m.base v8-m.main v8-m.main+fp v8-m.main+dp v8.1-m.main+mve v8.1-m.main+pacbti v8.1-m.main+pacbti+fp v8.1-m.main+pacbti+dp v8.1-m.main+pacbti+mve v7-r v7-r+fp v8-r v8r+simd - # Base M-profile (no fp) - MULTILIB_REQUIRED += mthumb/march=armv6s-m/mfloat-abi=soft -@@ -36,6 +36,8 @@ MULTILIB_REQUIRED += mthumb/march=armv7-m/mfloat-abi=soft + MULTI_ARCH_OPTS_RM += mbranch-protection=standard + MULTI_ARCH_DIRS_RM += bp +@@ -39,6 +39,8 @@ MULTILIB_REQUIRED += mthumb/march=armv7-m/mfloat-abi=soft MULTILIB_REQUIRED += mthumb/march=armv7e-m/mfloat-abi=soft MULTILIB_REQUIRED += mthumb/march=armv8-m.base/mfloat-abi=soft MULTILIB_REQUIRED += mthumb/march=armv8-m.main/mfloat-abi=soft @@ -89,9 +87,9 @@ index 807e69eaf78..7b78d7b67bf 100644 # ARMv7e-M with FP (single and double precision variants) MULTILIB_REQUIRED += mthumb/march=armv7e-m+fp/mfloat-abi=hard -@@ -49,6 +51,13 @@ MULTILIB_REQUIRED += mthumb/march=armv8-m.main+fp/mfloat-abi=softfp - MULTILIB_REQUIRED += mthumb/march=armv8-m.main+fp.dp/mfloat-abi=hard - MULTILIB_REQUIRED += mthumb/march=armv8-m.main+fp.dp/mfloat-abi=softfp +@@ -60,6 +62,15 @@ MULTILIB_REQUIRED += mthumb/march=armv8.1-m.main+pacbti+fp.dp/mbranch-protection + MULTILIB_REQUIRED += mthumb/march=armv8.1-m.main+pacbti+fp.dp/mbranch-protection=standard/mfloat-abi=hard + MULTILIB_REQUIRED += mthumb/march=armv8.1-m.main+pacbti+mve/mbranch-protection=standard/mfloat-abi=hard +# ARMv7-R +MULTILIB_REQUIRED += mthumb/march=armv7-r+fp/mfloat-abi=hard @@ -100,10 +98,12 @@ index 807e69eaf78..7b78d7b67bf 100644 +# ARMv8-R +MULTILIB_REQUIRED += mthumb/march=armv8-r+simd/mfloat-abi=hard +MULTILIB_REQUIRED += mthumb/march=armv8-r+simd/mfloat-abi=softfp - - ++ ++ # Arch Matches -@@ -63,6 +72,6 @@ MULTILIB_MATCHES += march?armv8-m.main=march?armv8-m.main+dsp \ + MULTILIB_MATCHES += march?armv6s-m=march?armv6-m + +@@ -77,7 +88,7 @@ MULTILIB_MATCHES += march?armv8-m.main=mlibarch?armv8-m.main+dsp \ MULTILIB_MATCHES += march?armv7e-m+fp=march?armv7e-m+fpv5 # Softfp but no FP. Use the soft-float libraries. @@ -111,3 +111,5 @@ index 807e69eaf78..7b78d7b67bf 100644 +MULTILIB_REUSE += $(foreach ARCH, armv6s-m armv7-m armv7e-m armv8-m\.base armv8-m\.main armv7-r armv8-r, \ mthumb/march.$(ARCH)/mfloat-abi.soft=mthumb/march.$(ARCH)/mfloat-abi.softfp) + # Map v8.1-M to v8-M. + diff --git a/toolchain/gcc-9.5.0-02-i386-pc-phoenix.patch b/toolchain/gcc-9.5.0-02-i386-pc-phoenix.patch deleted file mode 100644 index 6d2eda6a..00000000 --- a/toolchain/gcc-9.5.0-02-i386-pc-phoenix.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -Naur gcc-9.3.0-orig/fixincludes/mkfixinc.sh gcc-9.3.0/fixincludes/mkfixinc.sh ---- gcc-9.3.0-orig/fixincludes/mkfixinc.sh 2020-03-12 12:07:20.000000000 +0100 -+++ gcc-9.3.0/fixincludes/mkfixinc.sh 2020-03-18 15:31:59.377075283 +0100 -@@ -11,6 +11,7 @@ - - # Check for special fix rules for particular targets - case $machine in -+ *-phoenix* | \ - i?86-*-cygwin* | \ - i?86-*-mingw32* | \ - x86_64-*-mingw32* | \ -diff -Naur gcc-9.3.0-orig/gcc/config.gcc gcc-9.3.0/gcc/config.gcc ---- gcc-9.3.0-orig/gcc/config.gcc 2020-03-12 12:07:21.000000000 +0100 -+++ gcc-9.3.0/gcc/config.gcc 2020-03-18 19:25:57.937836171 +0100 -@@ -1637,6 +1637,9 @@ - i[34567]86-*-elf*) - tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h" - ;; -+i[34567]86-*-phoenix*) -+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h phoenix.h" -+ ;; - x86_64-*-elf*) - tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h" - ;; -diff -Naur gcc-9.3.0-orig/libgcc/config.host gcc-9.3.0/libgcc/config.host ---- gcc-9.3.0-orig/libgcc/config.host 2020-03-12 12:07:23.000000000 +0100 -+++ gcc-9.3.0/libgcc/config.host 2020-03-18 15:31:59.377075283 +0100 -@@ -695,6 +695,10 @@ - ;; - i[34567]86-*-lynxos*) - ;; -+i[34567]86-*-phoenix*) -+ extra_parts="$extra_parts crti.o crtbegin.o crtend.o crtn.o" -+ tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic" -+ ;; - i[34567]86-*-nto-qnx*) - tmake_file="$tmake_file i386/t-nto t-libgcc-pic" - extra_parts=crtbegin.o diff --git a/toolchain/gcc-9.5.0-03-riscv64-phoenix.patch b/toolchain/gcc-9.5.0-03-riscv64-phoenix.patch deleted file mode 100644 index e8f96c2b..00000000 --- a/toolchain/gcc-9.5.0-03-riscv64-phoenix.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Naur --exclude '*build*' --exclude '*gmp*' --exclude '*mpfr*' --exclude '*isl*' --exclude '*mpc*' gcc-9.3.0-orig/gcc/config.gcc gcc-9.3.0/gcc/config.gcc ---- gcc-9.3.0-orig/gcc/config.gcc 2020-10-19 13:24:43.512413024 +0200 -+++ gcc-9.3.0/gcc/config.gcc 2020-10-19 13:41:49.274895804 +0200 -@@ -2218,13 +2218,16 @@ - # automatically detect that GAS supports it, yet we require it. - gcc_cv_initfini_array=yes - ;; --riscv*-*-elf* | riscv*-*-rtems*) -+riscv*-*-elf* | riscv*-*-rtems* | riscv*-*-phoenix*) - tm_file="elfos.h newlib-stdint.h ${tm_file} riscv/elf.h" - case ${target} in - *-*-rtems*) - tm_file="${tm_file} rtems.h riscv/rtems.h" - tmake_file="${tmake_file} riscv/t-rtems" - ;; -+ *-*-phoenix*) -+ tm_file="${tm_file} phoenix.h" -+ ;; - *) - case "x${enable_multilib}" in - xno) ;;