diff --git a/sys-devel/gcc/gcc-13.2.0_2023_08_10.recipe b/sys-devel/gcc/gcc-13.3.0_2023_08_10.recipe similarity index 99% rename from sys-devel/gcc/gcc-13.2.0_2023_08_10.recipe rename to sys-devel/gcc/gcc-13.3.0_2023_08_10.recipe index f7c7303a1..b85d11706 100644 --- a/sys-devel/gcc/gcc-13.2.0_2023_08_10.recipe +++ b/sys-devel/gcc/gcc-13.3.0_2023_08_10.recipe @@ -5,11 +5,11 @@ HOMEPAGE="https://gcc.gnu.org/" COPYRIGHT="1988-2023 Free Software Foundation, Inc." LICENSE="GNU GPL v3 GNU LGPL v3" -REVISION="3" +REVISION="1" gccVersion="${portVersion%%_*}" SOURCE_URI="https://ftpmirror.gnu.org/gcc/gcc-$gccVersion/gcc-$gccVersion.tar.xz https://ftp.gnu.org/gnu/gcc/gcc-$gccVersion/gcc-$gccVersion.tar.xz" -CHECKSUM_SHA256="e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da" +CHECKSUM_SHA256="0845e9621c9543a13f484e94584a49ffc0129970e9914624235fc1d061a0c083" SOURCE_DIR="gcc-$gccVersion" PATCHES="gcc-$portVersion.patchset" diff --git a/sys-devel/gcc/patches/gcc-13.2.0_2023_08_10.patchset b/sys-devel/gcc/patches/gcc-13.3.0_2023_08_10.patchset similarity index 95% rename from sys-devel/gcc/patches/gcc-13.2.0_2023_08_10.patchset rename to sys-devel/gcc/patches/gcc-13.3.0_2023_08_10.patchset index 2d6d7464e..36c97850b 100644 --- a/sys-devel/gcc/patches/gcc-13.2.0_2023_08_10.patchset +++ b/sys-devel/gcc/patches/gcc-13.3.0_2023_08_10.patchset @@ -1,97 +1,11 @@ -From bef5a4cff865d9f7b50636943217721c08ea3943 Mon Sep 17 00:00:00 2001 +From 3f0d11d2185da906d21ee2f6ca8cbc379062719f Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Tue, 15 Aug 2023 06:19:59 +0100 -Subject: [PATCH] Modifications for GCC 13.2.0 for Haiku (from buildtools - repository) +Subject: Modifications for GCC 13.2.0 for Haiku (from buildtools repository) ---- - c++tools/config.h.in | 10 +- - c++tools/configure | 2662 ++++++++--------- - config.rpath | 2 + - config/ax_lib_socket_nsl.m4 | 2 +- - configure | 28 +- - configure.ac | 14 +- - gcc/Makefile.in | 14 +- - gcc/config.gcc | 71 +- - gcc/config.host | 12 +- - gcc/config/aarch64/aarch64-haiku.h | 71 + - gcc/config/aarch64/t-aarch64-haiku | 21 + - gcc/config/arm/haiku.h | 71 + - gcc/config/arm/t-haiku | 21 + - gcc/config/haiku-protos.h | 21 + - gcc/config/haiku-stdint.h | 55 + - gcc/config/haiku.c | 39 + - gcc/config/haiku.h | 230 ++ - gcc/config/haiku.opt | 32 + - gcc/config/i386/haiku.h | 82 + - gcc/config/i386/haiku64.h | 135 + - gcc/config/i386/t-haiku64 | 16 + - gcc/config/m68k/haiku.h | 266 ++ - gcc/config/mips/haiku.h | 42 + - gcc/config/riscv/haiku.h | 59 + - gcc/config/riscv/t-haiku | 4 + - gcc/config/rs6000/haiku.h | 54 + - gcc/config/sparc/haiku.h | 93 + - gcc/config/sparc/t-haiku | 5 + - gcc/config/t-haiku | 9 + - gcc/configure | 40 +- - gcc/configure.ac | 86 +- - gcc/ginclude/stdarg.h | 2 +- - gcc/ginclude/stddef.h | 10 +- - include/filenames.h | 4 + - libatomic/configure | 33 +- - libatomic/configure.ac | 24 +- - libatomic/configure.tgt | 2 +- - libbacktrace/configure | 5 + - libbacktrace/configure.ac | 5 + - libcody/configure | 2 +- - libgcc/config.host | 37 +- - libgcc/config/aarch64/haiku-unwind.h | 51 + - libgcc/config/t-haiku | 3 + - libgcc/crtstuff.c | 2 + - libgomp/configure | 40 +- - libgomp/configure.ac | 16 +- - libstdc++-v3/config/os/haiku/ctype_base.h | 61 + - .../config/os/haiku/ctype_configure_char.cc | 99 + - libstdc++-v3/config/os/haiku/ctype_inline.h | 173 ++ - .../config/os/haiku/error_constants.h | 178 ++ - libstdc++-v3/config/os/haiku/os_defines.h | 48 + - libstdc++-v3/configure | 99 +- - libstdc++-v3/configure.host | 5 +- - libstdc++-v3/crossconfig.m4 | 44 +- - libstdc++-v3/libsupc++/tinfo.cc | 9 + - libtool.m4 | 11 +- - 56 files changed, 3766 insertions(+), 1464 deletions(-) - create mode 100644 gcc/config/aarch64/aarch64-haiku.h - create mode 100644 gcc/config/aarch64/t-aarch64-haiku - create mode 100644 gcc/config/arm/haiku.h - create mode 100644 gcc/config/arm/t-haiku - create mode 100644 gcc/config/haiku-protos.h - create mode 100644 gcc/config/haiku-stdint.h - create mode 100644 gcc/config/haiku.c - create mode 100644 gcc/config/haiku.h - create mode 100644 gcc/config/haiku.opt - create mode 100644 gcc/config/i386/haiku.h - create mode 100644 gcc/config/i386/haiku64.h - create mode 100644 gcc/config/i386/t-haiku64 - create mode 100644 gcc/config/m68k/haiku.h - create mode 100644 gcc/config/mips/haiku.h - create mode 100644 gcc/config/riscv/haiku.h - create mode 100644 gcc/config/riscv/t-haiku - create mode 100644 gcc/config/rs6000/haiku.h - create mode 100644 gcc/config/sparc/haiku.h - create mode 100644 gcc/config/sparc/t-haiku - create mode 100644 gcc/config/t-haiku - create mode 100644 libgcc/config/aarch64/haiku-unwind.h - create mode 100644 libgcc/config/t-haiku - create mode 100644 libstdc++-v3/config/os/haiku/ctype_base.h - create mode 100644 libstdc++-v3/config/os/haiku/ctype_configure_char.cc - create mode 100644 libstdc++-v3/config/os/haiku/ctype_inline.h - create mode 100644 libstdc++-v3/config/os/haiku/error_constants.h - create mode 100644 libstdc++-v3/config/os/haiku/os_defines.h diff --git a/c++tools/config.h.in b/c++tools/config.h.in -index 410b2f7da..8d75ca1b3 100644 +index 410b2f7..8d75ca1 100644 --- a/c++tools/config.h.in +++ b/c++tools/config.h.in @@ -21,9 +21,6 @@ @@ -124,7 +38,7 @@ index 410b2f7da..8d75ca1b3 100644 + backward compatibility; new code need not use it. */ #undef STDC_HEADERS diff --git a/c++tools/configure b/c++tools/configure -index 742816e42..68b41fac9 100755 +index 742816e..68b41fa 100755 --- a/c++tools/configure +++ b/c++tools/configure @@ -1,9 +1,10 @@ @@ -4524,7 +4438,7 @@ index 742816e42..68b41fac9 100755 + diff --git a/config.rpath b/config.rpath -index 4dea75957..5bcc5be17 100755 +index 4dea759..5bcc5be 100755 --- a/config.rpath +++ b/config.rpath @@ -161,6 +161,8 @@ if test "$with_gnu_ld" = yes; then @@ -4537,7 +4451,7 @@ index 4dea75957..5bcc5be17 100755 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no diff --git a/config/ax_lib_socket_nsl.m4 b/config/ax_lib_socket_nsl.m4 -index 54cad68b4..7996135b9 100644 +index 54cad68..7996135 100644 --- a/config/ax_lib_socket_nsl.m4 +++ b/config/ax_lib_socket_nsl.m4 @@ -33,7 +33,7 @@ @@ -4550,7 +4464,7 @@ index 54cad68b4..7996135b9 100644 AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"], [], [-lnsl])]) diff --git a/configure b/configure -index 117a7ef23..a4b2dac27 100755 +index 117a7ef..a4b2dac 100755 --- a/configure +++ b/configure @@ -767,6 +767,7 @@ infodir @@ -4652,7 +4566,7 @@ index 117a7ef23..a4b2dac27 100755 # Remove unsupported stuff on all kaOS configurations. noconfigdirs="$noconfigdirs target-libgloss" diff --git a/configure.ac b/configure.ac -index b3e9bbd2a..362fd8159 100644 +index b3e9bbd..362fd81 100644 --- a/configure.ac +++ b/configure.ac @@ -433,6 +433,9 @@ case "${host}" in @@ -4705,7 +4619,7 @@ index b3e9bbd2a..362fd8159 100644 # Remove unsupported stuff on all kaOS configurations. noconfigdirs="$noconfigdirs target-libgloss" diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index 775aaa1b3..40f9bc2dd 100644 +index 775aaa1..40f9bc2 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -106,6 +106,8 @@ build_objdir := $(toplevel_builddir)/$(build_subdir) @@ -4758,7 +4672,7 @@ index 775aaa1b3..40f9bc2dd 100644 cppbuiltin.o: $(BASEVER) diff --git a/gcc/config.gcc b/gcc/config.gcc -index 648b3dc21..4bf2366c7 100644 +index c3b73d0..086640e 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -181,7 +181,7 @@ @@ -4793,7 +4707,7 @@ index 648b3dc21..4bf2366c7 100644 *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu | *-*-uclinuxfdpiceabi) extra_options="$extra_options gnu-user.opt" gas=yes -@@ -1175,6 +1191,12 @@ aarch64*-*-netbsd*) +@@ -1176,6 +1192,12 @@ aarch64*-*-netbsd*) tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-netbsd" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" ;; @@ -4806,7 +4720,7 @@ index 648b3dc21..4bf2366c7 100644 aarch64*-*-linux*) tm_file="${tm_file} elfos.h gnu-user.h linux.h glibc-stdint.h" tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-errata.h aarch64/aarch64-linux.h" -@@ -1345,6 +1367,16 @@ arm*-*-netbsdelf*) +@@ -1346,6 +1368,16 @@ arm*-*-netbsdelf*) armv7*) target_cpu_cname="generic-armv7-a";; esac ;; @@ -4823,7 +4737,7 @@ index 648b3dc21..4bf2366c7 100644 arm*-*-linux-* | arm*-*-uclinuxfdpiceabi) tm_file="elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" extra_options="${extra_options} linux-android.opt" -@@ -1891,6 +1923,14 @@ i[34567]86-*-freebsd*) +@@ -1892,6 +1924,14 @@ i[34567]86-*-freebsd*) x86_64-*-freebsd*) tm_file="${tm_file} i386/unix.h i386/att.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h" ;; @@ -4838,7 +4752,7 @@ index 648b3dc21..4bf2366c7 100644 i[34567]86-*-netbsdelf*) tm_file="${tm_file} i386/unix.h i386/att.h elfos.h ${nbsd_tm_file} i386/netbsd-elf.h" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" -@@ -2362,6 +2402,13 @@ m68k-*-rtems*) +@@ -2363,6 +2403,13 @@ m68k-*-rtems*) tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h m68k/rtemself.h rtems.h newlib-stdint.h" tm_defines="${tm_defines} MOTOROLA=1" ;; @@ -4852,7 +4766,7 @@ index 648b3dc21..4bf2366c7 100644 mcore-*-elf) tm_file="elfos.h newlib-stdint.h ${tm_file} mcore/mcore-elf.h" tmake_file=mcore/t-mcore -@@ -2413,6 +2460,13 @@ microblaze*-*-elf) +@@ -2414,6 +2461,13 @@ microblaze*-*-elf) cxx_target_objs="${cxx_target_objs} microblaze-c.o" tmake_file="${tmake_file} microblaze/t-microblaze" ;; @@ -4866,7 +4780,7 @@ index 648b3dc21..4bf2366c7 100644 riscv*-*-linux*) tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} riscv/linux.h" case "x${enable_multilib}" in -@@ -2514,6 +2568,11 @@ mips*-mti-linux*) +@@ -2515,6 +2569,11 @@ mips*-mti-linux*) gnu_ld=yes gas=yes ;; @@ -4878,7 +4792,7 @@ index 648b3dc21..4bf2366c7 100644 mips*-*-linux*) # Linux MIPS, either endian. tm_file="elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h" extra_options="${extra_options} linux-android.opt" -@@ -2949,6 +3008,11 @@ powerpc-*-eabi*) +@@ -2950,6 +3009,11 @@ powerpc-*-eabi*) tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm" use_gcc_stdint=wrap ;; @@ -4890,7 +4804,7 @@ index 648b3dc21..4bf2366c7 100644 powerpc-*-rtems*) tm_file="rs6000/biarch64.h ${tm_file} elfos.h gnu-user.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/rtems.h rtems.h" extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt" -@@ -3405,6 +3469,11 @@ sparc64-*-rtems*) +@@ -3406,6 +3470,11 @@ sparc64-*-rtems*) extra_options="${extra_options}" tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64" ;; @@ -4903,7 +4817,7 @@ index 648b3dc21..4bf2366c7 100644 tm_file="sparc/biarch64.h ${tm_file} elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h" extra_options="${extra_options} sparc/long-double-switch.opt" diff --git a/gcc/config.host b/gcc/config.host -index 5df85752e..caa9f8468 100644 +index 21a988e..8c3cad7 100644 --- a/gcc/config.host +++ b/gcc/config.host @@ -61,7 +61,7 @@ @@ -4949,7 +4863,7 @@ index 5df85752e..caa9f8468 100644 ;; diff --git a/gcc/config/aarch64/aarch64-haiku.h b/gcc/config/aarch64/aarch64-haiku.h new file mode 100644 -index 000000000..6ab98a4a0 +index 0000000..6ab98a4 --- /dev/null +++ b/gcc/config/aarch64/aarch64-haiku.h @@ -0,0 +1,71 @@ @@ -5026,7 +4940,7 @@ index 000000000..6ab98a4a0 +#endif /* GCC_AARCH64_HAIKU_H */ diff --git a/gcc/config/aarch64/t-aarch64-haiku b/gcc/config/aarch64/t-aarch64-haiku new file mode 100644 -index 000000000..99d3dea36 +index 0000000..99d3dea --- /dev/null +++ b/gcc/config/aarch64/t-aarch64-haiku @@ -0,0 +1,21 @@ @@ -5053,7 +4967,7 @@ index 000000000..99d3dea36 +LIB1ASMFUNCS = _aarch64_sync_cache_range diff --git a/gcc/config/arm/haiku.h b/gcc/config/arm/haiku.h new file mode 100644 -index 000000000..543ba9dd4 +index 0000000..543ba9d --- /dev/null +++ b/gcc/config/arm/haiku.h @@ -0,0 +1,71 @@ @@ -5130,7 +5044,7 @@ index 000000000..543ba9dd4 + diff --git a/gcc/config/arm/t-haiku b/gcc/config/arm/t-haiku new file mode 100644 -index 000000000..3f7f488fe +index 0000000..3f7f488 --- /dev/null +++ b/gcc/config/arm/t-haiku @@ -0,0 +1,21 @@ @@ -5157,7 +5071,7 @@ index 000000000..3f7f488fe +#TARGET_LIBGCC2_CFLAGS = diff --git a/gcc/config/haiku-protos.h b/gcc/config/haiku-protos.h new file mode 100644 -index 000000000..22d8e5922 +index 0000000..22d8e59 --- /dev/null +++ b/gcc/config/haiku-protos.h @@ -0,0 +1,21 @@ @@ -5184,7 +5098,7 @@ index 000000000..22d8e5922 +extern void haiku_override_options (void); diff --git a/gcc/config/haiku-stdint.h b/gcc/config/haiku-stdint.h new file mode 100644 -index 000000000..19f141296 +index 0000000..19f1412 --- /dev/null +++ b/gcc/config/haiku-stdint.h @@ -0,0 +1,55 @@ @@ -5245,7 +5159,7 @@ index 000000000..19f141296 +#define UINTPTR_TYPE "long unsigned int" diff --git a/gcc/config/haiku.c b/gcc/config/haiku.c new file mode 100644 -index 000000000..af14c02f4 +index 0000000..af14c02 --- /dev/null +++ b/gcc/config/haiku.c @@ -0,0 +1,39 @@ @@ -5290,7 +5204,7 @@ index 000000000..af14c02f4 +} diff --git a/gcc/config/haiku.h b/gcc/config/haiku.h new file mode 100644 -index 000000000..88adc2577 +index 0000000..88adc25 --- /dev/null +++ b/gcc/config/haiku.h @@ -0,0 +1,230 @@ @@ -5526,7 +5440,7 @@ index 000000000..88adc2577 +#define USE_TM_CLONE_REGISTRY 0 diff --git a/gcc/config/haiku.opt b/gcc/config/haiku.opt new file mode 100644 -index 000000000..6a44a4125 +index 0000000..6a44a41 --- /dev/null +++ b/gcc/config/haiku.opt @@ -0,0 +1,32 @@ @@ -5564,7 +5478,7 @@ index 000000000..6a44a4125 +; This comment is to ensure we retain the blank line above. diff --git a/gcc/config/i386/haiku.h b/gcc/config/i386/haiku.h new file mode 100644 -index 000000000..4d43c6bbf +index 0000000..4d43c6b --- /dev/null +++ b/gcc/config/i386/haiku.h @@ -0,0 +1,82 @@ @@ -5652,7 +5566,7 @@ index 000000000..4d43c6bbf +#define CC1_SPEC HAIKU_CC1_SPEC diff --git a/gcc/config/i386/haiku64.h b/gcc/config/i386/haiku64.h new file mode 100644 -index 000000000..1b5693149 +index 0000000..1b56931 --- /dev/null +++ b/gcc/config/i386/haiku64.h @@ -0,0 +1,135 @@ @@ -5793,7 +5707,7 @@ index 000000000..1b5693149 +#define USE_X86_64_FRAME_POINTER 1 diff --git a/gcc/config/i386/t-haiku64 b/gcc/config/i386/t-haiku64 new file mode 100644 -index 000000000..9c8f8e62e +index 0000000..9c8f8e6 --- /dev/null +++ b/gcc/config/i386/t-haiku64 @@ -0,0 +1,16 @@ @@ -5815,7 +5729,7 @@ index 000000000..9c8f8e62e +TARGET_LIBGCC2_CFLAGS = -fPIC diff --git a/gcc/config/m68k/haiku.h b/gcc/config/m68k/haiku.h new file mode 100644 -index 000000000..2b117fcb1 +index 0000000..2b117fc --- /dev/null +++ b/gcc/config/m68k/haiku.h @@ -0,0 +1,266 @@ @@ -6087,7 +6001,7 @@ index 000000000..2b117fcb1 +} diff --git a/gcc/config/mips/haiku.h b/gcc/config/mips/haiku.h new file mode 100644 -index 000000000..aa3dcded9 +index 0000000..aa3dcde --- /dev/null +++ b/gcc/config/mips/haiku.h @@ -0,0 +1,42 @@ @@ -6135,7 +6049,7 @@ index 000000000..aa3dcded9 + diff --git a/gcc/config/riscv/haiku.h b/gcc/config/riscv/haiku.h new file mode 100644 -index 000000000..0dfb3c544 +index 0000000..0dfb3c5 --- /dev/null +++ b/gcc/config/riscv/haiku.h @@ -0,0 +1,59 @@ @@ -6200,7 +6114,7 @@ index 000000000..0dfb3c544 +#define LINK_SPEC "-melf" XLEN_SPEC DEFAULT_ENDIAN_SPEC "riscv" LD_EMUL_SUFFIX " %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}} -X" diff --git a/gcc/config/riscv/t-haiku b/gcc/config/riscv/t-haiku new file mode 100644 -index 000000000..6cccc72ae +index 0000000..6cccc72 --- /dev/null +++ b/gcc/config/riscv/t-haiku @@ -0,0 +1,4 @@ @@ -6210,7 +6124,7 @@ index 000000000..6cccc72ae +#MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES)) diff --git a/gcc/config/rs6000/haiku.h b/gcc/config/rs6000/haiku.h new file mode 100644 -index 000000000..8c2e8054b +index 0000000..8c2e805 --- /dev/null +++ b/gcc/config/rs6000/haiku.h @@ -0,0 +1,54 @@ @@ -6270,7 +6184,7 @@ index 000000000..8c2e8054b +#define LINK_SPEC "-m elf32ppchaiku %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}" diff --git a/gcc/config/sparc/haiku.h b/gcc/config/sparc/haiku.h new file mode 100644 -index 000000000..8c81d7eb2 +index 0000000..8c81d7e --- /dev/null +++ b/gcc/config/sparc/haiku.h @@ -0,0 +1,93 @@ @@ -6369,7 +6283,7 @@ index 000000000..8c81d7eb2 +#undef DTORS_SECTION_ASM_OP diff --git a/gcc/config/sparc/t-haiku b/gcc/config/sparc/t-haiku new file mode 100644 -index 000000000..a8d212dcb +index 0000000..a8d212d --- /dev/null +++ b/gcc/config/sparc/t-haiku @@ -0,0 +1,5 @@ @@ -6380,7 +6294,7 @@ index 000000000..a8d212dcb + diff --git a/gcc/config/t-haiku b/gcc/config/t-haiku new file mode 100644 -index 000000000..ba1f7f517 +index 0000000..ba1f7f5 --- /dev/null +++ b/gcc/config/t-haiku @@ -0,0 +1,9 @@ @@ -6394,7 +6308,7 @@ index 000000000..ba1f7f517 + $(COMPILE) $< + $(POSTCOMPILE) diff --git a/gcc/configure b/gcc/configure -index c7b26d192..ec1ffad43 100755 +index ade0af2..599e3ef 100755 --- a/gcc/configure +++ b/gcc/configure @@ -799,6 +799,7 @@ NETLIBS @@ -6413,7 +6327,7 @@ index c7b26d192..ec1ffad43 100755 coverage_flags valgrind_command valgrind_path_defines -@@ -1823,6 +1825,8 @@ Optional Packages: +@@ -1829,6 +1831,8 @@ Optional Packages: pathname) --with-gnu-as arrange to work with GNU as --with-as arrange to use the specified as (full pathname) @@ -6422,7 +6336,7 @@ index c7b26d192..ec1ffad43 100755 --with-stack-clash-protection-guard-size=size Set the default stack clash protection guard size for specific targets as a power of two in bytes. -@@ -7815,6 +7819,17 @@ fi +@@ -7844,6 +7848,17 @@ fi # Miscenalleous configure options # ------------------------------- @@ -6440,7 +6354,7 @@ index c7b26d192..ec1ffad43 100755 # Determine whether or not multilibs are enabled. # Check whether --enable-multilib was given. if test "${enable_multilib+set}" = set; then : -@@ -10059,6 +10074,15 @@ fi +@@ -10088,6 +10103,15 @@ fi # -------- @@ -6456,7 +6370,7 @@ index c7b26d192..ec1ffad43 100755 # These libraries may be used by collect2. # We may need a special search path to get them linked. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for collect2 libraries" >&5 -@@ -13011,7 +13035,7 @@ case ${enable_threads} in +@@ -13057,7 +13081,7 @@ case ${enable_threads} in # default target_thread_file='single' ;; @@ -6465,7 +6379,7 @@ index c7b26d192..ec1ffad43 100755 single | tpf | vxworks | win32 | mcf) target_thread_file=${enable_threads} ;; -@@ -19005,8 +19029,9 @@ haiku*) +@@ -19051,8 +19075,9 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -6477,7 +6391,7 @@ index c7b26d192..ec1ffad43 100755 ;; hpux9* | hpux10* | hpux11*) -@@ -22680,8 +22705,9 @@ haiku*) +@@ -22726,8 +22751,9 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -6489,7 +6403,7 @@ index c7b26d192..ec1ffad43 100755 ;; hpux9* | hpux10* | hpux11*) -@@ -24949,12 +24975,12 @@ __FRAME_BEGIN__: +@@ -24995,12 +25021,12 @@ __FRAME_BEGIN__: cat > conftest.lit </dev/null 2>&1; then # For platforms other than powerpc64*, enable as appropriate. -@@ -2762,7 +2780,7 @@ AC_SUBST(ORIGINAL_LD_FOR_TARGET) +@@ -2801,7 +2819,7 @@ AC_SUBST(ORIGINAL_LD_FOR_TARGET) case "$ORIGINAL_LD_FOR_TARGET" in ./collect-ld | ./collect-ld$build_exeext) ;; *) AC_CONFIG_FILES(collect-ld:exec-tool.in, [chmod +x collect-ld]) ;; @@ -6715,7 +6629,7 @@ index 09082e8cc..377bb98f1 100644 AC_MSG_CHECKING(what linker to use) if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext \ -@@ -2929,7 +2947,7 @@ AC_SUBST(ORIGINAL_DSYMUTIL_FOR_TARGET) +@@ -2968,7 +2986,7 @@ AC_SUBST(ORIGINAL_DSYMUTIL_FOR_TARGET) case "$ORIGINAL_DSYMUTIL_FOR_TARGET" in ./dsymutil | ./dsymutil$build_exeext) ;; *) AC_CONFIG_FILES(dsymutil:exec-tool.in, [chmod +x dsymutil]) ;; @@ -6724,7 +6638,7 @@ index 09082e8cc..377bb98f1 100644 # Figure out what assembler alignment features are present. gcc_GAS_CHECK_FEATURE([.balign and .p2align], gcc_cv_as_balign_and_p2align,, -@@ -3456,7 +3474,7 @@ if test $gcc_cv_as_section_exclude_e = no; then +@@ -3495,7 +3513,7 @@ if test $gcc_cv_as_section_exclude_e = no; then ;; i?86-*-solaris2* | x86_64-*-solaris2*) conftest_s='.section foo1, #exclude' @@ -6733,7 +6647,7 @@ index 09082e8cc..377bb98f1 100644 esac ;; esac -@@ -3757,17 +3775,17 @@ foo: .long 25 +@@ -3796,17 +3814,17 @@ foo: .long 25 addil LT%foo-$tls_gdidx$,gp ldo RT%foo-$tls_gdidx$(%r1),%arg0 b __tls_get_addr @@ -6755,7 +6669,7 @@ index 09082e8cc..377bb98f1 100644 addil LR%foo-$tls_leoff$,%t1 ldo RR%foo-$tls_leoff$(%r1),%t2' tls_as_opt=--fatal-warnings -@@ -3833,7 +3851,7 @@ foo: .long 25 +@@ -3872,7 +3890,7 @@ foo: .long 25 case $gas_flag in yes) tls_as_opt="$tls_as_opt --64" ;; no) tls_as_opt="$tls_as_opt -xarch=amd64" ;; @@ -6764,7 +6678,7 @@ index 09082e8cc..377bb98f1 100644 fi conftest_s="$conftest_s foo: .long 25 -@@ -4890,7 +4908,7 @@ tls_ld: +@@ -4937,7 +4955,7 @@ tls_ld: .section .text,"ax",@progbits .globl _start .type _start, @function @@ -6773,7 +6687,7 @@ index 09082e8cc..377bb98f1 100644 leal value@tlsldm(%ebx), %eax call ___tls_get_addr@plt -@@ -6677,7 +6695,7 @@ AC_CACHE_CHECK(linker --sysroot support, +@@ -6756,7 +6774,7 @@ AC_CACHE_CHECK(linker --sysroot support, if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 ; then gcc_cv_ld_sysroot=yes fi @@ -6782,7 +6696,7 @@ index 09082e8cc..377bb98f1 100644 if $gcc_cv_ld --help 2>&1 | grep sysroot > /dev/null; then gcc_cv_ld_sysroot=yes fi -@@ -6685,7 +6703,7 @@ AC_CACHE_CHECK(linker --sysroot support, +@@ -6764,7 +6782,7 @@ AC_CACHE_CHECK(linker --sysroot support, if test x"$gcc_cv_ld_sysroot" = xyes; then AC_DEFINE(HAVE_LD_SYSROOT, 1, [Define if your linker supports --sysroot.]) @@ -6791,7 +6705,7 @@ index 09082e8cc..377bb98f1 100644 case $target in *-*-solaris2*) -@@ -7096,7 +7114,7 @@ changequote(,)dnl +@@ -7175,7 +7193,7 @@ changequote(,)dnl # sources implementing front-end to GCC tree converters), and for # build infrastructure purposes (Make-lang.in, etc.) # @@ -6800,7 +6714,7 @@ index 09082e8cc..377bb98f1 100644 # gcc_subdir="" or gcc_subdir= # is found in /config-lang.in, and will remain # otherwise. -@@ -7385,7 +7403,7 @@ AC_ARG_VAR(GMPINC,[How to find GMP include files]) +@@ -7464,7 +7482,7 @@ AC_ARG_VAR(GMPINC,[How to find GMP include files]) AC_ARG_VAR(ISLLIBS,[How to link isl]) AC_ARG_VAR(ISLINC,[How to find isl include files]) @@ -6809,7 +6723,7 @@ index 09082e8cc..377bb98f1 100644 AC_DEFINE(HAVE_isl, 1, [Define if isl is in use.]) fi -@@ -7684,6 +7702,6 @@ for d in $subdirs doc build common c-family +@@ -7763,6 +7781,6 @@ for d in $subdirs doc build common c-family do test -d $d || mkdir $d done @@ -6818,7 +6732,7 @@ index 09082e8cc..377bb98f1 100644 [subdirs='$subdirs']) AC_OUTPUT diff --git a/gcc/ginclude/stdarg.h b/gcc/ginclude/stdarg.h -index e386dbf76..3cabf4952 100644 +index e386dbf..3cabf49 100644 --- a/gcc/ginclude/stdarg.h +++ b/gcc/ginclude/stdarg.h @@ -98,7 +98,7 @@ typedef __gnuc_va_list va_list; @@ -6831,7 +6745,7 @@ index e386dbf76..3cabf4952 100644 typedef __gnuc_va_list va_list; #endif /* not __va_list__ */ diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h -index 12ceef391..f8a0fcf7e 100644 +index 12ceef3..f8a0fcf 100644 --- a/gcc/ginclude/stddef.h +++ b/gcc/ginclude/stddef.h @@ -164,7 +164,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; @@ -6880,7 +6794,7 @@ index 12ceef391..f8a0fcf7e 100644 #define _WCHAR_T #define _T_WCHAR_ diff --git a/include/filenames.h b/include/filenames.h -index 444c5cc41..7991d6abe 100644 +index 444c5cc..7991d6a 100644 --- a/include/filenames.h +++ b/include/filenames.h @@ -37,17 +37,21 @@ extern "C" { @@ -6906,7 +6820,7 @@ index 444c5cc41..7991d6abe 100644 # define HAS_DRIVE_SPEC(f) (0) # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) diff --git a/libatomic/configure b/libatomic/configure -index e47d2d7fb..a312f13e8 100755 +index e47d2d7..a312f13 100755 --- a/libatomic/configure +++ b/libatomic/configure @@ -8483,8 +8483,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } @@ -6991,7 +6905,7 @@ index e47d2d7fb..a312f13e8 100755 conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS $XPCFLAGS" diff --git a/libatomic/configure.ac b/libatomic/configure.ac -index 31304685d..998ba1bf4 100644 +index 3130468..998ba1b 100644 --- a/libatomic/configure.ac +++ b/libatomic/configure.ac @@ -217,21 +217,27 @@ LIBAT_WORDSIZE @@ -7032,7 +6946,7 @@ index 31304685d..998ba1bf4 100644 ;; esac diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt -index a92ae9e83..fc746b4aa 100644 +index a92ae9e..fc746b4 100644 --- a/libatomic/configure.tgt +++ b/libatomic/configure.tgt @@ -152,7 +152,7 @@ case "${target}" in @@ -7045,7 +6959,7 @@ index a92ae9e83..fc746b4aa 100644 config_path="${config_path} posix" ;; diff --git a/libbacktrace/configure b/libbacktrace/configure -index 6af2c04c8..dc1bf68d1 100755 +index 6af2c04..dc1bf68 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -13331,6 +13331,11 @@ else @@ -7061,7 +6975,7 @@ index 6af2c04c8..dc1bf68d1 100755 else ac_fn_c_check_func "$LINENO" "dl_iterate_phdr" "ac_cv_func_dl_iterate_phdr" diff --git a/libbacktrace/configure.ac b/libbacktrace/configure.ac -index 39e6bf41e..032341812 100644 +index 39e6bf4..0323418 100644 --- a/libbacktrace/configure.ac +++ b/libbacktrace/configure.ac @@ -347,6 +347,11 @@ else @@ -7077,7 +6991,7 @@ index 39e6bf41e..032341812 100644 AC_CHECK_FUNC([dl_iterate_phdr], [have_dl_iterate_phdr=yes], [have_dl_iterate_phdr=no]) diff --git a/libcody/configure b/libcody/configure -index da52a5cfc..d92e55a09 100755 +index da52a5c..d92e55a 100755 --- a/libcody/configure +++ b/libcody/configure @@ -2496,7 +2496,7 @@ $as_echo_n "checking whether $CXX is for C++11... " >&6; } @@ -7090,7 +7004,7 @@ index da52a5cfc..d92e55a09 100755 #endif diff --git a/libgcc/config.host b/libgcc/config.host -index 9d7212028..662bc116e 100644 +index c94d69d..2c78454 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -103,7 +103,7 @@ arm*-*-*) @@ -7195,7 +7109,7 @@ index 9d7212028..662bc116e 100644 tic6x-*-uclinux) diff --git a/libgcc/config/aarch64/haiku-unwind.h b/libgcc/config/aarch64/haiku-unwind.h new file mode 100644 -index 000000000..3c8d33d6a +index 0000000..3c8d33d --- /dev/null +++ b/libgcc/config/aarch64/haiku-unwind.h @@ -0,0 +1,51 @@ @@ -7252,7 +7166,7 @@ index 000000000..3c8d33d6a +} diff --git a/libgcc/config/t-haiku b/libgcc/config/t-haiku new file mode 100644 -index 000000000..b4fff2d8f +index 0000000..b4fff2d --- /dev/null +++ b/libgcc/config/t-haiku @@ -0,0 +1,3 @@ @@ -7260,7 +7174,7 @@ index 000000000..b4fff2d8f +LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ + $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c diff --git a/libgcc/crtstuff.c b/libgcc/crtstuff.c -index 93ff5b81d..959f45e7f 100644 +index 93ff5b8..959f45e 100644 --- a/libgcc/crtstuff.c +++ b/libgcc/crtstuff.c @@ -108,7 +108,9 @@ call_ ## FUNC (void) \ @@ -7274,7 +7188,7 @@ index 93ff5b81d..959f45e7f 100644 But it doesn't use PT_GNU_EH_FRAME ELF segment currently. */ # if !defined(__UCLIBC__) \ diff --git a/libgomp/configure b/libgomp/configure -index ed18809ff..dc4dd7683 100755 +index 389500d..f142d69 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -8496,8 +8496,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } @@ -7382,7 +7296,7 @@ index ed18809ff..dc4dd7683 100755 conftest$ac_exeext conftest.$ac_ext esac diff --git a/libgomp/configure.ac b/libgomp/configure.ac -index cc96e5b75..4ec9a320b 100644 +index dd88f20..6cba754 100644 --- a/libgomp/configure.ac +++ b/libgomp/configure.ac @@ -197,21 +197,27 @@ case "$host" in @@ -7420,7 +7334,7 @@ index cc96e5b75..4ec9a320b 100644 if test x$libgomp_use_pthreads != xno; then diff --git a/libstdc++-v3/config/os/haiku/ctype_base.h b/libstdc++-v3/config/os/haiku/ctype_base.h new file mode 100644 -index 000000000..86e15cb47 +index 0000000..86e15cb --- /dev/null +++ b/libstdc++-v3/config/os/haiku/ctype_base.h @@ -0,0 +1,61 @@ @@ -7487,7 +7401,7 @@ index 000000000..86e15cb47 +} // namespace diff --git a/libstdc++-v3/config/os/haiku/ctype_configure_char.cc b/libstdc++-v3/config/os/haiku/ctype_configure_char.cc new file mode 100644 -index 000000000..35e6b80f0 +index 0000000..35e6b80 --- /dev/null +++ b/libstdc++-v3/config/os/haiku/ctype_configure_char.cc @@ -0,0 +1,99 @@ @@ -7592,7 +7506,7 @@ index 000000000..35e6b80f0 +} // namespace diff --git a/libstdc++-v3/config/os/haiku/ctype_inline.h b/libstdc++-v3/config/os/haiku/ctype_inline.h new file mode 100644 -index 000000000..5b5cc5693 +index 0000000..5b5cc56 --- /dev/null +++ b/libstdc++-v3/config/os/haiku/ctype_inline.h @@ -0,0 +1,173 @@ @@ -7771,7 +7685,7 @@ index 000000000..5b5cc5693 +} // namespace diff --git a/libstdc++-v3/config/os/haiku/error_constants.h b/libstdc++-v3/config/os/haiku/error_constants.h new file mode 100644 -index 000000000..fa6d88919 +index 0000000..fa6d889 --- /dev/null +++ b/libstdc++-v3/config/os/haiku/error_constants.h @@ -0,0 +1,178 @@ @@ -7955,7 +7869,7 @@ index 000000000..fa6d88919 +#endif diff --git a/libstdc++-v3/config/os/haiku/os_defines.h b/libstdc++-v3/config/os/haiku/os_defines.h new file mode 100644 -index 000000000..02c869321 +index 0000000..02c8693 --- /dev/null +++ b/libstdc++-v3/config/os/haiku/os_defines.h @@ -0,0 +1,48 @@ @@ -8008,10 +7922,10 @@ index 000000000..02c869321 + +#endif diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure -index 9b6027775..ecd533729 100755 +index d35baaf..3d52ad1 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure -@@ -9237,8 +9237,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } +@@ -9239,8 +9239,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } haiku*) # PIC is the default for Haiku. @@ -8020,7 +7934,7 @@ index 9b6027775..ecd533729 100755 ;; hpux*) -@@ -11349,8 +11347,9 @@ haiku*) +@@ -11351,8 +11349,9 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -8032,7 +7946,7 @@ index 9b6027775..ecd533729 100755 ;; hpux9* | hpux10* | hpux11*) -@@ -11894,7 +11893,7 @@ else +@@ -11896,7 +11895,7 @@ else lt_cv_dlopen_libs= case $host_os in @@ -8041,7 +7955,7 @@ index 9b6027775..ecd533729 100755 lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes -@@ -14136,8 +14135,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } +@@ -14138,8 +14137,6 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; } ;; haiku*) # PIC is the default for Haiku. @@ -8050,7 +7964,7 @@ index 9b6027775..ecd533729 100755 ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. -@@ -15048,8 +15045,9 @@ haiku*) +@@ -15050,8 +15047,9 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -8062,7 +7976,7 @@ index 9b6027775..ecd533729 100755 ;; hpux9* | hpux10* | hpux11*) -@@ -47618,6 +47616,89 @@ done +@@ -47634,6 +47632,89 @@ done ;; @@ -8153,7 +8067,7 @@ index 9b6027775..ecd533729 100755 SECTION_FLAGS='-ffunction-sections -fdata-sections' diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host -index 9e7c7f02d..d9f15fb0a 100644 +index 9e7c7f0..d9f15fb 100644 --- a/libstdc++-v3/configure.host +++ b/libstdc++-v3/configure.host @@ -267,6 +267,9 @@ case "${host_os}" in @@ -8176,7 +8090,7 @@ index 9e7c7f02d..d9f15fb0a 100644 ;; powerpc*-*-darwin*) diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 -index b3269cb88..853c51893 100644 +index b3269cb..853c518 100644 --- a/libstdc++-v3/crossconfig.m4 +++ b/libstdc++-v3/crossconfig.m4 @@ -90,7 +90,7 @@ case "${host}" in @@ -8245,7 +8159,7 @@ index b3269cb88..853c51893 100644 AC_DEFINE(HAVE_COSF) AC_DEFINE(HAVE_COSL) diff --git a/libstdc++-v3/libsupc++/tinfo.cc b/libstdc++-v3/libsupc++/tinfo.cc -index cac383bea..22c6c5949 100644 +index cac383b..22c6c59 100644 --- a/libstdc++-v3/libsupc++/tinfo.cc +++ b/libstdc++-v3/libsupc++/tinfo.cc @@ -30,6 +30,15 @@ std::type_info:: @@ -8265,7 +8179,7 @@ index cac383bea..22c6c5949 100644 #if __cplusplus > 202002L diff --git a/libtool.m4 b/libtool.m4 -index b92e284d9..6a180a5bc 100644 +index b92e284..6a180a5 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -1724,7 +1724,7 @@ else @@ -8308,5 +8222,275 @@ index b92e284d9..6a180a5bc 100644 hpux*) -- -2.34.1 +2.37.3 + + +From b3d8f39d12da09930ff28c37212612781eb2460a Mon Sep 17 00:00:00 2001 +From: Yn0ga +Date: Thu, 5 Oct 2023 19:58:27 +0000 +Subject: Update PPC toolchain, should fix #18474 + +(due to https://github.com/gcc-mirror/gcc/commit/62045234757dbe0e3c44eef4cc952e773eea784e) + +Change-Id: I5d070da18160b26bab1d29454f1c2c7799b6dcab +Reviewed-on: https://review.haiku-os.org/c/buildtools/+/6984 +Reviewed-by: Niels Sascha Reedijk +Reviewed-by: Adrien Destugues + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 086640e..ed5c021 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -3011,7 +3011,7 @@ powerpc-*-eabi*) + ;; + powerpc-*-haiku*) + tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppcos rs6000/t-ppccomm t-haiku" +- tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h haiku.h rs6000/haiku.h haiku-stdint.h" ++ tm_file="${tm_file} elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h haiku.h rs6000/haiku.h haiku-stdint.h" + extra_options="${extra_options} rs6000/sysv4.opt" + ;; + powerpc-*-rtems*) +diff --git a/gcc/config/haiku.h b/gcc/config/haiku.h +index 88adc25..b768dfd 100644 +--- a/gcc/config/haiku.h ++++ b/gcc/config/haiku.h +@@ -59,6 +59,7 @@ Boston, MA 02111-1307, USA. */ + #undef CC1PLUS_SPEC + #define CC1PLUS_SPEC "%{!Wctor-dtor-privacy:-Wno-ctor-dtor-privacy}" + ++#undef SUBTARGET_OVERRIDE_OPTIONS + #define SUBTARGET_OVERRIDE_OPTIONS \ + do { \ + haiku_override_options (); \ +diff --git a/gcc/config/rs6000/haiku.h b/gcc/config/rs6000/haiku.h +index 8c2e805..59be0b8 100644 +--- a/gcc/config/rs6000/haiku.h ++++ b/gcc/config/rs6000/haiku.h +@@ -28,6 +28,10 @@ Boston, MA 02111-1307, USA. */ + #undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE + #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128*/ + ++/* Undef gnu-user.h macros we don't want. */ ++#undef CPLUSPLUS_CPP_SPEC ++#undef LINK_GCC_C_SEQUENCE_SPEC ++ + #undef TARGET_OS_CPP_BUILTINS + #define TARGET_OS_CPP_BUILTINS() \ + do \ +@@ -35,7 +39,7 @@ Boston, MA 02111-1307, USA. */ + builtin_define ("__HAIKU__"); \ + builtin_define ("__POWERPC__"); \ + builtin_define ("__powerpc__"); \ +- builtin_define ("__STDC_ISO_10646__=201103L"); \ ++ builtin_define ("__STDC_ISO_10646__=201103L"); \ + builtin_assert ("system=haiku"); \ + builtin_assert ("cpu=powerpc"); \ + builtin_assert ("machine=powerpc"); \ +@@ -52,3 +56,18 @@ Boston, MA 02111-1307, USA. */ + + #undef LINK_SPEC + #define LINK_SPEC "-m elf32ppchaiku %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}" ++ ++/* override options from sysv4.h */ ++#undef SUBTARGET_OVERRIDE_OPTIONS ++#define SUBTARGET_OVERRIDE_OPTIONS \ ++ do { \ ++ rs6000_abi_name = "sysv"; \ ++ rs6000_current_abi = ABI_V4; \ ++ rs6000_sdata = SDATA_DATA; \ ++ rs6000_sdata_name = "data"; \ ++ /*secure_plt = true;*/ \ ++ rs6000_isa_flags |= OPTION_MASK_MINIMAL_TOC; \ ++ TARGET_NO_FP_IN_TOC = 1; \ ++ haiku_override_options (); \ ++ } ++ while (0) +diff --git a/libgcc/config.host b/libgcc/config.host +index 2c78454..8dd05b6 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -1221,6 +1221,7 @@ powerpc*-*-freebsd*) + esac + ;; + powerpc-*-haiku*) ++ tmake_file="$tmake_file rs6000/t-ppccomm rs6000/t-savresfpgr rs6000/t-crtstuff rs6000/t-crtstuff-pic t-fdpbit" + ;; + powerpc-*-netbsd*) + tmake_file="$tmake_file rs6000/t-netbsd rs6000/t-crtstuff" +-- +2.37.3 + + +From 37ffec1f0e98a71888729067283a84e48e5eb262 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Wed, 13 Dec 2023 13:54:29 +0100 +Subject: gcc: remove obsolete macro definitions + +ASM_OUTPUT_MAX_SKIP_ALIGN has a generic definition in i386.h, we don't +need to provide our own anymore + +ASM_OUTPUT_MAX_SKIP_PAD is an old name for ASM_OUTPUT_MAX_SKIP_ALIGN, it +was removed from gcc code in 2021 and is not used anywhere. + +Change-Id: Ib9c3a5aeccce030c7875a1e4a4dbce46618b1a05 +Reviewed-on: https://review.haiku-os.org/c/buildtools/+/7206 +Reviewed-by: waddlesplash + +diff --git a/gcc/config/i386/haiku.h b/gcc/config/i386/haiku.h +index 4d43c6b..4db6266 100644 +--- a/gcc/config/i386/haiku.h ++++ b/gcc/config/i386/haiku.h +@@ -63,19 +63,6 @@ Boston, MA 02111-1307, USA. */ + #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ + asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) + +-/* A C statement to output to the stdio stream FILE an assembler +- command to advance the location counter to a multiple of 1< 8 byte \ +- alignment is preferred. */ \ +- if ((LOG) > 3 \ +- && (1 << (LOG)) > ((MAX_SKIP) + 1) \ +- && (MAX_SKIP) >= 7) \ +- fputs ("\t.p2align 3\n", (FILE)); \ +- } \ +- } \ +- } while (0) +-#undef ASM_OUTPUT_MAX_SKIP_PAD +-#define ASM_OUTPUT_MAX_SKIP_PAD(FILE, LOG, MAX_SKIP) \ +- if ((LOG) != 0) \ +- { \ +- if ((MAX_SKIP) == 0) \ +- fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ +- else \ +- fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ +- } +-#endif +- + + /* Output assembler code to FILE to call the profiler. */ + #define NO_PROFILE_COUNTERS 1 +-- +2.37.3 + + +From 0b08f1412c04dc04d946c3fabcf068f14fac7bbe Mon Sep 17 00:00:00 2001 +From: David Karoly +Date: Thu, 28 Mar 2024 17:19:03 +0100 +Subject: gcc/config/rs6000: fix typo + +Change-Id: If4a29c15dd4ccfc36ba8262ca36b86e9dc2abcd6 +Reviewed-on: https://review.haiku-os.org/c/buildtools/+/7558 +Reviewed-by: Adrien Destugues + +diff --git a/gcc/config/rs6000/haiku.h b/gcc/config/rs6000/haiku.h +index 59be0b8..f1f1317 100644 +--- a/gcc/config/rs6000/haiku.h ++++ b/gcc/config/rs6000/haiku.h +@@ -69,5 +69,5 @@ Boston, MA 02111-1307, USA. */ + rs6000_isa_flags |= OPTION_MASK_MINIMAL_TOC; \ + TARGET_NO_FP_IN_TOC = 1; \ + haiku_override_options (); \ +- } ++ } \ + while (0) +-- +2.37.3 + + +From b70e8909fec9f29601ffb2afeebadd228a12f19c Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 10 Jun 2024 16:41:43 +0200 +Subject: gcc/config/i386: apply change from 13.x to haiku + + +diff --git a/gcc/config/i386/haiku.h b/gcc/config/i386/haiku.h +index 4db6266..d8c208d 100644 +--- a/gcc/config/i386/haiku.h ++++ b/gcc/config/i386/haiku.h +@@ -28,9 +28,9 @@ Boston, MA 02111-1307, USA. */ + #undef DEFAULT_PCC_STRUCT_RETURN + #define DEFAULT_PCC_STRUCT_RETURN 1 + +-#undef DBX_REGISTER_NUMBER +-#define DBX_REGISTER_NUMBER(n) \ +- (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n]) ++#undef DEBUGGER_REGNO ++#define DEBUGGER_REGNO(n) \ ++ (TARGET_64BIT ? debugger64_register_map[n] : svr4_debugger_register_map[n]) + + #define TARGET_OS_CPP_BUILTINS() \ + do \ +diff --git a/gcc/config/i386/haiku64.h b/gcc/config/i386/haiku64.h +index 3781045..d9d99c3 100644 +--- a/gcc/config/i386/haiku64.h ++++ b/gcc/config/i386/haiku64.h +@@ -30,9 +30,9 @@ Boston, MA 02111-1307, USA. */ + #undef DEFAULT_PCC_STRUCT_RETURN + #define DEFAULT_PCC_STRUCT_RETURN 1 + +-#undef DBX_REGISTER_NUMBER +-#define DBX_REGISTER_NUMBER(n) \ +- (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n]) ++#undef DEBUGGER_REGNO ++#define DEBUGGER_REGNO(n) \ ++ (TARGET_64BIT ? debugger64_register_map[n] : svr4_debugger_register_map[n]) + + #define TARGET_OS_CPP_BUILTINS() \ + do \ +-- +2.37.3 + + +From 12bd93b7b7bdfac702c1ccf80e159c5fd56d8f94 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 10 Jun 2024 16:45:13 +0200 +Subject: libstdc++: fix posix_memalign signature + + +diff --git a/libstdc++-v3/libsupc++/new_opa.cc b/libstdc++-v3/libsupc++/new_opa.cc +index 29767c1..3c06b5c 100644 +--- a/libstdc++-v3/libsupc++/new_opa.cc ++++ b/libstdc++-v3/libsupc++/new_opa.cc +@@ -47,7 +47,7 @@ using std::size_t; + extern "C" + { + # if _GLIBCXX_HAVE_POSIX_MEMALIGN +- void *posix_memalign(void **, size_t alignment, size_t size); ++ int posix_memalign(void **, size_t alignment, size_t size); + # elif _GLIBCXX_HAVE_ALIGNED_ALLOC + void *aligned_alloc(size_t alignment, size_t size); + # elif _GLIBCXX_HAVE__ALIGNED_MALLOC +-- +2.37.3