From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/, app-antivirus/clamav/
Date: Sun, 25 Dec 2016 18:13:22 +0000 (UTC) [thread overview]
Message-ID: <1482689522.65711d60b5d0c971790381f4efabbaf0f3c2610d.slyfox@gentoo> (raw)
commit: 65711d60b5d0c971790381f4efabbaf0f3c2610d
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 25 18:12:02 2016 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Dec 25 18:12:02 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65711d60
app-antivirus/clamav: fix build failure against gcc-6, bug #592432
Thanks to Peter Levine diagnosed an error as a reserved keyword
problem. I've picked renaming as it's done in upstreal llvm.
Reported-by: Francesco Turco
Package-Manager: Portage-2.3.3, Repoman-2.3.1
app-antivirus/clamav/clamav-0.99.2.ebuild | 2 +
.../clamav/files/clamav-0.99.2-gcc-6.patch | 84 ++++++++++++++++++++++
2 files changed, 86 insertions(+)
diff --git a/app-antivirus/clamav/clamav-0.99.2.ebuild b/app-antivirus/clamav/clamav-0.99.2.ebuild
index 1b0207d..8cc42bb 100644
--- a/app-antivirus/clamav/clamav-0.99.2.ebuild
+++ b/app-antivirus/clamav/clamav-0.99.2.ebuild
@@ -46,6 +46,8 @@ pkg_setup() {
src_prepare() {
use ppc64 && append-flags -mminimal-toc
use uclibc && export ac_cv_type_error_t=yes
+
+ epatch "${FILESDIR}"/${P}-gcc-6.patch #592432
}
src_configure() {
diff --git a/app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch b/app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch
new file mode 100644
index 00000000..2031edb
--- /dev/null
+++ b/app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch
@@ -0,0 +1,84 @@
+diff --git a/libclamav/c++/llvm/include/llvm/ADT/StringMap.h b/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
+index 59ff6aa..1325394 100644
+--- a/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
++++ b/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
+@@ -169,3 +169,3 @@ public:
+ KeyLength+1;
+- unsigned Alignment = alignof<StringMapEntry>();
++ unsigned Alignment = alignOf<StringMapEntry>();
+
+diff --git a/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h b/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
+index 88044c7..86b0f40 100644
+--- a/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
++++ b/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
+@@ -417,3 +417,3 @@ namespace llvm {
+ ileAllocator.Allocate(sizeof(IndexListEntry),
+- alignof<IndexListEntry>()));
++ alignOf<IndexListEntry>()));
+
+diff --git a/libclamav/c++/llvm/include/llvm/Support/AlignOf.h b/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
+index 6a7a1a6..979e597 100644
+--- a/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
++++ b/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
+@@ -51,8 +51,8 @@ struct AlignOf {
+
+-/// alignof - A templated function that returns the mininum alignment of
++/// alignOf - A templated function that returns the mininum alignment of
+ /// of a type. This provides no extra functionality beyond the AlignOf
+ /// class besides some cosmetic cleanliness. Example usage:
+-/// alignof<int>() returns the alignment of an int.
++/// alignOf<int>() returns the alignment of an int.
+ template <typename T>
+-static inline unsigned alignof() { return AlignOf<T>::Alignment; }
++static inline unsigned alignOf() { return AlignOf<T>::Alignment; }
+
+diff --git a/libclamav/c++/llvm/include/llvm/Support/Allocator.h b/libclamav/c++/llvm/include/llvm/Support/Allocator.h
+index 4a7251f..17caf5e 100644
+--- a/libclamav/c++/llvm/include/llvm/Support/Allocator.h
++++ b/libclamav/c++/llvm/include/llvm/Support/Allocator.h
+@@ -203,3 +203,3 @@ public:
+ for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) {
+- Ptr = Allocator.AlignPtr(Ptr, alignof<T>());
++ Ptr = Allocator.AlignPtr(Ptr, alignOf<T>());
+ if (Ptr + sizeof(T) <= End)
+diff --git a/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp b/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp
+index b892d85..dc72346 100644
+--- a/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp
++++ b/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp
+@@ -495,3 +495,3 @@ void SCEVUnknown::print(raw_ostream &OS) const {
+ if (isAlignOf(AllocTy)) {
+- OS << "alignof(" << *AllocTy << ")";
++ OS << "alignOf(" << *AllocTy << ")";
+ return;
+diff --git a/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp b/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
+index 824021c..757ca50 100644
+--- a/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
++++ b/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
+@@ -569,3 +569,3 @@ void Emitter<CodeEmitter>::emitMemModRMByte(const MachineInstr &MI,
+ // Calculate what the SS field value should be...
+- static const unsigned SSTable[] = { ~0, 0, 1, ~0, 2, ~0, ~0, ~0, 3 };
++ static const unsigned SSTable[] = { ~0u, 0u, 1u, ~0u, 2u, ~0u, ~0u, ~0u, 3u };
+ unsigned SS = SSTable[Scale.getImm()];
+diff --git a/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp b/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
+index 9564fe0..b2b7986 100644
+--- a/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
++++ b/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
+@@ -332,3 +332,3 @@ void X86MCCodeEmitter::EmitMemModRMByte(const MCInst &MI, unsigned Op,
+ // Calculate what the SS field value should be...
+- static const unsigned SSTable[] = { ~0, 0, 1, ~0, 2, ~0, ~0, ~0, 3 };
++ static const unsigned SSTable[] = { ~0u, 0u, 1u, ~0u, 2u, ~0u, ~0u, ~0u, 3u };
+ unsigned SS = SSTable[Scale.getImm()];
+diff --git a/libclamav/mpool.c b/libclamav/mpool.c
+index cd38e15..b5e537d 100644
+--- a/libclamav/mpool.c
++++ b/libclamav/mpool.c
+@@ -417,3 +417,3 @@ static size_t from_bits(unsigned int bits) {
+
+-static inline unsigned int alignof(size_t size)
++static inline unsigned int alignOf(size_t size)
+ {
+@@ -609,3 +609,3 @@ static void* allocate_aligned(struct MPMAP *mpm, size_t size, unsigned align, co
+ void *mpool_malloc(struct MP *mp, size_t size) {
+- size_t align = alignof(size);
++ size_t align = alignOf(size);
+ size_t i, needed = align_increase(size+FRAG_OVERHEAD, align);
next reply other threads:[~2016-12-25 18:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-25 18:13 Sergei Trofimovich [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-04-23 20:26 [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/, app-antivirus/clamav/ Jeroen Roovers
2017-12-24 23:12 Mike Gilbert
2018-02-23 19:00 Thomas Deutschmann
2018-03-02 18:42 Thomas Raschbacher
2019-07-31 12:07 Lars Wendler
2019-07-31 12:47 Lars Wendler
2019-11-25 4:08 Michael Orlitzky
2019-11-25 16:27 Lars Wendler
2020-06-09 1:53 Michael Orlitzky
2020-09-20 19:35 Michael Orlitzky
2020-09-23 3:34 Michael Orlitzky
2020-09-23 3:34 Michael Orlitzky
2021-02-09 19:48 Michael Orlitzky
2021-10-16 12:26 Thomas Raschbacher
2022-12-05 21:03 Thomas Raschbacher
2024-06-24 11:05 Matt Jolly
2024-09-23 11:12 Matt Jolly
2024-09-23 11:48 Matt Jolly
2024-10-27 11:22 Andreas K. Hüttel
2024-10-27 11:32 Michael Orlitzky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1482689522.65711d60b5d0c971790381f4efabbaf0f3c2610d.slyfox@gentoo \
--to=slyfox@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox