git: d1f8dd148d22 - main - devel/llvm-devel: fix compiler-rt build on current

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Tue, 27 Jun 2023 17:25:30 UTC
The branch main has been updated by brooks:

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

commit d1f8dd148d220f4a205bb9ca39040616db9b7254
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2023-06-27 17:12:15 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2023-06-27 17:24:48 +0000

    devel/llvm-devel: fix compiler-rt build on current
    
    Bump cpuset size to 1024 on newer current. Newly added sanitizer
    support for cpuset_getaffinity(2) hardcodes the size so bump it to
    match CPU_MAXSIZE (it's not obviously possible to extract it from
    sys/_cpuset.h).
    
    PR:             272235
    Issue:          https://github.com/llvm/llvm-project/issues/63485
    Submitted by:   jfc@mit.edu
---
 ...anitizer__common_sanitizer__platform__limits__freebsd.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/devel/llvm-devel/files/patch-compiler-rt_lib_sanitizer__common_sanitizer__platform__limits__freebsd.h b/devel/llvm-devel/files/patch-compiler-rt_lib_sanitizer__common_sanitizer__platform__limits__freebsd.h
new file mode 100644
index 000000000000..55417e694774
--- /dev/null
+++ b/devel/llvm-devel/files/patch-compiler-rt_lib_sanitizer__common_sanitizer__platform__limits__freebsd.h
@@ -0,0 +1,14 @@
+--- compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h.orig
++++ compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
+@@ -717,7 +717,11 @@
+ extern unsigned struct_StringList_sz;
+ 
+ struct __sanitizer_cpuset {
++#if __FreeBSD_version >= 1400090
++  long __bits[(1024 + (sizeof(long) * 8) - 1) / (sizeof(long) * 8)];
++#else
+   long __bits[(256 + (sizeof(long) * 8) - 1) / (sizeof(long) * 8)];
++#endif
+ };
+ 
+ typedef struct __sanitizer_cpuset __sanitizer_cpuset_t;