git: 165af9b4a218 - main - lang/gcc11: build with clang on powerpc64le

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Tue, 19 Apr 2022 12:09:25 UTC
The branch main has been updated by pkubaj:

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

commit 165af9b4a218483ab15b0a039bdb588f2494f5b6
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-04-17 18:35:24 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-04-19 12:09:14 +0000

    lang/gcc11: build with clang on powerpc64le
    
    Copy the patch used for other gcc versions.
---
 lang/gcc11/Makefile                   |  3 ---
 lang/gcc11/files/patch-clang-vec_step | 21 +++++++++++++++++++++
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/lang/gcc11/Makefile b/lang/gcc11/Makefile
index 015cf4ef306c..3d14c2ab2ea6 100644
--- a/lang/gcc11/Makefile
+++ b/lang/gcc11/Makefile
@@ -64,9 +64,6 @@ CONFIGURE_ENV+=	UNAME_m="powerpc64"
 CONFIGURE_ARGS+=	--with-abi=elfv2
 . endif
 USE_GCC=	yes
-
-.elif ${ARCH} == powerpc64le
-USE_GCC=	yes
 .endif
 
 LANGUAGES:=	c,c++,objc,fortran,jit
diff --git a/lang/gcc11/files/patch-clang-vec_step b/lang/gcc11/files/patch-clang-vec_step
new file mode 100644
index 000000000000..68fbeedad582
--- /dev/null
+++ b/lang/gcc11/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.c
+===================================================================
+--- gcc/tree-vect-loop.c	(revision 273856)
++++ gcc/tree-vect-loop.c	(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.