git: f3785e527f7f - main - devel/llvm19: update to 19.1.0-rc4

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Tue, 03 Sep 2024 21:39:09 UTC
The branch main has been updated by brooks:

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

commit f3785e527f7f924b78c7b9049db40faa1ba0c095
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2024-09-03 21:30:27 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-09-03 21:38:28 +0000

    devel/llvm19: update to 19.1.0-rc4
    
    arm_bf16.h is installed by the ARM backend as well as AArch64 so handle
    that.
    
    Patch out upstream 6d7e428df611 which traded a false negative for a
    false positive when compiling compiler-rt for i386.
    
    Fix default options for 32-bit powerpc arches.
    
    PR:             281179
---
 devel/llvm19/Makefile                        | 18 ++++++++++--------
 devel/llvm19/distinfo                        |  6 +++---
 devel/llvm19/files/patch-revert-6d7e428df611 | 17 +++++++++++++++++
 3 files changed, 30 insertions(+), 11 deletions(-)

diff --git a/devel/llvm19/Makefile b/devel/llvm19/Makefile
index 3762328ec186..bb3ead7aaf31 100644
--- a/devel/llvm19/Makefile
+++ b/devel/llvm19/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	llvm
-DISTVERSION=	19.1.0-rc3
+DISTVERSION=	19.1.0-rc4
 PORTREVISION=	0
 CATEGORIES=	devel lang
 MASTER_SITES=	https://github.com/llvm/llvm-project/releases/download/llvmorg-${DISTVERSION}/
@@ -92,10 +92,11 @@ OPTIONS_SINGLE_BACKENDS=BE_FREEBSD BE_NATIVE BE_STANDARD
 OPTIONS_DEFAULT=	CLANG LLD
 
 # BE_NATIVE for 32-bit
-OPTIONS_DEFAULT_armv6=	BE_NATIVE
-OPTIONS_DEFAULT_armv7=	BE_NATIVE
-OPTIONS_DEFAULT_i386=	BE_NATIVE
-OPTIONS_DEFAULT_power=	BE_NATIVE
+OPTIONS_DEFAULT_armv6=		BE_NATIVE
+OPTIONS_DEFAULT_armv7=		BE_NATIVE
+OPTIONS_DEFAULT_i386=		BE_NATIVE
+OPTIONS_DEFAULT_powerpc=	BE_NATIVE
+OPTIONS_DEFAULT_powerpcspe=	BE_NATIVE
 # FLAVOR-dependent BE for 64-bit
 _BE_default=	BE_STANDARD BE_AMDGPU BE_WASM
 _BE_lite=	BE_FREEBSD BE_AMDGPU BE_WASM
@@ -394,8 +395,8 @@ _BE_INCS_AArch64=	arm_bf16.h
 _BE_LIBS_AArch64=	AsmParser Disassembler Utils
 _BE_LIBS_BACKWARDS_AArch64=Exegesis
 _BE_LIBS_AMDGPU=	AsmParser Disassembler TargetMCA Utils
-_BE_INCS_ARM=		arm_cde.h arm_fp16.h arm_mve.h arm_neon.h arm_sme.h \
-			arm_sve.h arm_vector_types.h
+_BE_INCS_ARM=		arm_bf16.h arm_cde.h arm_fp16.h arm_mve.h arm_neon.h \
+			arm_sme.h arm_sve.h arm_vector_types.h
 _BE_LIBS_ARM=		AsmParser Disassembler Utils
 _BE_LIBS_AVR=		AsmParser Disassembler
 _BE_LIBS_BPF=		AsmParser Disassembler
@@ -422,9 +423,10 @@ _BE_LIBS_XCore=		Disassembler
 _BE_LIBS_${BE}+=	${_BE_LIBS_COMMON:S/^/${BE_ARCH}/} \
 			${_BE_LIBS_${BE_ARCH}:S/^/${BE_ARCH}/} \
 			${_BE_LIBS_BACKWARDS_${BE_ARCH}:S/$/${BE_ARCH}/}
-_BE_INCS_${BE}+=	${_BE_INCS_${BE_ARCH}}
+__BE_INCS_${BE}+=	${_BE_INCS_${BE_ARCH}}
 _BE_MODS_${BE}+=	${_BE_MODS_${BE_ARCH}}
 .endfor
+_BE_INCS_${BE}=		${__BE_INCS_${BE}:O:u}
 .endfor
 BE_PATTERN=LLVM(${_BE_LIBS_STANDARD:O:S/$/.a/:ts|})|${_BE_INCS_STANDARD:ts|}|${_BE_MODS_STANDARD:ts|}
 
diff --git a/devel/llvm19/distinfo b/devel/llvm19/distinfo
index 429c3558117b..ee9c202dc018 100644
--- a/devel/llvm19/distinfo
+++ b/devel/llvm19/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1724434564
-SHA256 (llvm-project-19.1.0-rc3.src.tar.xz) = ea80f9d588abb4837bd6bfb84ee5e4fff3ea2bd87e754615bc578308ad248e38
-SIZE (llvm-project-19.1.0-rc3.src.tar.xz) = 141250388
+TIMESTAMP = 1725385330
+SHA256 (llvm-project-19.1.0-rc4.src.tar.xz) = 224eb00d8281377802545442f24ae085c493d5caffaaac610056fa6835b9c4b4
+SIZE (llvm-project-19.1.0-rc4.src.tar.xz) = 141255904
diff --git a/devel/llvm19/files/patch-revert-6d7e428df611 b/devel/llvm19/files/patch-revert-6d7e428df611
new file mode 100644
index 000000000000..07f556e9284c
--- /dev/null
+++ b/devel/llvm19/files/patch-revert-6d7e428df611
@@ -0,0 +1,17 @@
+--- compiler-rt/lib/builtins/CMakeLists.txt.orig
++++ compiler-rt/lib/builtins/CMakeLists.txt
+@@ -867,12 +867,10 @@
+           endif()
+         endif()
+       endif()
+-      check_c_source_compiles("_Float16 foo(_Float16 x) { return x; }
+-                               int main(void) { return 0; }"
++      check_c_source_compiles("_Float16 foo(_Float16 x) { return x; }"
+                               COMPILER_RT_HAS_${arch}_FLOAT16)
+       append_list_if(COMPILER_RT_HAS_${arch}_FLOAT16 -DCOMPILER_RT_HAS_FLOAT16 BUILTIN_CFLAGS_${arch})
+-      check_c_source_compiles("__bf16 foo(__bf16 x) { return x; }
+-                               int main(void) { return 0; }"
++      check_c_source_compiles("__bf16 foo(__bf16 x) { return x; }"
+                               COMPILER_RT_HAS_${arch}_BFLOAT16)
+       # Build BF16 files only when "__bf16" is available.
+       if(COMPILER_RT_HAS_${arch}_BFLOAT16)