diff --git a/makes/include-target.mk b/makes/include-target.mk index 770e700a..2d3c9791 100644 --- a/makes/include-target.mk +++ b/makes/include-target.mk @@ -56,6 +56,15 @@ ifneq (,$(filter $(TARGETS_ARM8CORTEXR),$(TARGET_FAMILY)-$(TARGET_SUBFAMILY))) TARGET_SUFF ?= armv8r endif +# ARM multilib +TARGETS_ARMMULTILIB := \ + arm-multilib + +TARGETS += $(TARGETS_ARMMULTILIB) +ifneq (,$(filter $(TARGETS_ARMMULTILIB),$(TARGET_FAMILY)-$(TARGET_SUBFAMILY))) + TARGET_SUFF ?= arm-multilib +endif + # IA32 TARGETS_IA32 := ia32-generic diff --git a/target/arm-multilib.mk b/target/arm-multilib.mk new file mode 100644 index 00000000..78eaf2f8 --- /dev/null +++ b/target/arm-multilib.mk @@ -0,0 +1,43 @@ +# +# Makefile for Phoenix-RTOS 3 +# +# ARM Multilib options +# +# Copyright 2025 Phoenix Systems +# + +CROSS ?= arm-phoenix- + +CC := $(CROSS)gcc +CXX := $(CROSS)g++ + +# common CFLAGS +OLVL ?= -O2 +CFLAGS += -fomit-frame-pointer -mno-unaligned-access + +LDFLAGS := -Wl,-z,max-page-size=0x10 + +# CFLAGS are passed via the last part of TARGET +MULTI_FLAGS := $(subst $(TARGET_FAMILY)-$(TARGET_SUBFAMILY)-,,$(TARGET)) + +CFLAGS += $(subst @, -, $(MULTI_FLAGS)) + +CXXFLAGS := $(CFLAGS) + +AR := $(CROSS)ar +ARFLAGS := -r + +LD := $(CROSS)gcc +LDFLAGS_PREFIX := -Wl, + +OBJCOPY := $(CROSS)objcopy +OBJDUMP := $(CROSS)objdump + +STRIP := $(CROSS)strip + +# Choose if target has MMU based on fPIC flag from multilib. +ifeq ($(subst fPIC,,$(CFLAGS)), $(CFLAGS)) +HAVE_MMU := y +else +HAVE_MMU := n +endif diff --git a/toolchain/binutils-2.43-05-arm-phoenix-emul-fdpic.patch b/toolchain/binutils-2.43-05-arm-phoenix-emul-fdpic.patch new file mode 100644 index 00000000..01c954fc --- /dev/null +++ b/toolchain/binutils-2.43-05-arm-phoenix-emul-fdpic.patch @@ -0,0 +1,82 @@ +diff --git a/bfd/config.bfd b/bfd/config.bfd +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -410,7 +410,7 @@ case "${targ}" in + ;; + arm-*-phoenix*) + targ_defvec=arm_elf32_le_vec +- targ_selvecs=arm_elf32_be_vec ++ targ_selvecs="arm_elf32_be_vec arm_elf32_fdpic_le_vec arm_elf32_fdpic_be_vec" + ;; + armeb-*-elf | arm*b-*-freebsd* | arm*b-*-linux-* | armeb-*-eabi*) + targ_defvec=arm_elf32_be_vec +diff --git a/ld/Makefile.am b/ld/Makefile.am +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -174,6 +174,7 @@ ALL_EMULATION_SOURCES = \ + earmelf_nacl.c \ + earmelf_nbsd.c \ + earmelf_phoenix.c \ ++ earmelf_phoenix_fdpiceabi.c \ + earmelf_vxworks.c \ + earmelfb.c \ + earmelfb_fbsd.c \ +diff --git a/ld/Makefile.in b/ld/Makefile.in +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -685,6 +685,7 @@ ALL_EMULATION_SOURCES = \ + earmelf_nacl.c \ + earmelf_nbsd.c \ + earmelf_phoenix.c \ ++ earmelf_phoenix_fdpiceabi.c \ + earmelf_vxworks.c \ + earmelfb.c \ + earmelfb_fbsd.c \ +@@ -1311,6 +1312,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nacl.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_phoenix.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_phoenix_fdpiceabi.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_vxworks.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_fbsd.Po@am__quote@ +diff --git a/ld/configure.tgt b/ld/configure.tgt +--- a/ld/configure.tgt ++++ b/ld/configure.tgt +@@ -200,7 +200,7 @@ arm-*-nto*) targ_emul=armnto + ;; + arm-*-phoenix*) + targ_emul=armelf_phoenix +- targ_extra_emuls="armelf" ++ targ_extra_emuls="armelf armelf_phoenix_fdpiceabi" + targ_extra_libpath=$targ_extra_emuls + ;; + armeb-*-elf | armeb-*-eabi*) +diff --git a/ld/emulparams/armelf_phoenix_fdpiceabi.sh b/ld/emulparams/armelf_phoenix_fdpiceabi.sh +--- /dev/null ++++ b/ld/emulparams/armelf_phoenix_fdpiceabi.sh +@@ -0,0 +1,12 @@ ++source_sh ${srcdir}/emulparams/armelf_phoenix.sh ++ ++OUTPUT_FORMAT="elf32-littlearm-fdpic" ++BIG_OUTPUT_FORMAT="elf32-bigarm-fdpic" ++LITTLE_OUTPUT_FORMAT="elf32-littlearm-fdpic" ++ ++OTHER_READONLY_SECTIONS="${OTHER_READONLY_SECTIONS} ++ .rofixup : { ++ ${RELOCATING+__ROFIXUP_LIST__ = .;} ++ *(.rofixup) ++ ${RELOCATING+__ROFIXUP_END__ = .;} ++}" +diff --git a/ld/po/BLD-POTFILES.in b/ld/po/BLD-POTFILES.in +--- a/ld/po/BLD-POTFILES.in ++++ b/ld/po/BLD-POTFILES.in +@@ -36,6 +36,7 @@ earmelf_linux_fdpiceabi.c + earmelf_nacl.c + earmelf_nbsd.c + earmelf_phoenix.c ++earmelf_phoenix_fdpiceabi.c + earmelf_vxworks.c + earmelfb.c + earmelfb_fbsd.c + diff --git a/toolchain/build-toolchain.sh b/toolchain/build-toolchain.sh index 993a4cc9..cebb5c6b 100755 --- a/toolchain/build-toolchain.sh +++ b/toolchain/build-toolchain.sh @@ -62,12 +62,8 @@ if command -v "${TARGET}-gcc" > /dev/null; then exit 1 fi -# old legacy versions of the compiler: -#BINUTILS=binutils-2.28 -#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}" @@ -140,6 +136,7 @@ build_gcc_stage1() { # --enable-initfini-array -> force init/fini array support instead of .init .fini sections # --disable-decimal-float -> not relevant for other than i386 and PowerPC # --disable-libquadmath -> not using fortran and quad floats + # --disable-tm-clone-registry -> no support for Transactional Memory # --enable-threads=posix -> enable POSIX threads @@ -154,7 +151,8 @@ build_gcc_stage1() { --disable-decimal-float \ --disable-libquadmath \ --disable-libssp --disable-nls \ - --enable-threads=posix + --enable-threads=posix \ + --disable-tm-clone-registry make all-gcc @@ -175,12 +173,20 @@ build_libc() { mkdir -p "${SYSROOT}/usr/include" ln -snf usr/include "${SYSROOT}/include" + if [ "$TARGET" = "arm-phoenix" ]; then + for multilib_target in $("$TARGET-gcc" -print-multi-lib); do + multilib_flags=${multilib_target/*;/} + phx_targets="$phx_targets arm-multilib-$multilib_flags" + done + fi + # Overwrite multilibs with Phoenix targets when available. + phx_targets="$phx_targets $PHOENIX_TARGETS" + # NOCHECKENV: don't check if build env is sane - we're building only necessary components by hand - for phx_target in $PHOENIX_TARGETS; do + for phx_target in $phx_targets; do log "[$phx_target] installing kernel headers" make -C "$SCRIPT_DIR/../../phoenix-rtos-kernel" NOCHECKENV=1 TARGET="$phx_target" install-headers - # FIXME: libphoenix should be installed for all supported multilib target variants log "[$phx_target] installing libphoenix" make -C "$SCRIPT_DIR/../../libphoenix" NOCHECKENV=1 TARGET="$phx_target" clean install done @@ -227,7 +233,6 @@ build_libstdcpp() { # LIBSTDC++ compilation options # --host -> target is a host for libstdc++ # --with-gxx-include-dir -> configure as a subdir of sysroot for c++ includes to work with external (out-of-toolchain) sysroot - # --with-libphoenix -> use libphoenix as standard C library # --enable-tls -> enable Thread Local Storage # --disable-nls -> all compiler messages will be in english # --disable-shared -> disable building shared libraries [default=yes] @@ -239,7 +244,6 @@ build_libstdcpp() { --host="${TARGET}" \ --prefix="${SYSROOT}" \ --with-gxx-include-dir="${SYSROOT}/include/c++" \ - --with-libphoenix \ --enable-tls \ --disable-nls \ --disable-shared \ 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-05-arm-pic_crtstuff.patch b/toolchain/gcc-14.2.0-04-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-04-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-04-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-05-libstdcpp.patch similarity index 60% rename from toolchain/gcc-9.5.0-06-libstdcpp.patch rename to toolchain/gcc-14.2.0-05-libstdcpp.patch index 40e43abb..e889c567 100644 --- a/toolchain/gcc-9.5.0-06-libstdcpp.patch +++ b/toolchain/gcc-14.2.0-05-libstdcpp.patch @@ -1,37 +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 @@ - with_target_subdir - with_cross_host - with_newlib -+with_libphoenix - enable_maintainer_mode - enable_shared - enable_static -@@ -1653,6 +1654,7 @@ - configuring in a subdirectory - --with-cross-host=HOST configuring with a cross compiler - --with-newlib assume newlib as a system C library -+ --with-libphoenix assume libphoenix as a system C library - --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 @@ - fi - - -+# Check whether --with-libphoenix was given. -+if test ${with_libphoenix+y} -+then : -+ withval=$with_libphoenix; -+fi -+ -+ - # 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 @@ +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -9239,6 +9239,30 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_static='-static' case $host_os in @@ -62,7 +32,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 +9537,36 @@ case $host_os in *djgpp*) lt_prog_compiler_pic= ;; @@ -99,17 +69,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 +12041,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 +14292,31 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } lt_prog_compiler_static_CXX='-static' case $host_os in @@ -141,7 +111,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 +14627,36 @@ case $host_os in *djgpp*) lt_prog_compiler_pic_CXX= ;; @@ -178,13 +148,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 +15895,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,74 +162,104 @@ 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 @@ - # Construct crosses by hand, eliminating bits that need ld... - # GLIBCXX_CHECK_MATH_SUPPORT +@@ -50574,6 +50693,61 @@ _ACEOF -- # First, test for "known" system libraries. We may be using newlib even -+ # First, test for "known" system libraries. We may be using newlib or libphoenix even - # 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 -+ elif test "x${with_libphoenix}" = "xyes"; then -+ os_include_dir="os/generic" -+ printf "%s\n" "#define HAVE_HYPOT 1" >>confdefs.h ++ ;; ++ *-phoenix*) ++ os_include_dir="os/generic" ++ printf "%s\n" "#define HAVE_HYPOT 1" >>confdefs.h + + -+ # GLIBCXX_CHECK_STDLIB_SUPPORT -+ printf "%s\n" "#define HAVE_STRTOF 1" >>confdefs.h ++ # GLIBCXX_CHECK_STDLIB_SUPPORT ++ printf "%s\n" "#define HAVE_STRTOF 1" >>confdefs.h + + -+ printf "%s\n" "#define HAVE_ACOSF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_ACOSF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_ASINF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_ASINF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_ATAN2F 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_ATAN2F 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_ATANF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_ATANF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_CEILF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_CEILF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_COSF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_COSF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_COSHF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_COSHF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_EXPF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_EXPF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_FABSF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_FABSF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_FLOORF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_FLOORF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_FMODF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_FMODF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_FREXPF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_FREXPF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_LDEXPF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_LDEXPF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_LOG10F 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_LOG10F 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_LOGF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_LOGF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_MODFF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_MODFF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_POWF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_POWF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_SINF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_SINF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_SINHF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_SINHF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_SQRTF 1" >>confdefs.h ++ printf "%s\n" "#define HAVE_SQRTF 1" >>confdefs.h + -+ printf "%s\n" "#define HAVE_TANF 1" >>confdefs.h ++ 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 ++ printf "%s\n" "#define HAVE_TANHF 1" >>confdefs.h + ++ printf "%s\n" "#define HAVE_STRTOLD 1" >>confdefs.h + ;; + *) + as_fn_error $? "No support for this host/target combination." "$LINENO" 5 +@@ -53875,6 +54049,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 +54059,8 @@ else + have_fcntl=no + fi + ++ ;; ++ esac + fi + if test "$have_fcntl" = "yes"; then + BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_FCNTL=1" +@@ -53906,6 +54085,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 +54095,8 @@ else + have_getexecname=no + fi - # Base decisions on target environment. ++ ;; ++ 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-06-sparc-phoenix.patch similarity index 56% rename from toolchain/gcc-9.5.0-07-sparc-phoenix.patch rename to toolchain/gcc-14.2.0-06-sparc-phoenix.patch index 4c936418..6dc7b495 100644 --- a/toolchain/gcc-9.5.0-07-sparc-phoenix.patch +++ b/toolchain/gcc-14.2.0-06-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-07-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-07-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-07-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-08-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-08-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-08-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-09-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-09-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-09-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-10-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-10-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-10-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-12-aarch64-phoenix.patch b/toolchain/gcc-14.2.0-11-aarch64-phoenix.patch similarity index 74% rename from toolchain/gcc-9.5.0-12-aarch64-phoenix.patch rename to toolchain/gcc-14.2.0-11-aarch64-phoenix.patch index 9df3ed46..26f7cde7 100644 --- a/toolchain/gcc-9.5.0-12-aarch64-phoenix.patch +++ b/toolchain/gcc-14.2.0-11-aarch64-phoenix.patch @@ -1,19 +1,18 @@ diff --git a/gcc/config.gcc b/gcc/config.gcc -index 1d0c059a4..d643d41bd 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc -@@ -979,7 +979,7 @@ case ${target} in +@@ -1189,7 +1189,7 @@ case ${target} in esac - + case ${target} in -aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) +aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems* | aarch64*-*-phoenix*) - tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h" - tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-elf-raw.h" + tm_file="${tm_file} elfos.h newlib-stdint.h" + tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-elf-raw.h" tmake_file="${tmake_file} aarch64/t-aarch64" -@@ -993,6 +993,9 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) - aarch64-*-rtems*) - tm_file="${tm_file} rtems.h aarch64/rtems.h" +@@ -1204,6 +1204,9 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) + tm_file="${tm_file} aarch64/rtems.h rtems.h" + tmake_file="${tmake_file} aarch64/t-aarch64-rtems" ;; + aarch64*-*-phoenix*) + tm_file="${tm_file} phoenix.h" @@ -21,7 +20,7 @@ index 1d0c059a4..d643d41bd 100644 esac case $target in aarch64_be-*) -@@ -1001,7 +1004,14 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) +@@ -1212,7 +1215,14 @@ aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*) esac aarch64_multilibs="${with_multilib_list}" if test "$aarch64_multilibs" = "default"; then @@ -38,10 +37,9 @@ index 1d0c059a4..d643d41bd 100644 aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'` for aarch64_multilib in ${aarch64_multilibs}; do diff --git a/libgcc/config.host b/libgcc/config.host -index 9edb93fe8..9a67669b7 100644 --- a/libgcc/config.host +++ b/libgcc/config.host -@@ -343,6 +343,15 @@ i[34567]86-*-cygwin* | x86_64-*-cygwin*) +@@ -409,6 +409,15 @@ i[34567]86-*-cygwin* | x86_64-*-cygwin*) esac case ${host} in diff --git a/toolchain/gcc-14.2.0-12-fdpic-spec.patch b/toolchain/gcc-14.2.0-12-fdpic-spec.patch new file mode 100644 index 00000000..ecfb0db5 --- /dev/null +++ b/toolchain/gcc-14.2.0-12-fdpic-spec.patch @@ -0,0 +1,18 @@ +diff --git a/gcc/config/phoenix.h b/gcc/config/phoenix.h +--- a/gcc/config/phoenix.h ++++ b/gcc/config/phoenix.h +@@ -30,6 +30,14 @@ along with GCC; see the file COPYING3. If not see + #undef LIB_SPEC + #define LIB_SPEC "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}" + ++/* ARM FDPIC */ ++/* Pass fdpic flags to AS and LD when using FDPIC. */ ++#undef SUBTARGET_EXTRA_LINK_SPEC ++#define SUBTARGET_EXTRA_LINK_SPEC "%{mfdpic: -marmelf_phoenix_fdpiceabi}" ++ ++#undef TARGET_FDPIC_ASM_SPEC ++#define TARGET_FDPIC_ASM_SPEC "%{mfdpic: --fdpic}" ++ + /* 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 diff --git a/toolchain/gcc-14.2.0-13-arm-multilib.patch b/toolchain/gcc-14.2.0-13-arm-multilib.patch new file mode 100644 index 00000000..71559bbe --- /dev/null +++ b/toolchain/gcc-14.2.0-13-arm-multilib.patch @@ -0,0 +1,215 @@ +diff --git a/gcc/config.gcc b/gcc/config.gcc +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -1475,7 +1475,7 @@ 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" +- tmake_file="${tmake_file} arm/t-arm arm/t-bpabi arm/t-aprofile arm/t-rmprofile arm/t-multilib" ++ tmake_file="${tmake_file} arm/t-arm arm/t-bpabi arm/t-multilib arm/t-phoenix" + with_float="soft" # "auto" fpu + TM_MULTILIB_CONFIG="aprofile,rmprofile" + target_cpu_cname="arm7tdmi" +diff --git a/gcc/config/arm/t-phoenix b/gcc/config/arm/t-phoenix +--- a/gcc/config/arm/t-phoenix ++++ b/gcc/config/arm/t-phoenix +@@ -16,16 +16,45 @@ + # along with GCC; see the file COPYING3. If not see + # . + +-MULTILIB_OPTIONS = marm/mthumb +-MULTILIB_DIRNAMES = arm thumb +-MULTILIB_EXCEPTIONS = +-MULTILIB_MATCHES = +-MULTILIB_REUSE = +-MULTILIB_REQUIRED = +- +-MULTILIB_OPTIONS += mfloat-abi=hard +-MULTILIB_DIRNAMES += fpu +-MULTILIB_MATCHES += mfloat-abi?hard=mhard-float +- +-MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork +-MULTILIB_DIRNAMES += normal interwork ++# Add phoenix options to reuses and requires. ++ ++s-mlib: $(srcdir)/config/arm/t-phoenix ++ ++# Find all RM archs. ++RM_ARCHS := $(subst /, ,march=armv7-r+fp.sp/$(MULTI_ARCH_OPTS_RM)) ++# Create matches for requires and reuses. ++RM_MATCHES_REQ := $(foreach ARCH, $(RM_ARCHS), mthumb/$(ARCH)% marm/$(ARCH)%) ++RM_MATCHES_REUSE := $(foreach TARGET, $(RM_MATCHES_REQ), $(subst =,.,$(subst .,\.,$(RM_MATCHES_REQ)))) ++ ++# NOTE: Multilib options in MULTILIB_REQUIRED must be in the same order as they were added to the MULTILIB_OPTIONS variable. ++# So to easily add custom options at the end of REQUIRE we have to add them at the end of OPTIONS and DIRS. ++MULTILIB_OPTIONS += fPIC mno-pic-data-is-text-relative/mfdpic ++MULTILIB_DIRNAMES += pic no-pditr fdpic ++ ++MULTILIB_MATCHES += fPIC=fpic fPIC=fPIE fPIC=fpie ++ ++PHOENIX_OPTS := /fPIC/mno-pic-data-is-text-relative ++PHOENIX_OPTS += /fPIC/mfdpic ++ ++# Finally, add Phoenix options to RM multilibs. ++# Keep the original requires because of kernel and plo. ++ ++RM_REQUIRED := $(filter $(RM_MATCHES_REQ),$(MULTILIB_REQUIRED)) ++ ++RM_REUSE := $(filter $(RM_MATCHES_REUSE),$(MULTILIB_REUSE)) ++ ++MULTILIB_REQUIRED += $(foreach REQ, $(RM_REQUIRED), \ ++ $(foreach OPT, $(PHOENIX_OPTS), $(REQ)$(OPT))) ++ ++MULTILIB_REUSE += $(foreach REUSE, $(RM_REUSE), \ ++ $(foreach OPT, $(PHOENIX_OPTS), $(subst =,$(OPT)=,$(REUSE))$(OPT))) ++ ++# FIXME: Disable FDPIC Thumb-1 targets as binutils do not support PLT generation for Thumb-1. ++# https://github.com/bminor/binutils-gdb/blob/67bffda3bff903a78874c303a3d7823899bd555e/bfd/elf32-arm.c#L9838 ++THUMB1_ARCHS := march=armv6s-m march=armv8-m.base ++ ++THUMB1_REUSE_MATCHES += $(foreach ARCH, $(THUMB1_ARCHS), $(subst =,.,$(subst .,\.,mthumb/$(ARCH)%fdpic marm/$(ARCH)%fdpic))) ++ ++MULTILIB_EXCEPTIONS += $(foreach ARCH, $(THUMB1_ARCHS), *$(ARCH)*/*mfdpic*) ++ ++MULTILIB_REUSE := $(filter-out $(THUMB1_REUSE_MATCHES), $(MULTILIB_REUSE)) +diff --git a/gcc/config/phoenix.h b/gcc/config/phoenix.h +--- a/gcc/config/phoenix.h ++++ b/gcc/config/phoenix.h +@@ -30,6 +30,14 @@ along with GCC; see the file COPYING3. If not see + #undef LIB_SPEC + #define LIB_SPEC "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}" + ++/* ARM FDPIC */ ++/* Pass fdpic flags to AS and LD when using FDPIC. */ ++#undef SUBTARGET_EXTRA_LINK_SPEC ++#define SUBTARGET_EXTRA_LINK_SPEC "%{mfdpic: -marmelf_phoenix_fdpiceabi}" ++ ++#undef TARGET_FDPIC_ASM_SPEC ++#define TARGET_FDPIC_ASM_SPEC "%{mfdpic: --fdpic}" ++ + /* 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 +diff --git a/libgcc/config.host b/libgcc/config.host +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -563,7 +563,7 @@ arm*-*-uclinux*) # ARM ucLinux + extra_parts="$extra_parts crti.o crtn.o" + ;; + arm*-*-phoenix*) +- tmake_file="t-hardfp t-softfp arm/t-arm arm/t-elf arm/t-softfp arm/t-phoenix" ++ tmake_file="t-hardfp t-softfp arm/t-arm arm/t-elf arm/t-softfp" + 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" +diff --git a/libgcc/config/arm/t-phoenix b/libgcc/config/arm/t-phoenix +--- a/libgcc/config/arm/t-phoenix ++++ /dev/null +@@ -1,13 +0,0 @@ +-# PhoenixRTOS uses relocatable ELFs on NOMMU platforms +-# if this is ARM Cortex-M/R subvariant -> build libgcc/crtstuff with PIC +-# ALSO: ensure data is not interwined with .text, otherwise running XIP programs would fail +- +-# NOTE: the `-march` parameter would either be in CC or in CFLAGS depending on how the make will be called +-PS_MARCH := $(patsubst -march=%,%,$(filter -march=arm%, $(CC) $(CFLAGS))) +-PS_IS_CORTEX_M := $(findstring -m,$(PS_MARCH)) +-PS_IS_CORTEX_R := $(findstring -r,$(PS_MARCH)) +- +-ifneq ($(PS_IS_CORTEX_M)$(PS_IS_CORTEX_R),) +- CRTSTUFF_T_CFLAGS = $(PICFLAG) -mno-pic-data-is-text-relative +- INTERNAL_CFLAGS += $(PICFLAG) -mno-pic-data-is-text-relative +-endif +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -9241,19 +9241,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + case $host_os in + phoenix) + case $host_cpu in +- arm) +- # Phoenix system for arms without MMU requires files to be compiled with some certain flags. +- # lt_prog_compiler_pic is a variable which contains these flags for C files that are +- # involved in libstdc++. +- +- arch=$(echo "$CXX" | sed 's/.* -march=\([^ ]*\).*/\1/') +- +- if [[ "$arch" =~ "armv7-m" ]] || [[ "$arch" =~ "armv7-r" ]] || [[ "$arch" =~ "armv7e-m" ]] || [[ "$arch" =~ "armv8-m" ]] || [[ "$arch" =~ "armv8-r" ]]; then +- lt_prog_compiler_pic="$lt_prog_compiler_pic -fPIC -fPIE -msingle-pic-base -mno-pic-data-is-text-relative" +- fi +- ;; +- +- sparc) ++ sparc | arm) + # Necessary flags are passed through multilib options. + ;; + +@@ -9541,20 +9529,10 @@ case $host_os in + # Not all arm targets support PIC configuration + phoenix) + case $host_cpu in +- arm) +- # Phoenix system for arms without MMU requires files to be compiled with some certain flags. +- # One of them is -fPIC which is complemented by macro -fPID. In this "case" is decided whether ++ arm|sparc) ++ # Phoenix system for NOMMU requires files to be compiled with some certain flags. ++ # One of them is -fPIC which is complemented by macro PIC. In this "case" is decided whether + # to add this macro or not. +- +- arch=$(echo "$CXX" | sed 's/.* -march=\([^ ]*\).*/\1/') +- +- if [[ "$arch" =~ "armv7-m" ]] || [[ "$arch" =~ "armv7-r" ]] || [[ "$arch" =~ "armv7e-m" ]] || [[ "$arch" =~ "armv8-m" ]] || [[ "$arch" =~ "armv8-r" ]]; then +- lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" +- fi +- ;; +- +- sparc) +- + if [[ "$CXX" == *"mno-pic-data-is-text-relative"* ]]; then + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + fi +@@ -14294,20 +14272,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } + case $host_os in + phoenix) + case $host_cpu in +- arm) +- # Phoenix system for arms without MMU requires files to be compiled with some certain flags. +- # lt_prog_compiler_pic_CXX is a variable which contains these flags for C++ files that are +- # involved in libstdc++. +- +- arch=$(echo "$CXX" | sed 's/.* -march=\([^ ]*\).*/\1/') +- +- if [[ "$arch" =~ "armv7-m" ]] || [[ "$arch" =~ "armv7-r" ]] || [[ "$arch" =~ "armv7e-m" ]] || [[ "$arch" =~ "armv8-m" ]] || [[ "$arch" =~ "armv8-r" ]]; then +- lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -fPIC -fPIE -msingle-pic-base -mno-pic-data-is-text-relative" +- fi +- +- ;; +- +- sparc) ++ arm|sparc) + # Necessary flags are passed through multilib options. + ;; + +@@ -14631,20 +14596,11 @@ case $host_os in + # Not all arm targets support PIC + phoenix) + case $host_cpu in +- arm) +- # Phoenix system for arms without MMU requires files to be compiled with some certain flags. +- # One of them is -fPIC which is complemented by macro -fPID. In this "case" is decided whether ++ arm|sparc) ++ # Phoenix system for NOMMU requires files to be compiled with some certain flags. ++ # One of them is -fPIC which is complemented by macro PIC. In this "case" is decided whether + # to add this macro or not. + +- arch=$(echo "$CXX" | sed 's/.* -march=\([^ ]*\).*/\1/') +- +- if [[ "$arch" =~ "armv7-m" ]] || [[ "$arch" =~ "armv7-r" ]] || [[ "$arch" =~ "armv7e-m" ]] || [[ "$arch" =~ "armv8-m" ]] || [[ "$arch" =~ "armv8-r" ]]; then +- lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" +- fi +- ;; +- +- sparc) +- + if [[ "$CXX" == *"mno-pic-data-is-text-relative"* ]]; then + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + fi 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) ;; diff --git a/toolchain/gcc-9.5.0-04-disable_tm.patch b/toolchain/gcc-9.5.0-04-disable_tm.patch deleted file mode 100644 index 01643626..00000000 --- a/toolchain/gcc-9.5.0-04-disable_tm.patch +++ /dev/null @@ -1,10 +0,0 @@ -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 -@@ -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