git: f4e302c0416a - main - lang/gcc13: switch to using clang on powerpc64*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Tue, 02 May 2023 09:42:06 UTC
The branch main has been updated by pkubaj:

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

commit f4e302c0416a53ceec6c9605234b570f775167db
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-05-02 09:39:47 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-05-02 09:39:47 +0000

    lang/gcc13: switch to using clang on powerpc64*
    
    As with other released GCC versions (as opposed to snapshots), use base
    clang to build this port.
---
 lang/gcc13/Makefile                   |  5 +----
 lang/gcc13/files/patch-clang-vec_step | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/lang/gcc13/Makefile b/lang/gcc13/Makefile
index e3124b815daf..307fd5954450 100644
--- a/lang/gcc13/Makefile
+++ b/lang/gcc13/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	gcc
 PORTVERSION=	13.1.0
+PORTREVISION=	1
 CATEGORIES=	lang
 MASTER_SITES=	GCC
 PKGNAMESUFFIX=	${SUFFIX}
@@ -67,10 +68,6 @@ CONFIGURE_TARGET=	x86_64-portbld-${OPSYS:tl}${OSREL}
 
 .elif defined(PPC_ABI) && ${PPC_ABI} == ELFv2
 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/files/patch-clang-vec_step b/lang/gcc13/files/patch-clang-vec_step
new file mode 100644
index 000000000000..00607540eb2a
--- /dev/null
+++ b/lang/gcc13/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.