gnu: Remove clang-runtime-3.7.

* gnu/packages/llvm.scm (clang-runtime-3.7): Delete variable.
* gnu/packages/patches/clang-3.5-libsanitizer-ustat-fix.patch,
gnu/packages/patches/clang-runtime-3.7-fix-build-with-python3.patch,
gnu/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch,
gnu/packages/patches/clang-runtime-asan-build-fixes.patch: Remove files.
* gnu/local.mk (dist_patch_DATA): Unregister files.

Change-Id: I848b09d29585217b0cc3d2f9ac1867e8ee5e853c
This commit is contained in:
Andreas Enge 2025-09-19 21:02:51 +02:00
parent fe355fa142
commit 8860d76d78
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3
6 changed files with 0 additions and 217 deletions

View file

@ -1090,7 +1090,6 @@ dist_patch_DATA = \
%D%/packages/patches/clamav-config-llvm-libs.patch \
%D%/packages/patches/clamav-system-tomsfastmath.patch \
%D%/packages/patches/clang-3.5-libc-search-path.patch \
%D%/packages/patches/clang-3.5-libsanitizer-ustat-fix.patch \
%D%/packages/patches/clang-3.8-libc-search-path.patch \
%D%/packages/patches/clang-11.0-libc-search-path.patch \
%D%/packages/patches/clang-12.0-libc-search-path.patch \
@ -1104,14 +1103,11 @@ dist_patch_DATA = \
%D%/packages/patches/clang-17.0-libc-search-path.patch \
%D%/packages/patches/clang-17.0-link-dsymutil-latomic.patch \
%D%/packages/patches/clang-18.0-libc-search-path.patch \
%D%/packages/patches/clang-runtime-asan-build-fixes.patch \
%D%/packages/patches/clang-runtime-esan-build-fixes.patch \
%D%/packages/patches/clang-runtime-12-remove-crypt-interceptors.patch \
%D%/packages/patches/clang-runtime-13-glibc-2.36-compat.patch \
%D%/packages/patches/clang-runtime-14-glibc-2.36-compat.patch \
%D%/packages/patches/clang-runtime-3.7-fix-build-with-python3.patch \
%D%/packages/patches/clang-runtime-3.9-libsanitizer-mode-field.patch \
%D%/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch \
%D%/packages/patches/clasp-hide-event-ids.patch \
%D%/packages/patches/classpath-aarch64-support.patch \
%D%/packages/patches/classpath-miscompilation.patch \

View file

