From: Brad Smith Subject: UPDATE: various GCC ports on powerpc64 To: ports@openbsd.org Date: Wed, 14 Oct 2026 19:44:47 -0400 Fix various GCC ports on powerpc64 by either renaming the existing patch since GCC has moved from C to C++ for newer versions or add the missing patch. For the x86_64-elf port it only builds on amd64 so remove the ununused bits from the Makefile. Index: devel/arm-none-eabi/gcc/Makefile =================================================================== RCS file: /cvs/ports/devel/arm-none-eabi/gcc/Makefile,v retrieving revision 1.9 diff -u -p -u -p -r1.9 Makefile --- devel/arm-none-eabi/gcc/Makefile 12 Mar 2026 15:29:28 -0000 1.9 +++ devel/arm-none-eabi/gcc/Makefile 14 Oct 2026 23:18:29 -0000 @@ -1,5 +1,3 @@ -BROKEN-powerpc64 = fails to apply patches/vecstep-* - COMMENT= gcc for ${CONFIG} cross-development VERSION= 12.2.0 Index: devel/arm-none-eabi/gcc/patches/vecstep-gcc_tree-vect-loop_c =================================================================== RCS file: devel/arm-none-eabi/gcc/patches/vecstep-gcc_tree-vect-loop_c diff -N devel/arm-none-eabi/gcc/patches/vecstep-gcc_tree-vect-loop_c --- devel/arm-none-eabi/gcc/patches/vecstep-gcc_tree-vect-loop_c 22 Apr 2023 16:23:25 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,16 +0,0 @@ -clang on powerpc64 defines vec_step already which collides with the -symbol in gcc, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266#c23 -renaming suggested at https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00131.html - -Index: gcc/tree-vect-loop.c ---- gcc/tree-vect-loop.c.orig -+++ gcc/tree-vect-loop.c -@@ -55,6 +55,8 @@ along with GCC; see the file COPYING3. If not see - #include "vec-perm-indices.h" - #include "tree-eh.h" - -+#define vec_step vec_step_ -+ - /* Loop Vectorization Pass. - - This pass tries to vectorize loops. Index: devel/arm-none-eabi/gcc/patches/vecstep-gcc_tree-vect-loop_cc =================================================================== RCS file: devel/arm-none-eabi/gcc/patches/vecstep-gcc_tree-vect-loop_cc diff -N devel/arm-none-eabi/gcc/patches/vecstep-gcc_tree-vect-loop_cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/arm-none-eabi/gcc/patches/vecstep-gcc_tree-vect-loop_cc 14 Oct 2026 23:18:29 -0000 @@ -0,0 +1,16 @@ +clang on powerpc64 defines vec_step already which collides with the +symbol in gcc, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266#c23 +renaming suggested at https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00131.html + +Index: gcc/tree-vect-loop.cc +--- gcc/tree-vect-loop.cc.orig ++++ gcc/tree-vect-loop.cc +@@ -56,6 +56,8 @@ along with GCC; see the file COPYING3. If not see + #include "tree-eh.h" + #include "case-cfn-macros.h" + ++#define vec_step vec_step_ ++ + /* Loop Vectorization Pass. + + This pass tries to vectorize loops. Index: devel/msp430/gcc/patches/vecstep-gcc_tree-vect-loop_c =================================================================== RCS file: /cvs/ports/devel/msp430/gcc/patches/vecstep-gcc_tree-vect-loop_c,v retrieving revision 1.2 diff -u -p -u -p -r1.2 vecstep-gcc_tree-vect-loop_c --- devel/msp430/gcc/patches/vecstep-gcc_tree-vect-loop_c 11 Mar 2022 18:50:50 -0000 1.2 +++ devel/msp430/gcc/patches/vecstep-gcc_tree-vect-loop_c 14 Oct 2026 23:18:29 -0000 @@ -5,9 +5,9 @@ renaming suggested at https://gcc.gnu.or Index: gcc/tree-vect-loop.c --- gcc/tree-vect-loop.c.orig +++ gcc/tree-vect-loop.c -@@ -55,6 +55,8 @@ along with GCC; see the file COPYING3. If not see - #include "vec-perm-indices.h" - #include "tree-eh.h" +@@ -43,6 +43,8 @@ along with GCC; see the file COPYING3. If not see + #include "tree-vectorizer.h" + #include "target.h" +#define vec_step vec_step_ + Index: devel/riscv-elf/gcc/Makefile =================================================================== RCS file: /cvs/ports/devel/riscv-elf/gcc/Makefile,v retrieving revision 1.15 diff -u -p -u -p -r1.15 Makefile --- devel/riscv-elf/gcc/Makefile 3 Jul 2025 20:34:45 -0000 1.15 +++ devel/riscv-elf/gcc/Makefile 14 Oct 2026 23:18:29 -0000 @@ -1,4 +1,3 @@ -BROKEN-powerpc64 = fails to apply patches/vecstep-* BROKEN-arm = spins CPU more than 12h building gcc-12.2.0/libgcc/libgcc2.c COMMENT= gcc for riscv-elf cross-development Index: devel/riscv-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c =================================================================== RCS file: devel/riscv-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c diff -N devel/riscv-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c --- devel/riscv-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c 11 Mar 2022 18:53:10 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,16 +0,0 @@ -clang on powerpc64 defines vec_step already which collides with the -symbol in gcc, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266#c23 -renaming suggested at https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00131.html - -Index: gcc/tree-vect-loop.c ---- gcc/tree-vect-loop.c.orig -+++ gcc/tree-vect-loop.c -@@ -55,6 +55,8 @@ along with GCC; see the file COPYING3. If not see - #include "vec-perm-indices.h" - #include "tree-eh.h" - -+#define vec_step vec_step_ -+ - /* Loop Vectorization Pass. - - This pass tries to vectorize loops. Index: devel/riscv-elf/gcc/patches/vecstep-gcc_tree-vect-loop_cc =================================================================== RCS file: devel/riscv-elf/gcc/patches/vecstep-gcc_tree-vect-loop_cc diff -N devel/riscv-elf/gcc/patches/vecstep-gcc_tree-vect-loop_cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/riscv-elf/gcc/patches/vecstep-gcc_tree-vect-loop_cc 14 Oct 2026 23:18:29 -0000 @@ -0,0 +1,16 @@ +clang on powerpc64 defines vec_step already which collides with the +symbol in gcc, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266#c23 +renaming suggested at https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00131.html + +Index: gcc/tree-vect-loop.cc +--- gcc/tree-vect-loop.cc.orig ++++ gcc/tree-vect-loop.cc +@@ -56,6 +56,8 @@ along with GCC; see the file COPYING3. If not see + #include "tree-eh.h" + #include "case-cfn-macros.h" + ++#define vec_step vec_step_ ++ + /* Loop Vectorization Pass. + + This pass tries to vectorize loops. Index: devel/riscv32-esp-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c =================================================================== RCS file: devel/riscv32-esp-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c diff -N devel/riscv32-esp-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/riscv32-esp-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c 14 Oct 2026 23:18:29 -0000 @@ -0,0 +1,16 @@ +clang on powerpc64 defines vec_step already which collides with the +symbol in gcc, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266#c23 +renaming suggested at https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00131.html + +Index: gcc/tree-vect-loop.c +--- gcc/tree-vect-loop.c.orig ++++ gcc/tree-vect-loop.c +@@ -55,6 +55,8 @@ along with GCC; see the file COPYING3. If not see + #include "vec-perm-indices.h" + #include "tree-eh.h" + ++#define vec_step vec_step_ ++ + /* Loop Vectorization Pass. + + This pass tries to vectorize loops. Index: devel/riscv32-esp-elf/gcc-bootstrap/Makefile =================================================================== RCS file: /cvs/ports/devel/riscv32-esp-elf/gcc-bootstrap/Makefile,v retrieving revision 1.4 diff -u -p -u -p -r1.4 Makefile --- devel/riscv32-esp-elf/gcc-bootstrap/Makefile 2 Jun 2026 12:44:38 -0000 1.4 +++ devel/riscv32-esp-elf/gcc-bootstrap/Makefile 14 Oct 2026 23:18:29 -0000 @@ -1,5 +1,3 @@ -BROKEN-powerpc64 = fails to apply patches/vecstep-* - COMMENT = bootstrap compiler for ${CONFIG} cross-development V = 8.4.0 Index: devel/riscv32-esp-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c =================================================================== RCS file: devel/riscv32-esp-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c diff -N devel/riscv32-esp-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/riscv32-esp-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c 14 Oct 2026 23:18:29 -0000 @@ -0,0 +1,16 @@ +clang on powerpc64 defines vec_step already which collides with the +symbol in gcc, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266#c23 +renaming suggested at https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00131.html + +Index: gcc/tree-vect-loop.c +--- gcc/tree-vect-loop.c.orig ++++ gcc/tree-vect-loop.c +@@ -55,6 +55,8 @@ along with GCC; see the file COPYING3. If not see + #include "vec-perm-indices.h" + #include "tree-eh.h" + ++#define vec_step vec_step_ ++ + /* Loop Vectorization Pass. + + This pass tries to vectorize loops. Index: devel/xtensa-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c =================================================================== RCS file: /cvs/ports/devel/xtensa-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c,v retrieving revision 1.2 diff -u -p -u -p -r1.2 vecstep-gcc_tree-vect-loop_c --- devel/xtensa-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c 11 Mar 2022 18:53:36 -0000 1.2 +++ devel/xtensa-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c 14 Oct 2026 23:18:29 -0000 @@ -5,9 +5,9 @@ renaming suggested at https://gcc.gnu.or Index: gcc/tree-vect-loop.c --- gcc/tree-vect-loop.c.orig +++ gcc/tree-vect-loop.c -@@ -55,6 +55,8 @@ along with GCC; see the file COPYING3. If not see - #include "vec-perm-indices.h" - #include "tree-eh.h" +@@ -48,6 +48,8 @@ along with GCC; see the file COPYING3. If not see + #include "gimple-fold.h" + #include "cgraph.h" +#define vec_step vec_step_ + Index: devel/xtensa-esp32s2-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c =================================================================== RCS file: devel/xtensa-esp32s2-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c diff -N devel/xtensa-esp32s2-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/xtensa-esp32s2-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c 14 Oct 2026 23:18:29 -0000 @@ -0,0 +1,16 @@ +clang on powerpc64 defines vec_step already which collides with the +symbol in gcc, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266#c23 +renaming suggested at https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00131.html + +Index: gcc/tree-vect-loop.c +--- gcc/tree-vect-loop.c.orig ++++ gcc/tree-vect-loop.c +@@ -55,6 +55,8 @@ along with GCC; see the file COPYING3. If not see + #include "vec-perm-indices.h" + #include "tree-eh.h" + ++#define vec_step vec_step_ ++ + /* Loop Vectorization Pass. + + This pass tries to vectorize loops. Index: devel/xtensa-esp32s2-elf/gcc-bootstrap/Makefile =================================================================== RCS file: /cvs/ports/devel/xtensa-esp32s2-elf/gcc-bootstrap/Makefile,v retrieving revision 1.5 diff -u -p -u -p -r1.5 Makefile --- devel/xtensa-esp32s2-elf/gcc-bootstrap/Makefile 2 Jun 2026 12:44:38 -0000 1.5 +++ devel/xtensa-esp32s2-elf/gcc-bootstrap/Makefile 14 Oct 2026 23:18:29 -0000 @@ -1,5 +1,3 @@ -BROKEN-powerpc64 = fails to apply patches/vecstep-* - COMMENT = bootstrap compiler for ${CONFIG} cross-development V = 8.4.0 Index: devel/xtensa-esp32s2-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c =================================================================== RCS file: devel/xtensa-esp32s2-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c diff -N devel/xtensa-esp32s2-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/xtensa-esp32s2-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c 14 Oct 2026 23:18:29 -0000 @@ -0,0 +1,16 @@ +clang on powerpc64 defines vec_step already which collides with the +symbol in gcc, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266#c23 +renaming suggested at https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00131.html + +Index: gcc/tree-vect-loop.c +--- gcc/tree-vect-loop.c.orig ++++ gcc/tree-vect-loop.c +@@ -55,6 +55,8 @@ along with GCC; see the file COPYING3. If not see + #include "vec-perm-indices.h" + #include "tree-eh.h" + ++#define vec_step vec_step_ ++ + /* Loop Vectorization Pass. + + This pass tries to vectorize loops. Index: devel/xtensa-esp32s3-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c =================================================================== RCS file: devel/xtensa-esp32s3-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c diff -N devel/xtensa-esp32s3-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/xtensa-esp32s3-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c 14 Oct 2026 23:18:29 -0000 @@ -0,0 +1,16 @@ +clang on powerpc64 defines vec_step already which collides with the +symbol in gcc, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266#c23 +renaming suggested at https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00131.html + +Index: gcc/tree-vect-loop.c +--- gcc/tree-vect-loop.c.orig ++++ gcc/tree-vect-loop.c +@@ -55,6 +55,8 @@ along with GCC; see the file COPYING3. If not see + #include "vec-perm-indices.h" + #include "tree-eh.h" + ++#define vec_step vec_step_ ++ + /* Loop Vectorization Pass. + + This pass tries to vectorize loops. Index: devel/xtensa-esp32s3-elf/gcc-bootstrap/Makefile =================================================================== RCS file: /cvs/ports/devel/xtensa-esp32s3-elf/gcc-bootstrap/Makefile,v retrieving revision 1.5 diff -u -p -u -p -r1.5 Makefile --- devel/xtensa-esp32s3-elf/gcc-bootstrap/Makefile 2 Jun 2026 12:44:38 -0000 1.5 +++ devel/xtensa-esp32s3-elf/gcc-bootstrap/Makefile 14 Oct 2026 23:18:29 -0000 @@ -1,5 +1,3 @@ -BROKEN-powerpc64 = fails to apply patches/vecstep-* - COMMENT = bootstrap compiler for ${CONFIG} cross-development V = 8.4.0 Index: devel/xtensa-esp32s3-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c =================================================================== RCS file: devel/xtensa-esp32s3-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c diff -N devel/xtensa-esp32s3-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/xtensa-esp32s3-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c 14 Oct 2026 23:18:29 -0000 @@ -0,0 +1,16 @@ +clang on powerpc64 defines vec_step already which collides with the +symbol in gcc, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266#c23 +renaming suggested at https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00131.html + +Index: gcc/tree-vect-loop.c +--- gcc/tree-vect-loop.c.orig ++++ gcc/tree-vect-loop.c +@@ -55,6 +55,8 @@ along with GCC; see the file COPYING3. If not see + #include "vec-perm-indices.h" + #include "tree-eh.h" + ++#define vec_step vec_step_ ++ + /* Loop Vectorization Pass. + + This pass tries to vectorize loops. Index: devel/xtensa-lx106-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c =================================================================== RCS file: devel/xtensa-lx106-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c diff -N devel/xtensa-lx106-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/xtensa-lx106-elf/gcc/patches/vecstep-gcc_tree-vect-loop_c 14 Oct 2026 23:18:30 -0000 @@ -0,0 +1,16 @@ +clang on powerpc64 defines vec_step already which collides with the +symbol in gcc, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266#c23 +renaming suggested at https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00131.html + +Index: gcc/tree-vect-loop.c +--- gcc/tree-vect-loop.c.orig ++++ gcc/tree-vect-loop.c +@@ -54,6 +54,8 @@ along with GCC; see the file COPYING3. If not see + #include "vec-perm-indices.h" + #include "tree-eh.h" + ++#define vec_step vec_step_ ++ + /* Loop Vectorization Pass. + + This pass tries to vectorize loops. Index: devel/xtensa-lx106-elf/gcc-bootstrap/Makefile =================================================================== RCS file: /cvs/ports/devel/xtensa-lx106-elf/gcc-bootstrap/Makefile,v retrieving revision 1.13 diff -u -p -u -p -r1.13 Makefile --- devel/xtensa-lx106-elf/gcc-bootstrap/Makefile 2 Jun 2026 12:44:38 -0000 1.13 +++ devel/xtensa-lx106-elf/gcc-bootstrap/Makefile 14 Oct 2026 23:18:30 -0000 @@ -1,5 +1,3 @@ -BROKEN-powerpc64 = fails to apply patches/vecstep-* - COMMENT = bootstrap compiler for ${CONFIG} cross-development VERSION = 10.2.0 Index: devel/xtensa-lx106-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c =================================================================== RCS file: devel/xtensa-lx106-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c diff -N devel/xtensa-lx106-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ devel/xtensa-lx106-elf/gcc-bootstrap/patches/vecstep-gcc_tree-vect-loop_c 14 Oct 2026 23:18:30 -0000 @@ -0,0 +1,16 @@ +clang on powerpc64 defines vec_step already which collides with the +symbol in gcc, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266#c23 +renaming suggested at https://gcc.gnu.org/legacy-ml/gcc/2019-07/msg00131.html + +Index: gcc/tree-vect-loop.c +--- gcc/tree-vect-loop.c.orig ++++ gcc/tree-vect-loop.c +@@ -54,6 +54,8 @@ along with GCC; see the file COPYING3. If not see + #include "vec-perm-indices.h" + #include "tree-eh.h" + ++#define vec_step vec_step_ ++ + /* Loop Vectorization Pass. + + This pass tries to vectorize loops. Index: devel/x86_64-elf/gcc/Makefile =================================================================== RCS file: /cvs/ports/devel/x86_64-elf/gcc/Makefile,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 Makefile --- devel/x86_64-elf/gcc/Makefile 25 Jan 2026 18:43:28 -0000 1.1.1.1 +++ devel/x86_64-elf/gcc/Makefile 14 Oct 2026 23:18:30 -0000 @@ -14,10 +14,6 @@ COMPILER = base-clang ports-gcc base-gcc SITES= ${SITE_GCC:=releases/gcc-$(VERSION)/} -.if ${MACHINE_ARCH} == "powerpc64" -PATCH_LIST = patch-* vecstep-* -.endif - BUILD_DEPENDS+= devel/bison \ ${RUN_DEPENDS} LIB_DEPENDS= devel/mpfr devel/libmpc