git: c7644898c7e1 - main - lang/ghc: Add a patch for correctly selecting a LLVM backend.

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Sun, 13 Feb 2022 18:24:27 UTC
The branch main has been updated by arrowd:

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

commit c7644898c7e173dd486e0a23b07c487d2460dee9
Author:     Filipe da Silva Santos <contact@shiori.com.br>
AuthorDate: 2022-02-13 18:19:38 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2022-02-13 18:23:45 +0000

    lang/ghc: Add a patch for correctly selecting a LLVM backend.
    
    PR:             261798
    MFH:            2022Q1
---
 lang/ghc/Makefile                                          |  1 +
 lang/ghc/files/patch-llvm-targets                          | 11 +++++++++++
 lang/ghc/files/patch-utils_llvm-targets_gen-data-layout.sh | 11 +++++++++++
 3 files changed, 23 insertions(+)

diff --git a/lang/ghc/Makefile b/lang/ghc/Makefile
index 6d2f987eee0d..54fcd2a8ef3d 100644
--- a/lang/ghc/Makefile
+++ b/lang/ghc/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	ghc
 PORTVERSION=	${GHC_VERSION}
+PORTREVISION=	1
 CATEGORIES=	lang haskell
 MASTER_SITES=	https://www.haskell.org/ghc/dist/${PORTVERSION}/:source \
 		LOCAL/arrowd/:boot \
diff --git a/lang/ghc/files/patch-llvm-targets b/lang/ghc/files/patch-llvm-targets
new file mode 100644
index 000000000000..7e46cd9c46e5
--- /dev/null
+++ b/lang/ghc/files/patch-llvm-targets
@@ -0,0 +1,11 @@
+--- llvm-targets.orig	2022-02-08 06:25:29 UTC
++++ llvm-targets
+@@ -42,7 +42,7 @@
+ ,("aarch64-apple-ios", ("e-m:o-i64:64-i128:128-n32:64-S128", "apple-a7", "+fp-armv8 +neon +crypto +zcm +zcz +sha2 +aes"))
+ ,("i386-apple-ios", ("e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:128-n8:16:32-S128", "yonah", ""))
+ ,("x86_64-apple-ios", ("e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", "core2", ""))
+-,("amd64-portbld-freebsd", ("e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", "x86-64", ""))
++,("x86_64-portbld-freebsd", ("e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", "x86-64", ""))
+ ,("x86_64-unknown-freebsd", ("e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", "x86-64", ""))
+ ,("aarch64-unknown-freebsd", ("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", "generic", "+neon"))
+ ,("armv6-unknown-freebsd-gnueabihf", ("e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64", "arm1176jzf-s", "+strict-align"))
diff --git a/lang/ghc/files/patch-utils_llvm-targets_gen-data-layout.sh b/lang/ghc/files/patch-utils_llvm-targets_gen-data-layout.sh
new file mode 100644
index 000000000000..7c5cddbd2bbd
--- /dev/null
+++ b/lang/ghc/files/patch-utils_llvm-targets_gen-data-layout.sh
@@ -0,0 +1,11 @@
+--- utils/llvm-targets/gen-data-layout.sh.orig	2022-02-08 06:25:08 UTC
++++ utils/llvm-targets/gen-data-layout.sh
+@@ -93,7 +93,7 @@ TARGETS=(
+     #########################
+
+     # FreeBSD amd64
+-    "amd64-portbld-freebsd"
++    "x86_64-portbld-freebsd"
+     "x86_64-unknown-freebsd" # See #15718
+
+     # FreeBSD ARM