git: a0b9c2356650 - main - lang/gcc9: fix build on powerpc64le

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Sat, 18 Dec 2021 19:08:52 UTC
The branch main has been updated by pkubaj:

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

commit a0b9c235665060baf86ab16dc141afa53115b3d9
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-12-18 19:06:37 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-12-18 19:06:37 +0000

    lang/gcc9: fix build on powerpc64le
    
    Backport patch from gcc9-devel to fix build.
---
 lang/gcc9/Makefile                  |  2 +-
 lang/gcc9/files/patch-gcc_configure | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/lang/gcc9/Makefile b/lang/gcc9/Makefile
index bbf434c0b83c..029662650c29 100644
--- a/lang/gcc9/Makefile
+++ b/lang/gcc9/Makefile
@@ -12,7 +12,7 @@ COMMENT=	GNU Compiler Collection 9
 LICENSE=	GPLv3 GPLv3RLE
 LICENSE_COMB=	multi
 
-ONLY_FOR_ARCHS=	aarch64 amd64 arm armv6 armv7 i386 powerpc powerpc64 sparc64
+ONLY_FOR_ARCHS=	aarch64 amd64 arm armv6 armv7 i386 powerpc powerpc64 powerpc64le sparc64
 
 LIB_DEPENDS=	libgmp.so:math/gmp \
 		libmpfr.so:math/mpfr \
diff --git a/lang/gcc9/files/patch-gcc_configure b/lang/gcc9/files/patch-gcc_configure
new file mode 100644
index 000000000000..c83a180b248d
--- /dev/null
+++ b/lang/gcc9/files/patch-gcc_configure
@@ -0,0 +1,11 @@
+--- gcc/configure.orig	2021-04-29 10:19:44 UTC
++++ gcc/configure
+@@ -29405,7 +29405,7 @@ $as_echo "#define HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE 1" 
+ esac
+ 
+ case "$target:$tm_file" in
+-  powerpc64-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
++  powerpc64*-*-freebsd* | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
+   case "$target" in
+      *le-*-linux*)
+      emul_name="-melf64lppc"