git: 56fe1f80d88c - main - lang/gcc13-devel: switch to using clang, as with other stable GCC branches and remove ELFv1 support

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Fri, 05 Jan 2024 21:04:55 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=56fe1f80d88cc00855d5a1969287032f6c854054

commit 56fe1f80d88cc00855d5a1969287032f6c854054
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2024-01-05 17:57:59 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2024-01-05 21:03:54 +0000

    lang/gcc13-devel: switch to using clang, as with other stable GCC branches and remove ELFv1 support
---
 lang/gcc13-devel/Makefile                   |  6 +-----
 lang/gcc13-devel/files/patch-clang-vec_step | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/lang/gcc13-devel/Makefile b/lang/gcc13-devel/Makefile
index 0f07c7e9e8af..96dacda6509b 100644
--- a/lang/gcc13-devel/Makefile
+++ b/lang/gcc13-devel/Makefile
@@ -76,12 +76,8 @@ CXXFLAGS:=	${CFLAGS:S/mcpu=g/mcpu=G/}
 .if ${ARCH} == amd64
 CONFIGURE_TARGET=	x86_64-portbld-${OPSYS:tl}${OSREL}
 
-.elif defined(PPC_ABI) && ${PPC_ABI} == ELFv2
+.elif ${ARCH} == powerpc64
 CONFIGURE_ARGS+=	--with-abi=elfv2
-USE_GCC=	yes
-
-.elif ${ARCH} == powerpc64le
-USE_GCC=	yes
 .endif
 
 LANGUAGES:=	c,c++,objc,fortran,jit
diff --git a/lang/gcc13-devel/files/patch-clang-vec_step b/lang/gcc13-devel/files/patch-clang-vec_step
new file mode 100644
index 000000000000..00607540eb2a
--- /dev/null
+++ b/lang/gcc13-devel/files/patch-clang-vec_step
@@ -0,0 +1,21 @@
+https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239266 reports how
+clang unfortunately poisons user namespace by default (without any
+special options).
+
+Until that changes (or GCC changes) we need to avoid using vec_step
+as a variable.
+
+--- UTC
+Index: gcc/tree-vect-loop.cc
+===================================================================
+--- gcc/tree-vect-loop.cc	(revision 273856)
++++ gcc/tree-vect-loop.cc	(working copy)
+@@ -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.