12.0.1 Release

Also remove clang11 compat libs.

Related: rhbz#1931726
This commit is contained in:
Tom Stellard 2021-07-13 21:41:13 -07:00
parent a17efc19d8
commit f834580a3e
6 changed files with 15 additions and 306 deletions

4
.gitignore vendored
View File

@ -168,3 +168,7 @@
/clang-tools-extra-12.0.0.src.tar.xz
/clang-tools-extra-12.0.0.src.tar.xz.sig
/llvm-11.1.0rc2.src.tar.xz
/clang-12.0.1.src.tar.xz
/clang-12.0.1.src.tar.xz.sig
/clang-tools-extra-12.0.1.src.tar.xz
/clang-tools-extra-12.0.1.src.tar.xz.sig

View File

@ -1,35 +0,0 @@
From 6e6453d16aed8ff6220f9933aa5c3f5832e8ff69 Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton@redhat.com>
Date: Fri, 11 Jun 2021 15:42:26 +0200
Subject: [PATCH][clang] AMD k8 family does not support SSE4.x which are
required by x86-64-v2+
So don't define __tune__k8__ for these micro architecture.
SSE, SSE2 and SSE3 appear in https://www.amd.com/system/files/TechDocs/25112.PDF
but not SSE4.x.
Differential Revision: https://reviews.llvm.org/D104116
(cherry picked from commit 092c303955cd18be6c0b923b1c0a1b96e2c91893)
---
clang/lib/Basic/Targets/X86.cpp | 3 ---
1 file changed, 3 deletions(-)
diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp
index 694a809..80e160b 100644
--- a/clang/lib/Basic/Targets/X86.cpp
+++ b/clang/lib/Basic/Targets/X86.cpp
@@ -513,9 +513,6 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts,
case CK_K8:
case CK_K8SSE3:
case CK_x86_64:
- case CK_x86_64_v2:
- case CK_x86_64_v3:
- case CK_x86_64_v4:
defineCPUMacros(Builder, "k8");
break;
case CK_AMDFAM10:
--
1.8.3.1

View File

@ -1,31 +0,0 @@
From 84e4fe467f290c85b3d7d22c7333d192e1282054 Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton@redhat.com>
Date: Wed, 17 Mar 2021 08:32:56 +0100
Subject: [PATCH] [PATCH][clang-tools-extra] Make clangd CompletionModel usable
even with non-standard (but supported) layout
llvm supports specifying a non-standard layout where each project lies in its
own place. Do not assume a fixed layout and use the appropriate cmake variable
instead.
---
clang-tools-extra/clangd/quality/CompletionModel.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang-tools-extra/clangd/quality/CompletionModel.cmake b/clang-tools-extra/clangd/quality/CompletionModel.cmake
index 60c6d2a..41bc2ed 100644
--- a/clang-tools-extra/clangd/quality/CompletionModel.cmake
+++ b/clang-tools-extra/clangd/quality/CompletionModel.cmake
@@ -5,8 +5,8 @@
# will define a C++ class called ${cpp_class} - which may be a
# namespace-qualified class name.
function(gen_decision_forest model filename cpp_class)
- set(model_compiler ${CMAKE_SOURCE_DIR}/../clang-tools-extra/clangd/quality/CompletionModelCodegen.py)
-
+ set(model_compiler ${LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR}/clangd/quality/CompletionModelCodegen.py)
+
set(output_dir ${CMAKE_CURRENT_BINARY_DIR})
set(header_file ${output_dir}/${filename}.h)
set(cpp_file ${output_dir}/${filename}.cpp)
--
1.8.3.1

View File

@ -1,224 +0,0 @@
From ea01f898fd74bae23d8be31f1a29b542e886e3a5 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Tue, 9 Feb 2021 13:35:43 -0800
Subject: [PATCH 5/6] [PATCH][clang] 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.
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 dd3d334..eccc6b8 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 0000000..31a14fb
--- /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
+
--
1.8.3.1

View File

