From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/creduce/files/, dev-util/creduce/
Date: Thu, 4 Oct 2018 17:07:27 +0000 (UTC) [thread overview]
Message-ID: <1538672837.400e84dbd725778f242320820c530c7e3c322488.mgorny@gentoo> (raw)
commit: 400e84dbd725778f242320820c530c7e3c322488
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 4 16:46:51 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Oct 4 17:07:17 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=400e84db
dev-util/creduce: backport LLVM-7 support patch
Bug: https://bugs.gentoo.org/667556
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../creduce/creduce-2.8.0_pre20180411-r1.ebuild | 44 +++++++++++
dev-util/creduce/files/creduce-llvm-7.patch | 90 ++++++++++++++++++++++
2 files changed, 134 insertions(+)
diff --git a/dev-util/creduce/creduce-2.8.0_pre20180411-r1.ebuild b/dev-util/creduce/creduce-2.8.0_pre20180411-r1.ebuild
new file mode 100644
index 00000000000..fec31d8e891
--- /dev/null
+++ b/dev-util/creduce/creduce-2.8.0_pre20180411-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+: ${CMAKE_MAKEFILE_GENERATOR=ninja}
+inherit cmake-utils llvm
+
+EGIT_COMMIT="48e622ba74bc35c5a81299d3a34b9b14038d6a70"
+
+DESCRIPTION="C-Reduce - a plugin-based C program reducer"
+HOMEPAGE="https://embed.cs.utah.edu/creduce/"
+SRC_URI="https://github.com/csmith-project/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${PN}-${EGIT_COMMIT}.tar.gz"
+
+LICENSE="UoI-NCSA"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+LLVM_MAX_SLOT=7
+
+COMMON_DEPEND="
+ >=dev-lang/perl-5.10.0
+ sys-devel/clang:${LLVM_MAX_SLOT}"
+RDEPEND="${COMMON_DEPEND}
+ dev-perl/Benchmark-Timer
+ dev-perl/Exporter-Lite
+ dev-perl/File-Which
+ dev-perl/Getopt-Tabular
+ dev-perl/Regexp-Common
+ dev-perl/Sys-CPU
+ dev-util/astyle
+ dev-util/indent"
+DEPEND="${COMMON_DEPEND}"
+
+S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
+
+PATCHES=(
+ "${FILESDIR}"/creduce-llvm-7.patch
+)
+
+llvm_check_deps() {
+ has_version "sys-devel/clang:${LLVM_SLOT}"
+}
diff --git a/dev-util/creduce/files/creduce-llvm-7.patch b/dev-util/creduce/files/creduce-llvm-7.patch
new file mode 100644
index 00000000000..a005eebff2e
--- /dev/null
+++ b/dev-util/creduce/files/creduce-llvm-7.patch
@@ -0,0 +1,90 @@
+From c0d9c3a2ef763eb09f0a70b8ad86250598549487 Mon Sep 17 00:00:00 2001
+From: Yang Chen <chenyang@cs.utah.edu>
+Date: Fri, 28 Sep 2018 00:39:22 -0700
+Subject: [PATCH] building with LLVM 7.0
+
+cope with some API changes for LLVM 7.0
+---
+ clang_delta/ExpressionDetector.cpp | 20 +++++++++++---------
+ clang_delta/RemoveUnusedEnumMember.cpp | 8 ++++----
+ clang_delta/TransformationManager.cpp | 2 +-
+ 3 files changed, 16 insertions(+), 14 deletions(-)
+
+diff --git a/clang_delta/ExpressionDetector.cpp b/clang_delta/ExpressionDetector.cpp
+index aa87873..dd77068 100644
+--- a/clang_delta/ExpressionDetector.cpp
++++ b/clang_delta/ExpressionDetector.cpp
+@@ -64,7 +64,8 @@ public:
+ StringRef FileName, bool IsAngled,
+ CharSourceRange FilenameRange, const FileEntry *File,
+ StringRef SearchPath, StringRef RelativePath,
+- const Module *Imported) override;
++ const Module *Imported,
++ SrcMgr::CharacteristicKind FileType) override;
+
+ private:
+ SourceManager &SrcManager;
+@@ -77,14 +78,15 @@ private:
+ };
+
+ void IncludesPPCallbacks::InclusionDirective(SourceLocation HashLoc,
+- const Token &/*IncludeTok*/,
+- StringRef FileName,
+- bool /*IsAngled*/,
+- CharSourceRange /*FilenameRange*/,
+- const FileEntry * /*File*/,
+- StringRef /*SearchPath*/,
+- StringRef /*RelativePath*/,
+- const Module * /*Imported*/)
++ const Token &/*IncludeTok*/,
++ StringRef FileName,
++ bool /*IsAngled*/,
++ CharSourceRange /*FilenameRange*/,
++ const FileEntry * /*File*/,
++ StringRef /*SearchPath*/,
++ StringRef /*RelativePath*/,
++ const Module * /*Imported*/,
++ SrcMgr::CharacteristicKind /*FileType*/)
+ {
+ if (!SrcManager.isInMainFile(HashLoc))
+ return;
+diff --git a/clang_delta/RemoveUnusedEnumMember.cpp b/clang_delta/RemoveUnusedEnumMember.cpp
+index 8bf8673..469db3f 100644
+--- a/clang_delta/RemoveUnusedEnumMember.cpp
++++ b/clang_delta/RemoveUnusedEnumMember.cpp
+@@ -99,15 +99,15 @@ void RemoveUnusedEnumMember::removeEnumConstantDecl()
+ {
+ SourceLocation StartLoc = (*TheEnumIterator)->getLocStart();
+ if (StartLoc.isMacroID()) {
+- std::pair<SourceLocation, SourceLocation> Locs =
++ CharSourceRange CSRange =
+ SrcManager->getExpansionRange(StartLoc);
+- StartLoc = Locs.first;
++ StartLoc = CSRange.getBegin();
+ }
+ SourceLocation EndLoc = (*TheEnumIterator)->getLocEnd();
+ if (EndLoc.isMacroID()) {
+- std::pair<SourceLocation, SourceLocation> Locs =
++ CharSourceRange CSRange =
+ SrcManager->getExpansionRange(EndLoc);
+- EndLoc = Locs.second;
++ EndLoc = CSRange.getEnd();
+ }
+ SourceLocation CommaLoc = Lexer::findLocationAfterToken(
+ EndLoc, tok::comma, *SrcManager, Context->getLangOpts(),
+diff --git a/clang_delta/TransformationManager.cpp b/clang_delta/TransformationManager.cpp
+index 89e9d72..1e56b90 100644
+--- a/clang_delta/TransformationManager.cpp
++++ b/clang_delta/TransformationManager.cpp
+@@ -223,7 +223,7 @@ llvm::raw_ostream *TransformationManager::getOutStream()
+
+ std::error_code EC;
+ llvm::raw_fd_ostream *Out = new llvm::raw_fd_ostream(
+- OutputFileName, EC, llvm::sys::fs::F_RW);
++ OutputFileName, EC, llvm::sys::fs::FA_Read | llvm::sys::fs::FA_Write);
+ assert(!EC && "Cannot open output file!");
+ return Out;
+ }
+--
+2.19.0
+
next reply other threads:[~2018-10-04 17:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 17:07 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-05-01 8:54 [gentoo-commits] repo/gentoo:master commit in: dev-util/creduce/files/, dev-util/creduce/ Michał Górny
2018-01-04 4:42 Mike Frysinger
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=1538672837.400e84dbd725778f242320820c530c7e3c322488.mgorny@gentoo \
--to=mgorny@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