@ -1108,15 +1108,6 @@ Library.")
(string-append (getcwd) "/lib"))))
(delete 'install-opt-viewer)))))))
(define-public clang-runtime-3.7
(clang-runtime-from-llvm
llvm-3.7
"10c1mz2q4bdq9bqfgr3dirc6hz1h3sq8573srd5q5lr7m7j6jiwx"
'("clang-runtime-asan-build-fixes.patch"
"clang-runtime-3.8-libsanitizer-mode-field.patch"
"clang-3.5-libsanitizer-ustat-fix.patch"
"clang-runtime-3.7-fix-build-with-python3.patch")))
(define-public clang-3.7
(clang-from-llvm llvm-3.7 clang-runtime-3.7
"0x065d0w9b51xvdjxwfzjxng0gzpbx45fgiaxpap45ragi61dqjn"

View file

@ -1,46 +0,0 @@
From d9d97cac3702b99a00cd113de98c41eb535d47ed Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Sun, 14 Oct 2018 12:11:30 +0300
Subject: [PATCH] patch modified from the gcc patch series, also dealing with
ustat.
---
.../sanitizer_platform_limits_posix.cc | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
index 29fea6e..570b9a5 100644
--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -129,7 +129,6 @@
#include <sys/statvfs.h>
#include <sys/timex.h>
#include <sys/user.h>
-#include <sys/ustat.h>
#include <linux/cyclades.h>
#include <linux/if_eql.h>
#include <linux/if_plip.h>
@@ -222,7 +221,19 @@ namespace __sanitizer {
#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
#if SANITIZER_LINUX && !SANITIZER_ANDROID
- unsigned struct_ustat_sz = sizeof(struct ustat);
+ // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
+ // has been removed from glibc 2.28.
+#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
+ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \
+ || defined(__x86_64__)
+#define SIZEOF_STRUCT_USTAT 32
+#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \
+ || defined(__powerpc__) || defined(__s390__)
+#define SIZEOF_STRUCT_USTAT 20
+#else
+#error Unknown size of struct ustat
+#endif
+ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID
--
2.19.1

View file

@ -1,16 +0,0 @@
Patch based on changes from
https://github.com/llvm/llvm-project/commit/c1fde4fa943fd03a3d40bc5d32b9e0045fd29208
diff --git a/lib/sanitizer_common/scripts/gen_dynamic_list.py b/lib/sanitizer_common/scripts/gen_dynamic_list.py
index 5ea2ca1..d7bc287 100755
--- a/lib/sanitizer_common/scripts/gen_dynamic_list.py
+++ b/lib/sanitizer_common/scripts/gen_dynamic_list.py
@@ -100,7 +100,7 @@ def main(argv):
print('global:')
result.sort()
for f in result:
- print(' ' + f.encode('utf-8') + ';')
+ print(u' %s;' % f)
if args.version_list:
print('local:')
print(' *;')

View file

@ -1,50 +0,0 @@
Adjust libsanitizer to ABI change in glibc 2.31.
Adapted to 3.x from this upstream commit:
https://github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -1130,8 +1130,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
#ifndef __GLIBC_PREREQ
#define __GLIBC_PREREQ(x, y) 0
#endif
-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */
+#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31)
+/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit
+ on many architectures. */
CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
#endif
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/lib/sanitizer_common/sanitizer_platform_limits_posix.h
--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -188,17 +188,16 @@ namespace __sanitizer {
unsigned __seq;
u64 __unused1;
u64 __unused2;
-#elif defined(__mips__) || defined(__aarch64__)
- unsigned int mode;
- unsigned short __seq;
- unsigned short __pad1;
- unsigned long __unused1;
- unsigned long __unused2;
+#elif defined(__sparc__)
+ unsigned mode;
+ unsigned short __pad2;
+ unsigned short __seq;
+ unsigned long long __unused1;
+ unsigned long long __unused2;
#else
- unsigned short mode;
- unsigned short __pad1;
- unsigned short __seq;
- unsigned short __pad2;
+ unsigned int mode;
+ unsigned short __seq;
+ unsigned short __pad2;
#if defined(__x86_64__) && !defined(_LP64)
u64 __unused1;
u64 __unused2;

View file

@ -1,92 +0,0 @@
This patch works around build issues in libsanitizer. Note that we carry the
same patches for GCC since it includes the same libsanitizer.
Work around this build error on glibc 2.26:
/tmp/guix-build-clang-runtime-3.5.2.drv-0/compiler-rt-3.5.2.src/lib/asan/asan_linux.cc: In function 'bool __asan::AsanInterceptsSignal(int)':
/tmp/guix-build-clang-runtime-3.5.2.drv-0/compiler-rt-3.5.2.src/lib/asan/asan_linux.cc:224:20: error: 'SIGSEGV' was not declared in this scope
diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
index c504168..59087b9 100644
--- a/lib/asan/asan_linux.cc
+++ b/lib/asan/asan_linux.cc
@@ -29,6 +29,7 @@
#include <dlfcn.h>
#include <fcntl.h>
#include <pthread.h>
+#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <unwind.h>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now, work around this other error:
/tmp/guix-build-clang-runtime-3.5.2.drv-0/compiler-rt-3.5.2.src/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: In function 'int __sanitizer::TracerThread(void*)':
/tmp/guix-build-clang-runtime-3.5.2.drv-0/compiler-rt-3.5.2.src/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:239:22: error: aggregate 'sigaltstack handler_stack' has incomplete type and cannot be defined
diff --git a/lib/sanitizer_common/sanitizer_linux.cc b/lib/sanitizer_common/sanitizer_linux.cc
index 2cefa20..223d9c6 100644
--- a/lib/sanitizer_common/sanitizer_linux.cc
+++ b/lib/sanitizer_common/sanitizer_linux.cc
@@ -546,8 +546,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
}
#endif
-uptr internal_sigaltstack(const struct sigaltstack *ss,
- struct sigaltstack *oss) {
+uptr internal_sigaltstack(const void *ss, void *oss) {
return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
}
diff --git a/lib/sanitizer_common/sanitizer_linux.h b/lib/sanitizer_common/sanitizer_linux.h
index 4497702..1594058 100644
--- a/lib/sanitizer_common/sanitizer_linux.h
+++ b/lib/sanitizer_common/sanitizer_linux.h
@@ -19,7 +19,6 @@
#include "sanitizer_platform_limits_posix.h"
struct link_map; // Opaque type returned by dlopen().
-struct sigaltstack;
namespace __sanitizer {
// Dirent structure for getdents(). Note that this structure is different from
@@ -28,8 +27,7 @@ struct linux_dirent;
// Syscall wrappers.
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
-uptr internal_sigaltstack(const struct sigaltstack* ss,
- struct sigaltstack* oss);
+uptr internal_sigaltstack(const void* ss, void* oss);
uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
__sanitizer_sigset_t *oldset);
void internal_sigfillset(__sanitizer_sigset_t *set);
diff --git a/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
index c919e4f..014162af 100644
--- a/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+++ b/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
@@ -267,7 +267,7 @@ static int TracerThread(void* argument) {
// Alternate stack for signal handling.
InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
- struct sigaltstack handler_stack;
+ stack_t handler_stack;
internal_memset(&handler_stack, 0, sizeof(handler_stack));
handler_stack.ss_sp = handler_stack_memory.data();
handler_stack.ss_size = kHandlerStackSize;
diff --git a/lib/tsan/tsan_platform_linux.cc b/lib/tsan/tsan_platform_linux.cc
index 09cec5f..908f4fe 100644
--- a/lib/tsan/rtl/tsan_platform_linux.cc
+++ b/lib/tsan/rtl/tsan_platform_linux.cc
@@ -291,7 +291,7 @@ bool IsGlobalVar(uptr addr) {
int ExtractResolvFDs(void *state, int *fds, int nfd) {
#if SANITIZER_LINUX
int cnt = 0;
- __res_state *statp = (__res_state*)state;
+ struct __res_state *statp = (struct __res_state*)state;
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
fds[cnt++] = statp->_u._ext.nssocks[i];
--
2.9.3