@ -2,7 +2,7 @@
%global maj_ver 12
%global min_ver 0
%global patch_ver 0
%global patch_ver 1
#%%global rc_ver 5
%global clang_tools_binaries \
@ -59,7 +59,7 @@
%bcond_with python3
%endif
%bcond_without bundle_compat_lib
%bcond_with bundle_compat_lib
%if %{with bundle_compat_lib}
%global compat_maj_ver 11
@ -78,7 +78,7 @@
Name: %pkg_name
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
Release: 5%{?dist}
Release: 1%{?dist}
Summary: A C language family front-end for LLVM
License: NCSA
@ -100,14 +100,7 @@ Patch0: 0001-PATCH-clang-Reorganize-gtest-integration.patch
Patch1: 0002-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch
Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch
Patch3: 0004-PATCH-clang-Prefer-gcc-toolchains-with-libgcc_s.so-w.patch
Patch4: 0005-PATCH-clang-Partially-Revert-scan-view-Remove-Report.patch
Patch5: 0006-PATCH-clang-Allow-__ieee128-as-an-alias-to-__float12.patch
Patch6: 0001-PATCH-clang-AMD-k8-family-does-not-support-SSE4.x-wh.patch
# Patches for clang-tools-extra
%if !0%{?compat_build}
Patch201: 0001-PATCH-clang-tools-extra-Make-clangd-CompletionModel-.patch
%endif
BuildRequires: gcc
BuildRequires: gcc-c++
@ -589,6 +582,10 @@ false
%endif
%changelog
* Tue Jul 13 2021 Tom Stellard <tstellar@redhat.com> - 12.0.1-1
- 12.0.1 Release
- Remove clang-11 compat lib
* Mon Jun 14 2021 sguelton@redhat.com - 12.0.0-5
- Backport

10
sources
View File

@ -1,6 +1,4 @@
SHA512 (llvm-11.1.0rc2.src.tar.xz) = 4293bedabfacc3de5384b5567eb69d4ae19095540c31cf1f46b8e841db36b28215353aace2e55ccc15a069a63ba2954b2c969ad6337bebaa8877248a2dca024b
SHA512 (clang-11.1.0rc2.src.tar.xz) = cae207e69b6d7df31303b1c73d55d82091babedbe0dc684aab1b603ce7e749d98a11a14ae9e3848dcb95a5840b38de56f407dda10b8b80eac3a6ce09ca44758a
SHA512 (clang-12.0.0.src.tar.xz) = f5613b9bffc962467d3bedb7f66b4e057e2781eb63c5dadfd3cf0b02453e29eff0a4f844889031292f06a8b4c081d4d41c515b7f719826ce5c4209a09df9f1f6
SHA512 (clang-12.0.0.src.tar.xz.sig) = 9780c2f68dfd7ea633dd137dda265ffda6425be658b0724e25dadb6abc54d3368e7850687ce38f4c3bf0c7049a2c1bd2fb299cec5f548c38f3bc4ca1f8877437
SHA512 (clang-tools-extra-12.0.0.src.tar.xz) = e0323a2506da748b5de32a3df53a987f3f74184c2d02d4e7b173e23e54396427e2d9b6600a7962795020bfc2c0dae16b210a69a4b8784086d1470d88f423c330
SHA512 (clang-tools-extra-12.0.0.src.tar.xz.sig) = 30afa9c2411417c30a47dcdcfe97ebf353ad1de1a98ed82d45bdfb3fafc30dcb335f6fd18ff3b44e2ed34ff5137932e3a4675289242712df01b8b6da8877fcef
SHA512 (clang-12.0.1.src.tar.xz) = 405011f0974b239427ca87c65e7485709c77705a9b7d51d679fe2abec79865f8c51c7ab085b4e6bf7aa4d0eade4b1438d88dd5feb56b434dc5d718ebf5715efa
SHA512 (clang-12.0.1.src.tar.xz.sig) = e8e87b84e0ea47afb9038c03327120deb8a785ce688fbe268658d4f8792e299ca4d5796c1077b745839226e4af211f37cc1b17348c59604fed6ab6ae0c2c3899
SHA512 (clang-tools-extra-12.0.1.src.tar.xz) = be4975c81c83f98deb5f6e0cc170fb6740bc46396d5bd8f25b55270ed874bb099b6d6f0e413617396f5ab67182314735580f44be1913d9be44ae288cf8c4fd7c
SHA512 (clang-tools-extra-12.0.1.src.tar.xz.sig) = ae418961ea307fcf65bf427d1d9e9ae966d3fbc48787c1683bc72bbb9019b1958880a39e39502dd1e45f7c42736377d35f1e0ae9ad013627313d58d82de9b41a