git: 3b5dff3ea583 - main - devel/llvm12: make elfv2 the default on powerpc64 elfv2 systems
Piotr Kubaj
pkubaj at FreeBSD.org
Fri Aug 13 19:28:14 UTC 2021
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=3b5dff3ea583726dca0709140447c653dcc90706
commit 3b5dff3ea583726dca0709140447c653dcc90706
Author: Piotr Kubaj <pkubaj at FreeBSD.org>
AuthorDate: 2021-08-13 19:28:08 +0000
Commit: Piotr Kubaj <pkubaj at FreeBSD.org>
CommitDate: 2021-08-13 19:28:08 +0000
devel/llvm12: make elfv2 the default on powerpc64 elfv2 systems
Currently when clang is passed --target=powerpc64-unknown-freebsd argument, it creates elfv1 objects, which breaks build of firefox onpowerpc64.
---
devel/llvm12/Makefile | 6 +++++-
.../files/extra-patch-clang_lib_Driver_ToolChains_Clang.cpp | 12 ++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/devel/llvm12/Makefile b/devel/llvm12/Makefile
index edcbbda589d2..501f9edff5e5 100644
--- a/devel/llvm12/Makefile
+++ b/devel/llvm12/Makefile
@@ -1,6 +1,6 @@
PORTNAME= llvm
DISTVERSION= 12.0.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= devel lang
MASTER_SITES= https://github.com/llvm/llvm-project/releases/download/llvmorg-${DISTVERSION:S/rc/-rc/}/ \
https://${PRE_}releases.llvm.org/${LLVM_RELEASE}/${RCDIR}
@@ -241,6 +241,10 @@ EXTRAS_PATTERN= ${EXTRAS_COMMANDS:tW:C/ */|/g}|${EXTRAS_LIBS:tW:C/ */|/g}|${EX
.include <bsd.port.options.mk>
+.if defined(PPC_ABI) && ${PPC_ABI} == ELFv2
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-clang_lib_Driver_ToolChains_Clang.cpp
+.endif
+
# keep in sync with /usr/src/lib/clang/clang.build.mk
# ----------- start of sync block ------------------
# Armv6 and armv7 uses hard float abi, unless the CPUTYPE has soft in it.
diff --git a/devel/llvm12/files/extra-patch-clang_lib_Driver_ToolChains_Clang.cpp b/devel/llvm12/files/extra-patch-clang_lib_Driver_ToolChains_Clang.cpp
new file mode 100644
index 000000000000..37304e59f444
--- /dev/null
+++ b/devel/llvm12/files/extra-patch-clang_lib_Driver_ToolChains_Clang.cpp
@@ -0,0 +1,12 @@
+--- clang/lib/Driver/ToolChains/Clang.cpp.orig 2021-08-11 19:51:00.122735000 +0200
++++ clang/lib/Driver/ToolChains/Clang.cpp 2021-08-11 19:51:24.346107000 +0200
+@@ -1921,8 +1921,7 @@
+ if (T.isOSBinFormatELF()) {
+ switch (getToolChain().getArch()) {
+ case llvm::Triple::ppc64: {
+- if ((T.isOSFreeBSD() && T.getOSMajorVersion() >= 13) ||
+- T.isOSOpenBSD() || T.isMusl())
++ if (T.isOSFreeBSD() || T.isOSOpenBSD() || T.isMusl())
+ ABIName = "elfv2";
+ else
+ ABIName = "elfv1";
More information about the dev-commits-ports-all
mailing list