mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-07-27 11:22:34 +00:00
remove old patches
This commit is contained in:
parent
19672095b1
commit
29f1dabde5
@ -1,24 +0,0 @@
|
|||||||
From 8984b5d9a9bb143844e716db79388808f6944270 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sylvestre Ledru <sylvestre@debian.org>
|
|
||||||
Date: Sun, 18 Oct 2020 18:56:17 +0200
|
|
||||||
Subject: [PATCH 1/3] tsan doesn't work on arm
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/test_tsan.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/integration-test-suite/tests/test_tsan.c b/tests/test_tsan.c
|
|
||||||
index ed9aaec..197d3a4 100644
|
|
||||||
--- a/integration-test-suite/tests/test_tsan.c
|
|
||||||
+++ b/integration-test-suite/tests/test_tsan.c
|
|
||||||
@@ -5,6 +5,7 @@
|
|
||||||
// RUN: %llvm-nm %t | grep __tsan
|
|
||||||
// RUN: env TSAN_OPTIONS="log_path=stdout:exitcode=0" %t 2>&1 > %t.out
|
|
||||||
// RUN: grep -q "data race" %t.out
|
|
||||||
+// XFAIL: arm
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
--
|
|
||||||
2.28.0
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From 77f09cd056d5183fa048d2b8fdc29302dca25ed7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sylvestre Ledru <sylvestre@debian.org>
|
|
||||||
Date: Mon, 19 Oct 2020 14:43:32 +0200
|
|
||||||
Subject: [PATCH 2/3] Disable test_asan_heap.c for arm (#30)
|
|
||||||
|
|
||||||
Unsupported on this arch:
|
|
||||||
clang: error: unsupported option '-fsanitize=thread' for target 'armv7l-unknown-linux-gnueabihf'
|
|
||||||
---
|
|
||||||
tests/test_asan_heap.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/integration-test-suite/tests/test_asan_heap.c b/tests/test_asan_heap.c
|
|
||||||
index 828ac4f..f021703 100644
|
|
||||||
--- a/integration-test-suite/tests/test_asan_heap.c
|
|
||||||
+++ b/integration-test-suite/tests/test_asan_heap.c
|
|
||||||
@@ -4,6 +4,7 @@
|
|
||||||
// RUN: %clang -o %t -fsanitize=address -O1 -fno-omit-frame-pointer -g %s
|
|
||||||
// RUN: env ASAN_OPTIONS="log_path=stdout:exitcode=0" %t 2>&1 > %t.out
|
|
||||||
// RUN: grep -q "heap-use-after-free" %t.out
|
|
||||||
+// XFAIL: arm
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
int main() {
|
|
||||||
--
|
|
||||||
2.28.0
|
|
||||||
|
|
35
debian/patches/0003-leaksan-add-a-test-31.patch
vendored
35
debian/patches/0003-leaksan-add-a-test-31.patch
vendored
@ -1,35 +0,0 @@
|
|||||||
From 5fd1282d17fb5db341239af2853ab12f4ff141c8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Sylvestre Ledru <sylvestre@debian.org>
|
|
||||||
Date: Mon, 19 Oct 2020 14:55:20 +0200
|
|
||||||
Subject: [PATCH 3/3] leaksan: add a test (#31)
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/test_leaksan.c | 16 ++++++++++++++++
|
|
||||||
1 file changed, 16 insertions(+)
|
|
||||||
create mode 100644 tests/test_leaksan.c
|
|
||||||
|
|
||||||
diff --git a/integration-test-suite/tests/test_leaksan.c b/tests/test_leaksan.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..db425a1
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/integration-test-suite/tests/test_leaksan.c
|
|
||||||
@@ -0,0 +1,16 @@
|
|
||||||
+// Test asan use after free
|
|
||||||
+//
|
|
||||||
+// REQUIRES: clang
|
|
||||||
+// RUN: %clang -o %t -fsanitize=address -g %s
|
|
||||||
+// RUN: env ASAN_OPTIONS="log_path=stdout:exitcode=0" %t 2>&1 > %t.out
|
|
||||||
+// RUN: grep -q "detected memory leaks" %t.out
|
|
||||||
+
|
|
||||||
+#include <stdlib.h>
|
|
||||||
+
|
|
||||||
+void *p;
|
|
||||||
+
|
|
||||||
+int main() {
|
|
||||||
+ p = malloc(7);
|
|
||||||
+ p = 0; // The memory is leaked here.
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
--
|
|
||||||
2.28.0
|
|
||||||
|
|
77
debian/patches/D92052.patch
vendored
77
debian/patches/D92052.patch
vendored
@ -1,77 +0,0 @@
|
|||||||
Index: llvm/lib/MC/MCParser/ELFAsmParser.cpp
|
|
||||||
===================================================================
|
|
||||||
--- a/llvm/lib/MC/MCParser/ELFAsmParser.cpp
|
|
||||||
+++ b/llvm/lib/MC/MCParser/ELFAsmParser.cpp
|
|
||||||
@@ -652,10 +652,13 @@
|
|
||||||
!(SectionName == ".eh_frame" && Type == ELF::SHT_PROGBITS))
|
|
||||||
Error(loc, "changed section type for " + SectionName + ", expected: 0x" +
|
|
||||||
utohexstr(Section->getType()));
|
|
||||||
- if (Section->getFlags() != Flags)
|
|
||||||
+ // Check that flags are used consistently. However, the GNU assembler permits
|
|
||||||
+ // to leave out in subsequent uses of the same sections; for compatibility,
|
|
||||||
+ // do likewise.
|
|
||||||
+ if ((Flags || Size || !TypeName.empty()) && Section->getFlags() != Flags)
|
|
||||||
Error(loc, "changed section flags for " + SectionName + ", expected: 0x" +
|
|
||||||
utohexstr(Section->getFlags()));
|
|
||||||
- if (Section->getEntrySize() != Size)
|
|
||||||
+ if ((Flags || Size || !TypeName.empty()) && Section->getEntrySize() != Size)
|
|
||||||
Error(loc, "changed section entsize for " + SectionName +
|
|
||||||
", expected: " + Twine(Section->getEntrySize()));
|
|
||||||
|
|
||||||
Index: llvm/test/MC/ELF/section-entsize-changed.s
|
|
||||||
===================================================================
|
|
||||||
--- a/llvm/test/MC/ELF/section-entsize-changed.s
|
|
||||||
+++ b/llvm/test/MC/ELF/section-entsize-changed.s
|
|
||||||
@@ -10,3 +10,26 @@
|
|
||||||
.pushsection .foo,"aM",@progbits,4
|
|
||||||
|
|
||||||
.pushsection .foo,"aM",@progbits,1
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+bar:
|
|
||||||
+.section .bar,"ax",@progbits
|
|
||||||
+
|
|
||||||
+.section .bar
|
|
||||||
+
|
|
||||||
+# CHECK: {{.*}}.s:[[# @LINE+1]]:1: error: changed section flags for .bar, expected: 0x6
|
|
||||||
+.section .bar,"awx",@progbits
|
|
||||||
+
|
|
||||||
+# CHECK: {{.*}}.s:[[# @LINE+1]]:1: error: changed section flags for .bar, expected: 0x6
|
|
||||||
+.pushsection .bar,"a",@progbits
|
|
||||||
+
|
|
||||||
+.pushsection .bar
|
|
||||||
+
|
|
||||||
+foobar:
|
|
||||||
+.section .foobar,"ax",@progbits; .byte 1
|
|
||||||
+
|
|
||||||
+# CHECK: {{.*}}.s:[[# @LINE+1]]:1: error: changed section flags for .foobar, expected: 0x6
|
|
||||||
+.section .foobar,"",@progbits; .byte 2
|
|
||||||
+
|
|
||||||
+# CHECK: {{.*}}.s:[[# @LINE+1]]:1: error: changed section flags for .foobar, expected: 0x6
|
|
||||||
+.section .foobar,"a",@progbits; .byte 3
|
|
||||||
Index: llvm/test/MC/ELF/section-omitted-attributes.s
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null
|
|
||||||
+++ llvm/test/MC/ELF/section-omitted-attributes.s
|
|
||||||
@@ -0,0 +1,21 @@
|
|
||||||
+# RUN: llvm-mc -triple=x86_64 %s -o - | FileCheck %s
|
|
||||||
+
|
|
||||||
+// CHECK: .section .foo,"aM",@progbits,1
|
|
||||||
+// CHECK: .section .bar,"aM",@progbits,4
|
|
||||||
+
|
|
||||||
+foo:
|
|
||||||
+.section .foo,"aM",@progbits,1
|
|
||||||
+
|
|
||||||
+.section .foo
|
|
||||||
+
|
|
||||||
+.pushsection .foo
|
|
||||||
+
|
|
||||||
+.pushsection .foo
|
|
||||||
+
|
|
||||||
+.section .bar,"aM",@progbits,4
|
|
||||||
+
|
|
||||||
+.section .bar
|
|
||||||
+
|
|
||||||
+.pushsection .bar,"aM",@progbits,4
|
|
||||||
+
|
|
||||||
+.pushsection .bar
|
|
223
debian/patches/bring-reporter-back.patch
vendored
223
debian/patches/bring-reporter-back.patch
vendored
@ -1,223 +0,0 @@
|
|||||||
From e3cd3a3c91524c957e06bb0170343548f02b6842 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tom Stellard <tstellar@redhat.com>
|
|
||||||
Date: Thu, 11 Feb 2021 22:28:19 +0000
|
|
||||||
Subject: [PATCH] Partially Revert "scan-view: Remove Reporter.py and
|
|
||||||
associated AppleScript files"
|
|
||||||
|
|
||||||
This reverts some of commit dbb01536f6f49fa428f170e34466072ef439b3e9.
|
|
||||||
|
|
||||||
The Reporter module was still being used by the ScanView.py module and deleting
|
|
||||||
it caused scan-view to fail. This commit adds back Reporter.py but removes the
|
|
||||||
code the references the AppleScript files which were removed in
|
|
||||||
dbb01536f6f49fa428f170e34466072ef439b3e9.
|
|
||||||
|
|
||||||
Reviewed By: NoQ
|
|
||||||
|
|
||||||
Differential Revision: https://reviews.llvm.org/D96367
|
|
||||||
---
|
|
||||||
clang/tools/scan-view/CMakeLists.txt | 1 +
|
|
||||||
clang/tools/scan-view/share/Reporter.py | 183 ++++++++++++++++++++++++
|
|
||||||
2 files changed, 184 insertions(+)
|
|
||||||
create mode 100644 clang/tools/scan-view/share/Reporter.py
|
|
||||||
|
|
||||||
diff --git a/clang/tools/scan-view/CMakeLists.txt b/clang/tools/scan-view/CMakeLists.txt
|
|
||||||
index dd3d33439299..eccc6b83195b 100644
|
|
||||||
--- a/clang/tools/scan-view/CMakeLists.txt
|
|
||||||
+++ b/clang/tools/scan-view/CMakeLists.txt
|
|
||||||
@@ -5,6 +5,7 @@ set(BinFiles
|
|
||||||
|
|
||||||
set(ShareFiles
|
|
||||||
ScanView.py
|
|
||||||
+ Reporter.py
|
|
||||||
startfile.py
|
|
||||||
bugcatcher.ico)
|
|
||||||
|
|
||||||
diff --git a/clang/tools/scan-view/share/Reporter.py b/clang/tools/scan-view/share/Reporter.py
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..31a14fb0cf74
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/clang/tools/scan-view/share/Reporter.py
|
|
||||||
@@ -0,0 +1,183 @@
|
|
||||||
+#!/usr/bin/env python
|
|
||||||
+# -*- coding: utf-8 -*-
|
|
||||||
+
|
|
||||||
+"""Methods for reporting bugs."""
|
|
||||||
+
|
|
||||||
+import subprocess, sys, os
|
|
||||||
+
|
|
||||||
+__all__ = ['ReportFailure', 'BugReport', 'getReporters']
|
|
||||||
+
|
|
||||||
+#
|
|
||||||
+
|
|
||||||
+class ReportFailure(Exception):
|
|
||||||
+ """Generic exception for failures in bug reporting."""
|
|
||||||
+ def __init__(self, value):
|
|
||||||
+ self.value = value
|
|
||||||
+
|
|
||||||
+# Collect information about a bug.
|
|
||||||
+
|
|
||||||
+class BugReport(object):
|
|
||||||
+ def __init__(self, title, description, files):
|
|
||||||
+ self.title = title
|
|
||||||
+ self.description = description
|
|
||||||
+ self.files = files
|
|
||||||
+
|
|
||||||
+# Reporter interfaces.
|
|
||||||
+
|
|
||||||
+import os
|
|
||||||
+
|
|
||||||
+import email, mimetypes, smtplib
|
|
||||||
+from email import encoders
|
|
||||||
+from email.message import Message
|
|
||||||
+from email.mime.base import MIMEBase
|
|
||||||
+from email.mime.multipart import MIMEMultipart
|
|
||||||
+from email.mime.text import MIMEText
|
|
||||||
+
|
|
||||||
+#===------------------------------------------------------------------------===#
|
|
||||||
+# ReporterParameter
|
|
||||||
+#===------------------------------------------------------------------------===#
|
|
||||||
+
|
|
||||||
+class ReporterParameter(object):
|
|
||||||
+ def __init__(self, n):
|
|
||||||
+ self.name = n
|
|
||||||
+ def getName(self):
|
|
||||||
+ return self.name
|
|
||||||
+ def getValue(self,r,bugtype,getConfigOption):
|
|
||||||
+ return getConfigOption(r.getName(),self.getName())
|
|
||||||
+ def saveConfigValue(self):
|
|
||||||
+ return True
|
|
||||||
+
|
|
||||||
+class TextParameter (ReporterParameter):
|
|
||||||
+ def getHTML(self,r,bugtype,getConfigOption):
|
|
||||||
+ return """\
|
|
||||||
+<tr>
|
|
||||||
+<td class="form_clabel">%s:</td>
|
|
||||||
+<td class="form_value"><input type="text" name="%s_%s" value="%s"></td>
|
|
||||||
+</tr>"""%(self.getName(),r.getName(),self.getName(),self.getValue(r,bugtype,getConfigOption))
|
|
||||||
+
|
|
||||||
+class SelectionParameter (ReporterParameter):
|
|
||||||
+ def __init__(self, n, values):
|
|
||||||
+ ReporterParameter.__init__(self,n)
|
|
||||||
+ self.values = values
|
|
||||||
+
|
|
||||||
+ def getHTML(self,r,bugtype,getConfigOption):
|
|
||||||
+ default = self.getValue(r,bugtype,getConfigOption)
|
|
||||||
+ return """\
|
|
||||||
+<tr>
|
|
||||||
+<td class="form_clabel">%s:</td><td class="form_value"><select name="%s_%s">
|
|
||||||
+%s
|
|
||||||
+</select></td>"""%(self.getName(),r.getName(),self.getName(),'\n'.join(["""\
|
|
||||||
+<option value="%s"%s>%s</option>"""%(o[0],
|
|
||||||
+ o[0] == default and ' selected="selected"' or '',
|
|
||||||
+ o[1]) for o in self.values]))
|
|
||||||
+
|
|
||||||
+#===------------------------------------------------------------------------===#
|
|
||||||
+# Reporters
|
|
||||||
+#===------------------------------------------------------------------------===#
|
|
||||||
+
|
|
||||||
+class EmailReporter(object):
|
|
||||||
+ def getName(self):
|
|
||||||
+ return 'Email'
|
|
||||||
+
|
|
||||||
+ def getParameters(self):
|
|
||||||
+ return [TextParameter(x) for x in ['To', 'From', 'SMTP Server', 'SMTP Port']]
|
|
||||||
+
|
|
||||||
+ # Lifted from python email module examples.
|
|
||||||
+ def attachFile(self, outer, path):
|
|
||||||
+ # Guess the content type based on the file's extension. Encoding
|
|
||||||
+ # will be ignored, although we should check for simple things like
|
|
||||||
+ # gzip'd or compressed files.
|
|
||||||
+ ctype, encoding = mimetypes.guess_type(path)
|
|
||||||
+ if ctype is None or encoding is not None:
|
|
||||||
+ # No guess could be made, or the file is encoded (compressed), so
|
|
||||||
+ # use a generic bag-of-bits type.
|
|
||||||
+ ctype = 'application/octet-stream'
|
|
||||||
+ maintype, subtype = ctype.split('/', 1)
|
|
||||||
+ if maintype == 'text':
|
|
||||||
+ fp = open(path)
|
|
||||||
+ # Note: we should handle calculating the charset
|
|
||||||
+ msg = MIMEText(fp.read(), _subtype=subtype)
|
|
||||||
+ fp.close()
|
|
||||||
+ else:
|
|
||||||
+ fp = open(path, 'rb')
|
|
||||||
+ msg = MIMEBase(maintype, subtype)
|
|
||||||
+ msg.set_payload(fp.read())
|
|
||||||
+ fp.close()
|
|
||||||
+ # Encode the payload using Base64
|
|
||||||
+ encoders.encode_base64(msg)
|
|
||||||
+ # Set the filename parameter
|
|
||||||
+ msg.add_header('Content-Disposition', 'attachment', filename=os.path.basename(path))
|
|
||||||
+ outer.attach(msg)
|
|
||||||
+
|
|
||||||
+ def fileReport(self, report, parameters):
|
|
||||||
+ mainMsg = """\
|
|
||||||
+BUG REPORT
|
|
||||||
+---
|
|
||||||
+Title: %s
|
|
||||||
+Description: %s
|
|
||||||
+"""%(report.title, report.description)
|
|
||||||
+
|
|
||||||
+ if not parameters.get('To'):
|
|
||||||
+ raise ReportFailure('No "To" address specified.')
|
|
||||||
+ if not parameters.get('From'):
|
|
||||||
+ raise ReportFailure('No "From" address specified.')
|
|
||||||
+
|
|
||||||
+ msg = MIMEMultipart()
|
|
||||||
+ msg['Subject'] = 'BUG REPORT: %s'%(report.title)
|
|
||||||
+ # FIXME: Get config parameters
|
|
||||||
+ msg['To'] = parameters.get('To')
|
|
||||||
+ msg['From'] = parameters.get('From')
|
|
||||||
+ msg.preamble = mainMsg
|
|
||||||
+
|
|
||||||
+ msg.attach(MIMEText(mainMsg, _subtype='text/plain'))
|
|
||||||
+ for file in report.files:
|
|
||||||
+ self.attachFile(msg, file)
|
|
||||||
+
|
|
||||||
+ try:
|
|
||||||
+ s = smtplib.SMTP(host=parameters.get('SMTP Server'),
|
|
||||||
+ port=parameters.get('SMTP Port'))
|
|
||||||
+ s.sendmail(msg['From'], msg['To'], msg.as_string())
|
|
||||||
+ s.close()
|
|
||||||
+ except:
|
|
||||||
+ raise ReportFailure('Unable to send message via SMTP.')
|
|
||||||
+
|
|
||||||
+ return "Message sent!"
|
|
||||||
+
|
|
||||||
+class BugzillaReporter(object):
|
|
||||||
+ def getName(self):
|
|
||||||
+ return 'Bugzilla'
|
|
||||||
+
|
|
||||||
+ def getParameters(self):
|
|
||||||
+ return [TextParameter(x) for x in ['URL','Product']]
|
|
||||||
+
|
|
||||||
+ def fileReport(self, report, parameters):
|
|
||||||
+ raise NotImplementedError
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+class RadarClassificationParameter(SelectionParameter):
|
|
||||||
+ def __init__(self):
|
|
||||||
+ SelectionParameter.__init__(self,"Classification",
|
|
||||||
+ [['1', 'Security'], ['2', 'Crash/Hang/Data Loss'],
|
|
||||||
+ ['3', 'Performance'], ['4', 'UI/Usability'],
|
|
||||||
+ ['6', 'Serious Bug'], ['7', 'Other']])
|
|
||||||
+
|
|
||||||
+ def saveConfigValue(self):
|
|
||||||
+ return False
|
|
||||||
+
|
|
||||||
+ def getValue(self,r,bugtype,getConfigOption):
|
|
||||||
+ if bugtype.find("leak") != -1:
|
|
||||||
+ return '3'
|
|
||||||
+ elif bugtype.find("dereference") != -1:
|
|
||||||
+ return '2'
|
|
||||||
+ elif bugtype.find("missing ivar release") != -1:
|
|
||||||
+ return '3'
|
|
||||||
+ else:
|
|
||||||
+ return '7'
|
|
||||||
+
|
|
||||||
+###
|
|
||||||
+
|
|
||||||
+def getReporters():
|
|
||||||
+ reporters = []
|
|
||||||
+ reporters.append(EmailReporter())
|
|
||||||
+ return reporters
|
|
||||||
+
|
|
20
debian/patches/clang_vendor_pass_stage2.diff
vendored
20
debian/patches/clang_vendor_pass_stage2.diff
vendored
@ -1,20 +0,0 @@
|
|||||||
commit ca467542eecfc621eea7fefb3c7e3849c6b43ac7
|
|
||||||
Author: Sylvestre Ledru <sylvestre@debian.org>
|
|
||||||
Date: Fri May 29 09:13:08 2020 +0200
|
|
||||||
|
|
||||||
[CMake] Pass CLANG_VENDOR variables into later stages
|
|
||||||
|
|
||||||
We are already passing CLANG_VERSION_* & PACKAGE_VENDOR
|
|
||||||
|
|
||||||
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
|
|
||||||
index 7dadc5f6e91..5a5e34aacbe 100644
|
|
||||||
--- a/clang/CMakeLists.txt
|
|
||||||
+++ b/clang/CMakeLists.txt
|
|
||||||
@@ -711,6 +711,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
|
|
||||||
CLANG_VERSION_MAJOR
|
|
||||||
CLANG_VERSION_MINOR
|
|
||||||
CLANG_VERSION_PATCHLEVEL
|
|
||||||
+ CLANG_VENDOR
|
|
||||||
LLVM_VERSION_SUFFIX
|
|
||||||
LLVM_BINUTILS_INCDIR
|
|
||||||
CLANG_REPOSITORY_STRING
|
|
10
debian/patches/disable-lit-cpuid-install.diff
vendored
10
debian/patches/disable-lit-cpuid-install.diff
vendored
@ -1,10 +0,0 @@
|
|||||||
Index: llvm-toolchain-9-9/lldb/utils/lit-cpuid/CMakeLists.txt
|
|
||||||
===================================================================
|
|
||||||
--- llvm-toolchain-9-9.orig/lldb/utils/lit-cpuid/CMakeLists.txt
|
|
||||||
+++ llvm-toolchain-9-9/lldb/utils/lit-cpuid/CMakeLists.txt
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-add_llvm_utility(lit-cpuid
|
|
||||||
+add_lldb_executable(lit-cpuid
|
|
||||||
lit-cpuid.cpp
|
|
||||||
)
|
|
||||||
|
|
35
debian/patches/libcxx-D124227-wasm.patch
vendored
35
debian/patches/libcxx-D124227-wasm.patch
vendored
@ -1,35 +0,0 @@
|
|||||||
From 67b0b02ec9f2bbc57bf8f0550828d97f460ac11f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Brad Smith <brad@comstyle.com>
|
|
||||||
Date: Sat, 7 May 2022 01:06:32 -0400
|
|
||||||
Subject: [PATCH] [libcxx] Remove static inline and make use of
|
|
||||||
_LIBCPP_HIDE_FROM_ABI in __support headers
|
|
||||||
|
|
||||||
After feedback from D122861, do the same thing with some of the other headers. Try to move the
|
|
||||||
headers so they have a similar style and way of doing things.
|
|
||||||
|
|
||||||
+ also applies:
|
|
||||||
https://reviews.llvm.org/D141208
|
|
||||||
|
|
||||||
Reviewed By: ldionne, daltenty
|
|
||||||
|
|
||||||
Differential Revision: https://reviews.llvm.org/D124227
|
|
||||||
---
|
|
||||||
libcxx/include/__support/ibm/gettod_zos.h | 3 +-
|
|
||||||
libcxx/include/__support/ibm/xlocale.h | 53 +++++++++------------
|
|
||||||
libcxx/include/__support/musl/xlocale.h | 31 ++++++------
|
|
||||||
libcxx/include/__support/solaris/xlocale.h | 55 +++++++++++-----------
|
|
||||||
4 files changed, 67 insertions(+), 75 deletions(-)
|
|
||||||
|
|
||||||
Index: llvm-toolchain-15_15.0.6~++20230102020141+088f33605d8a/libcxx/include/__support/musl/xlocale.h
|
|
||||||
===================================================================
|
|
||||||
--- llvm-toolchain-15_15.0.6~++20230102020141+088f33605d8a.orig/libcxx/include/__support/musl/xlocale.h
|
|
||||||
+++ llvm-toolchain-15_15.0.6~++20230102020141+088f33605d8a/libcxx/include/__support/musl/xlocale.h
|
|
||||||
@@ -39,7 +39,7 @@ wcstoll_l(const wchar_t *__nptr, wchar_t
|
|
||||||
return ::wcstoll(__nptr, __endptr, __base);
|
|
||||||
}
|
|
||||||
|
|
||||||
-inline _LIBCPP_HIDE_FROM_ABI long long
|
|
||||||
+inline _LIBCPP_HIDE_FROM_ABI unsigned long long
|
|
||||||
wcstoull_l(const wchar_t *__nptr, wchar_t **__endptr, int __base, locale_t) {
|
|
||||||
return ::wcstoull(__nptr, __endptr, __base);
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
commit 09e6304440c08fe72b6ac05f922ab9d8b7f1e387
|
|
||||||
Author: Roger Ferrer Ibanez <rofirrim@gmail.com>
|
|
||||||
Date: Wed Jul 24 05:33:46 2019 +0000
|
|
||||||
|
|
||||||
[RISCV] Implement benchmark::cycleclock::Now
|
|
||||||
|
|
||||||
This is a cherrypick of D64237 onto llvm/utils/benchmark and
|
|
||||||
libcxx/utils/google-benchmark.
|
|
||||||
|
|
||||||
Differential Revision: https://reviews.llvm.org/D65142
|
|
||||||
|
|
||||||
llvm-svn: 366868
|
|
||||||
|
|
||||||
--- a/libcxx/utils/google-benchmark/README.LLVM
|
|
||||||
+++ b/libcxx/utils/google-benchmark/README.LLVM
|
|
||||||
@@ -4,3 +4,9 @@ LLVM notes
|
|
||||||
This directory contains the Google Benchmark source code with some unnecessary
|
|
||||||
files removed. Note that this directory is under a different license than
|
|
||||||
libc++.
|
|
||||||
+
|
|
||||||
+Changes:
|
|
||||||
+* https://github.com/google/benchmark/commit/4abdfbb802d1b514703223f5f852ce4a507d32d2
|
|
||||||
+ is applied on top of
|
|
||||||
+ https://github.com/google/benchmark/commit/4528c76b718acc9b57956f63069c699ae21edcab
|
|
||||||
+ to add RISC-V timer support.
|
|
||||||
--- a/libcxx/utils/google-benchmark/src/cycleclock.h
|
|
||||||
+++ b/libcxx/utils/google-benchmark/src/cycleclock.h
|
|
||||||
@@ -164,6 +164,21 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
|
|
||||||
uint64_t tsc;
|
|
||||||
asm("stck %0" : "=Q"(tsc) : : "cc");
|
|
||||||
return tsc;
|
|
||||||
+#elif defined(__riscv) // RISC-V
|
|
||||||
+ // Use RDCYCLE (and RDCYCLEH on riscv32)
|
|
||||||
+#if __riscv_xlen == 32
|
|
||||||
+ uint64_t cycles_low, cycles_hi0, cycles_hi1;
|
|
||||||
+ asm("rdcycleh %0" : "=r"(cycles_hi0));
|
|
||||||
+ asm("rdcycle %0" : "=r"(cycles_lo));
|
|
||||||
+ asm("rdcycleh %0" : "=r"(cycles_hi1));
|
|
||||||
+ // This matches the PowerPC overflow detection, above
|
|
||||||
+ cycles_lo &= -static_cast<int64_t>(cycles_hi0 == cycles_hi1);
|
|
||||||
+ return (cycles_hi1 << 32) | cycles_lo;
|
|
||||||
+#else
|
|
||||||
+ uint64_t cycles;
|
|
||||||
+ asm("rdcycle %0" : "=r"(cycles));
|
|
||||||
+ return cycles;
|
|
||||||
+#endif
|
|
||||||
#else
|
|
||||||
// The soft failover to a generic implementation is automatic only for ARM.
|
|
||||||
// For other platforms the developer is expected to make an attempt to create
|
|
||||||
--- a/utils/benchmark/README.LLVM
|
|
||||||
+++ b/utils/benchmark/README.LLVM
|
|
||||||
@@ -23,3 +23,5 @@ Changes:
|
|
||||||
is applied to disable exceptions in Microsoft STL when exceptions are disabled
|
|
||||||
* Disabled CMake get_git_version as it is meaningless for this in-tree build,
|
|
||||||
and hardcoded a null version
|
|
||||||
+* https://github.com/google/benchmark/commit/4abdfbb802d1b514703223f5f852ce4a507d32d2
|
|
||||||
+ is applied on top of v1.4.1 to add RISC-V timer support.
|
|
||||||
--- a/utils/benchmark/src/cycleclock.h
|
|
||||||
+++ b/utils/benchmark/src/cycleclock.h
|
|
||||||
@@ -164,6 +164,21 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
|
|
||||||
uint64_t tsc;
|
|
||||||
asm("stck %0" : "=Q" (tsc) : : "cc");
|
|
||||||
return tsc;
|
|
||||||
+#elif defined(__riscv) // RISC-V
|
|
||||||
+ // Use RDCYCLE (and RDCYCLEH on riscv32)
|
|
||||||
+#if __riscv_xlen == 32
|
|
||||||
+ uint64_t cycles_low, cycles_hi0, cycles_hi1;
|
|
||||||
+ asm("rdcycleh %0" : "=r"(cycles_hi0));
|
|
||||||
+ asm("rdcycle %0" : "=r"(cycles_lo));
|
|
||||||
+ asm("rdcycleh %0" : "=r"(cycles_hi1));
|
|
||||||
+ // This matches the PowerPC overflow detection, above
|
|
||||||
+ cycles_lo &= -static_cast<int64_t>(cycles_hi0 == cycles_hi1);
|
|
||||||
+ return (cycles_hi1 << 32) | cycles_lo;
|
|
||||||
+#else
|
|
||||||
+ uint64_t cycles;
|
|
||||||
+ asm("rdcycle %0" : "=r"(cycles));
|
|
||||||
+ return cycles;
|
|
||||||
+#endif
|
|
||||||
#else
|
|
||||||
// The soft failover to a generic implementation is automatic only for ARM.
|
|
||||||
// For other platforms the developer is expected to make an attempt to create
|
|
17
debian/patches/lldb/lldb-libname.diff
vendored
17
debian/patches/lldb/lldb-libname.diff
vendored
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
lldb/scripts/Python/finishSwigPythonLLDB.py | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
Index: llvm-toolchain-snapshot_16~svn3316516/lldb/scripts/Python/finishSwigPythonLLDB.py
|
|
||||||
===================================================================
|
|
||||||
--- llvm-toolchain-snapshot_16~svn3316516.orig/lldb/scripts/Python/finishSwigPythonLLDB.py
|
|
||||||
+++ llvm-toolchain-snapshot_16~svn3316516/lldb/scripts/Python/finishSwigPythonLLDB.py
|
|
||||||
@@ -443,7 +443,7 @@ def make_symlink_liblldb(
|
|
||||||
if eOSType == utilsOsType.EnumOsType.Darwin:
|
|
||||||
strLibFileExtn = ".dylib"
|
|
||||||
else:
|
|
||||||
- strLibFileExtn = ".so"
|
|
||||||
+ strLibFileExtn = "-16.so"
|
|
||||||
strSrc = os.path.join(vstrLldbLibDir, "liblldb" + strLibFileExtn)
|
|
||||||
|
|
||||||
bOk, strErrMsg = make_symlink(
|
|
19
debian/patches/mips/mips-assert-size.diff
vendored
19
debian/patches/mips/mips-assert-size.diff
vendored
@ -1,19 +0,0 @@
|
|||||||
Index: llvm-toolchain-15_15.0.3~++20221019061539+4a2c05b05ed0/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cpp
|
|
||||||
===================================================================
|
|
||||||
--- llvm-toolchain-15_15.0.3~++20221019061539+4a2c05b05ed0.orig/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cpp
|
|
||||||
+++ llvm-toolchain-15_15.0.3~++20221019061539+4a2c05b05ed0/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cpp
|
|
||||||
@@ -64,9 +64,12 @@ using namespace __sanitizer;
|
|
||||||
COMPILER_CHECK(struct___old_kernel_stat_sz == sizeof(struct __old_kernel_stat));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-COMPILER_CHECK(struct_kernel_stat_sz == sizeof(struct stat));
|
|
||||||
+# if defined(__LP64__) || \
|
|
||||||
+ (!defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS != 64)
|
|
||||||
+ COMPILER_CHECK(struct_kernel_stat_sz == sizeof(struct stat));
|
|
||||||
+# endif
|
|
||||||
|
|
||||||
-#if defined(__i386__)
|
|
||||||
+# if defined(__i386__)
|
|
||||||
COMPILER_CHECK(struct_kernel_stat64_sz == sizeof(struct stat64));
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
Index: llvm-toolchain-snapshot_14~++20220105111900+cdbad62c526c/clang/CMakeLists.txt
|
|
||||||
===================================================================
|
|
||||||
--- llvm-toolchain-snapshot_14~++20220105111900+cdbad62c526c.orig/clang/CMakeLists.txt
|
|
||||||
+++ llvm-toolchain-snapshot_14~++20220105111900+cdbad62c526c/clang/CMakeLists.txt
|
|
||||||
@@ -726,9 +726,9 @@ if (CLANG_ENABLE_BOOTSTRAP)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(COMPILER_OPTIONS
|
|
||||||
- -DCMAKE_CXX_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${CXX_COMPILER}
|
|
||||||
- -DCMAKE_C_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${C_COMPILER}
|
|
||||||
- -DCMAKE_ASM_COMPILER=${LLVM_RUNTIME_OUTPUT_INTDIR}/${C_COMPILER}
|
|
||||||
+ -DCMAKE_CXX_COMPILER=/usr/share/clang/scan-build-${CLANG_VERSION_MAJOR}/libexec/c++-analyzer
|
|
||||||
+ -DCMAKE_C_COMPILER=/usr/share/clang/scan-build-${CLANG_VERSION_MAJOR}/libexec/ccc-analyzer
|
|
||||||
+ -DCMAKE_ASM_COMPILER=/usr/share/clang/scan-build-${CLANG_VERSION_MAJOR}/libexec/ccc-analyzer
|
|
||||||
-DCMAKE_ASM_COMPILER_ID=Clang)
|
|
||||||
|
|
||||||
# cmake requires CMAKE_LINKER to be specified if the compiler is MSVC-like,
|
|
@ -1,49 +0,0 @@
|
|||||||
Index: llvm-toolchain-11_11.0.1~++20201112101029+0874e7ef66c/integration-test-suite/tests/basic_lldb.c
|
|
||||||
===================================================================
|
|
||||||
--- llvm-toolchain-11_11.0.1~++20201112101029+0874e7ef66c.orig/integration-test-suite/tests/basic_lldb.c
|
|
||||||
+++ llvm-toolchain-11_11.0.1~++20201112101029+0874e7ef66c/integration-test-suite/tests/basic_lldb.c
|
|
||||||
@@ -1,6 +1,7 @@
|
|
||||||
// RUN: %clang -g -o %t %s
|
|
||||||
// RUN: %lldb -s %S/basic_lldb.in %t | grep "main at basic_lldb.c:"
|
|
||||||
// REQUIRES: lldb, clang
|
|
||||||
+// XFAIL: i686, i386
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
int a=0;
|
|
||||||
Index: llvm-toolchain-11_11.0.1~++20201112101029+0874e7ef66c/integration-test-suite/tests/basic_lldb2.cpp
|
|
||||||
===================================================================
|
|
||||||
--- llvm-toolchain-11_11.0.1~++20201112101029+0874e7ef66c.orig/integration-test-suite/tests/basic_lldb2.cpp
|
|
||||||
+++ llvm-toolchain-11_11.0.1~++20201112101029+0874e7ef66c/integration-test-suite/tests/basic_lldb2.cpp
|
|
||||||
@@ -1,6 +1,7 @@
|
|
||||||
// RUN: %clangxx -g -o %t %s
|
|
||||||
// RUN: %lldb -s %S/basic_lldb2.in %t | grep "stop reason = step over"
|
|
||||||
// REQUIRES: lldb, clangxx
|
|
||||||
+// XFAIL: i686, i386
|
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
int main (void)
|
|
||||||
Index: llvm-toolchain-11_11.0.1~++20201112101029+0874e7ef66c/integration-test-suite/tests/test_asan_lc.c
|
|
||||||
===================================================================
|
|
||||||
--- llvm-toolchain-11_11.0.1~++20201112101029+0874e7ef66c.orig/integration-test-suite/tests/test_asan_lc.c
|
|
||||||
+++ llvm-toolchain-11_11.0.1~++20201112101029+0874e7ef66c/integration-test-suite/tests/test_asan_lc.c
|
|
||||||
@@ -3,6 +3,7 @@
|
|
||||||
// REQUIRES: clang
|
|
||||||
// RUN: %clang -fsanitize=address %s -o %t -lc
|
|
||||||
// RUN: %t
|
|
||||||
+// XFAIL: i686, i386
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
Index: llvm-toolchain-11_11.0.1~++20201112101029+0874e7ef66c/integration-test-suite/tests/test_tsan.c
|
|
||||||
===================================================================
|
|
||||||
--- llvm-toolchain-11_11.0.1~++20201112101029+0874e7ef66c.orig/integration-test-suite/tests/test_tsan.c
|
|
||||||
+++ llvm-toolchain-11_11.0.1~++20201112101029+0874e7ef66c/integration-test-suite/tests/test_tsan.c
|
|
||||||
@@ -5,7 +5,7 @@
|
|
||||||
// RUN: %llvm-nm %t | grep __tsan
|
|
||||||
// RUN: env TSAN_OPTIONS="log_path=stdout:exitcode=0" %t 2>&1 > %t.out
|
|
||||||
// RUN: grep -q "data race" %t.out
|
|
||||||
-// XFAIL: arm
|
|
||||||
+// XFAIL: arm, i686, i386
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <stdio.h>
|
|
15
debian/patches/workaround-bug-48259.diff
vendored
15
debian/patches/workaround-bug-48259.diff
vendored
@ -1,15 +0,0 @@
|
|||||||
Index: llvm-toolchain-snapshot_12~++20201124100523+245052ac3080/llvm/include/llvm/Support/Recycler.h
|
|
||||||
===================================================================
|
|
||||||
--- llvm-toolchain-snapshot_12~++20201124100523+245052ac3080.orig/llvm/include/llvm/Support/Recycler.h
|
|
||||||
+++ llvm-toolchain-snapshot_12~++20201124100523+245052ac3080/llvm/include/llvm/Support/Recycler.h
|
|
||||||
@@ -83,8 +83,8 @@ public:
|
|
||||||
SubClass *Allocate(AllocatorType &Allocator) {
|
|
||||||
static_assert(alignof(SubClass) <= Align,
|
|
||||||
"Recycler allocation alignment is less than object align!");
|
|
||||||
- static_assert(sizeof(SubClass) <= Size,
|
|
||||||
- "Recycler allocation size is less than object size!");
|
|
||||||
+// static_assert(sizeof(SubClass) <= Size,
|
|
||||||
+// "Recycler allocation size is less than object size!");
|
|
||||||
return FreeList ? reinterpret_cast<SubClass *>(pop_val())
|
|
||||||
: static_cast<SubClass *>(Allocator.Allocate(Size, Align));
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user