* [gentoo-commits] repo/gentoo:master commit in: dev-util/creduce/files/, dev-util/creduce/
@ 2018-10-04 17:07 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2018-10-04 17:07 UTC (permalink / raw
To: gentoo-commits
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
+
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/creduce/files/, dev-util/creduce/
@ 2020-05-01 8:54 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2020-05-01 8:54 UTC (permalink / raw
To: gentoo-commits
commit: 7f6a7c736d4e6cc2f5c51e2353e18a8d30c030d8
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri May 1 08:44:49 2020 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri May 1 08:53:35 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f6a7c73
dev-util/creduce: Remove old (LLVM 7)
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-util/creduce/Manifest | 3 -
dev-util/creduce/creduce-2.8.0.ebuild | 38 ---------
.../creduce/creduce-2.8.0_pre20180411-r1.ebuild | 42 ----------
.../creduce/creduce-2.9.0_pre20190414-r1.ebuild | 39 ----------
dev-util/creduce/creduce-9999.ebuild | 39 ----------
.../creduce/files/creduce-2.8.0-link-libs.patch | 31 --------
dev-util/creduce/files/creduce-llvm-7.patch | 90 ----------------------
7 files changed, 282 deletions(-)
diff --git a/dev-util/creduce/Manifest b/dev-util/creduce/Manifest
index a67e6fd5af6..cb6764e980e 100644
--- a/dev-util/creduce/Manifest
+++ b/dev-util/creduce/Manifest
@@ -1,4 +1 @@
-DIST creduce-095c551a5f9ccaf2986edb836e7be9872d36c233.tar.gz 724597 BLAKE2B 9d7a57349b8e14599c795a27bdf2cb4536f5b41f02faf10263c3d883bf94efd83ce7483bbf72aee0c2fe00d8515490e5f5a9c8df575abe80e90231a4373c9318 SHA512 a317bae5e47ee85b4be401d8dae490bd0ba86640aff6e7b0e9d6fe14d1f87199b4e12edbfa3eddcb5341b926a753dae17131f5e571362849c01377eda00407fa
-DIST creduce-2.8.0.tar.gz 774668 BLAKE2B d799372d107c0cb45e9ed95f82c29634fd9de053c4eda1a2dfce8b2152ca84f7fff5e7b679e21e6dbe869d139e1cfd73963c02751ad30809a3470316ce10e077 SHA512 9d616dc421d0e932656ab0220ebfe1a4f20a08d46bf4ee004ef96a693ff37caeadf96c769262574a9789ac52c2bb4586e2b8602f7d44b627229b8eb45f5af0ea
DIST creduce-2a4480eb6cb72b3d2d131b536c883cc6d41bdcaa.tar.gz 732121 BLAKE2B dad2cf8ec2453a6b210a5303480e7dabfd978b7d7a1326cbc1e4ca40fa7c4e7d18da5f9309ca5f392740bbf55a1c9863e389c9789fceff062a68e9bb9a79de9f SHA512 c598f5c998f0a02d57006e640f88b951cd33a24f24507d6671067842b81bb3fe37c2fccd040b6cedb6fd5857396213e4003ee5fbd3040058050bad67226dc27f
-DIST creduce-48e622ba74bc35c5a81299d3a34b9b14038d6a70.tar.gz 720872 BLAKE2B 031104f5e7ca3d3cfb41087f432ec0cf1b1c125171ffac31b6f3b0a9a4483b5ca8a667331aacae7f5acdaaf99e8b688bb62b332405c1266d2b114a4bdceca9cc SHA512 36cc12015d85acfa99f0d04440184517da1f766df7a804ee02719f1208f67aff4f4db7af4066817b17efdc89a6d2cf7ab62b0c622a611bc9b03a89b8d1b68d01
diff --git a/dev-util/creduce/creduce-2.8.0.ebuild b/dev-util/creduce/creduce-2.8.0.ebuild
deleted file mode 100644
index 78b23f9fd6b..00000000000
--- a/dev-util/creduce/creduce-2.8.0.ebuild
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-: ${CMAKE_MAKEFILE_GENERATOR=ninja}
-inherit cmake-utils llvm
-
-DESCRIPTION="C-Reduce - a plugin-based C program reducer"
-HOMEPAGE="https://embed.cs.utah.edu/creduce/"
-SRC_URI="https://embed.cs.utah.edu/creduce/${P}.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/Exporter-Lite
- dev-perl/File-Which
- dev-perl/Getopt-Tabular
- dev-perl/Regexp-Common"
-DEPEND="${COMMON_DEPEND}
- sys-devel/flex"
-
-PATCHES=(
- "${FILESDIR}"/creduce-llvm-7.patch
- "${FILESDIR}"/creduce-2.8.0-link-libs.patch
-)
-
-llvm_check_deps() {
- has_version "sys-devel/clang:${LLVM_SLOT}"
-}
diff --git a/dev-util/creduce/creduce-2.8.0_pre20180411-r1.ebuild b/dev-util/creduce/creduce-2.8.0_pre20180411-r1.ebuild
deleted file mode 100644
index 0249ee3b93d..00000000000
--- a/dev-util/creduce/creduce-2.8.0_pre20180411-r1.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# 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/Exporter-Lite
- dev-perl/File-Which
- dev-perl/Getopt-Tabular
- dev-perl/Regexp-Common
- dev-perl/Sys-CPU"
-DEPEND="${COMMON_DEPEND}
- sys-devel/flex"
-
-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/creduce-2.9.0_pre20190414-r1.ebuild b/dev-util/creduce/creduce-2.9.0_pre20190414-r1.ebuild
deleted file mode 100644
index 15624685b35..00000000000
--- a/dev-util/creduce/creduce-2.9.0_pre20190414-r1.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-: ${CMAKE_MAKEFILE_GENERATOR=ninja}
-inherit cmake-utils llvm
-
-EGIT_COMMIT="095c551a5f9ccaf2986edb836e7be9872d36c233"
-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/Exporter-Lite
- dev-perl/File-Which
- dev-perl/Getopt-Tabular
- dev-perl/Regexp-Common"
-DEPEND="${COMMON_DEPEND}
- sys-devel/flex"
-S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
-
-PATCHES=(
- "${FILESDIR}"/creduce-2.8.0-link-libs.patch
-)
-
-llvm_check_deps() {
- has_version "sys-devel/clang:${LLVM_SLOT}"
-}
diff --git a/dev-util/creduce/creduce-9999.ebuild b/dev-util/creduce/creduce-9999.ebuild
deleted file mode 100644
index 8b8470de887..00000000000
--- a/dev-util/creduce/creduce-9999.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-EGIT_REPO_URI="https://github.com/csmith-project/${PN}"
-
-: ${CMAKE_MAKEFILE_GENERATOR=ninja}
-inherit cmake-utils git-r3 llvm
-
-DESCRIPTION="C-Reduce - a plugin-based C program reducer"
-HOMEPAGE="https://embed.cs.utah.edu/creduce/"
-SRC_URI=""
-
-LICENSE="UoI-NCSA"
-SLOT="0"
-KEYWORDS=""
-IUSE=""
-
-LLVM_MAX_SLOT=7
-
-COMMON_DEPEND="
- >=dev-lang/perl-5.10.0
- sys-devel/clang:${LLVM_MAX_SLOT}"
-RDEPEND="${COMMON_DEPEND}
- dev-perl/Exporter-Lite
- dev-perl/File-Which
- dev-perl/Getopt-Tabular
- dev-perl/Regexp-Common"
-DEPEND="${COMMON_DEPEND}
- sys-devel/flex"
-
-PATCHES=(
- "${FILESDIR}"/creduce-2.8.0-link-libs.patch
-)
-
-llvm_check_deps() {
- has_version "sys-devel/clang:${LLVM_SLOT}"
-}
diff --git a/dev-util/creduce/files/creduce-2.8.0-link-libs.patch b/dev-util/creduce/files/creduce-2.8.0-link-libs.patch
deleted file mode 100644
index 25e9ef22916..00000000000
--- a/dev-util/creduce/files/creduce-2.8.0-link-libs.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 885a675474d93ae4ef929de7520d3ac38ba39156 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sun, 21 Apr 2019 14:20:34 +0200
-Subject: [PATCH] Revert "Do not list `LLVM_LIBS` in the
- `target_link_libraries`."
-
-This breaks linking against shared LLVM.
----
- clang_delta/CMakeLists.txt | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/clang_delta/CMakeLists.txt b/clang_delta/CMakeLists.txt
-index 6493abf..ab1dc42 100644
---- a/clang_delta/CMakeLists.txt
-+++ b/clang_delta/CMakeLists.txt
-@@ -242,11 +242,7 @@ add_executable(clang_delta
- git_version.h
- )
-
--# ENE, LLVM 6.0: LLVM_LIBS end up in the link command line anyway. I'm not
--# quite sure why! But if you list LLVM_LIBS here, the `clang_delta' binary
--# can end up with dynamic link errors when it runs (multiply defined symbols).
--#
--target_link_libraries(clang_delta ${CLANG_LIBS})
-+target_link_libraries(clang_delta ${CLANG_LIBS} ${LLVM_LIBS})
-
- # Custom target for running clang_delta tests
- #
---
-2.21.0
-
diff --git a/dev-util/creduce/files/creduce-llvm-7.patch b/dev-util/creduce/files/creduce-llvm-7.patch
deleted file mode 100644
index a005eebff2e..00000000000
--- a/dev-util/creduce/files/creduce-llvm-7.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-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
-
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/creduce/files/, dev-util/creduce/
@ 2018-01-04 4:42 Mike Frysinger
0 siblings, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2018-01-04 4:42 UTC (permalink / raw
To: gentoo-commits
commit: 5c5af6f0b0c4fb3e986d6a878568b2f8fed91db0
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 4 04:40:06 2018 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Jan 4 04:41:26 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c5af6f0
dev-util/creduce: add upstream fix for building w/llvm-5
dev-util/creduce/creduce-2.7.0-r1.ebuild | 38 ++++++++++++++++
dev-util/creduce/files/creduce-2.7.0-llvm-5.patch | 54 +++++++++++++++++++++++
2 files changed, 92 insertions(+)
diff --git a/dev-util/creduce/creduce-2.7.0-r1.ebuild b/dev-util/creduce/creduce-2.7.0-r1.ebuild
new file mode 100644
index 00000000000..ec92e4710d2
--- /dev/null
+++ b/dev-util/creduce/creduce-2.7.0-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+: ${CMAKE_MAKEFILE_GENERATOR=ninja}
+inherit cmake-utils llvm
+
+DESCRIPTION="C-Reduce - a plugin-based C program reducer"
+HOMEPAGE="https://embed.cs.utah.edu/creduce/"
+SRC_URI="https://embed.cs.utah.edu/creduce/${P}.tar.gz"
+
+LICENSE="UoI-NCSA"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+COMMON_DEPEND="
+ >=dev-lang/perl-5.10.0
+ >=sys-devel/clang-4:="
+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}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-llvm-5.patch
+)
+
+llvm_check_deps() {
+ has_version "sys-devel/clang:${LLVM_SLOT}"
+}
diff --git a/dev-util/creduce/files/creduce-2.7.0-llvm-5.patch b/dev-util/creduce/files/creduce-2.7.0-llvm-5.patch
new file mode 100644
index 00000000000..ecf2ac70fa8
--- /dev/null
+++ b/dev-util/creduce/files/creduce-2.7.0-llvm-5.patch
@@ -0,0 +1,54 @@
+From 97e2b29956adbe61973228ef7d8bff28e83d04d4 Mon Sep 17 00:00:00 2001
+From: Yang Chen <chenyang@cs.utah.edu>
+Date: Thu, 27 Apr 2017 20:55:32 -0700
+Subject: [PATCH] Fix build failure with LLVM trunk
+
+Patch provided by Markus Trippelsdorf. Thanks!
+
+"InputKind was refactored in Clang r301442.
+
+The IK_Preprocessed* comparisons are superfluous now and can be dropped."
+---
+ clang_delta/TransformationManager.cpp | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/clang_delta/TransformationManager.cpp b/clang_delta/TransformationManager.cpp
+index 8b6bdf454847..5db190cd71d1 100644
+--- a/clang_delta/TransformationManager.cpp
++++ b/clang_delta/TransformationManager.cpp
+@@ -101,16 +101,16 @@ bool TransformationManager::initializeCompilerInstance(std::string &ErrorMsg)
+ CompilerInvocation &Invocation = ClangInstance->getInvocation();
+ InputKind IK = FrontendOptions::getInputKindForExtension(
+ StringRef(SrcFileName).rsplit('.').second);
+- if ((IK == IK_C) || (IK == IK_PreprocessedC)) {
+- Invocation.setLangDefaults(ClangInstance->getLangOpts(), IK_C, T, PPOpts);
++ if (IK.getLanguage() == InputKind::C) {
++ Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind::C, T, PPOpts);
+ }
+- else if ((IK == IK_CXX) || (IK == IK_PreprocessedCXX)) {
++ else if (IK.getLanguage() == InputKind::CXX) {
+ // ISSUE: it might cause some problems when building AST
+- // for a function which has a non-declared callee, e.g.,
+- // It results an empty AST for the caller.
+- Invocation.setLangDefaults(ClangInstance->getLangOpts(), IK_CXX, T, PPOpts);
++ // for a function which has a non-declared callee, e.g.,
++ // It results an empty AST for the caller.
++ Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind::CXX, T, PPOpts);
+ }
+- else if(IK == IK_OpenCL) {
++ else if(IK.getLanguage() == InputKind::OpenCL) {
+ //Commandline parameters
+ std::vector<const char*> Args;
+ Args.push_back("-x");
+@@ -135,7 +135,7 @@ bool TransformationManager::initializeCompilerInstance(std::string &ErrorMsg)
+ &Args[0], &Args[0] + Args.size(),
+ ClangInstance->getDiagnostics());
+ Invocation.setLangDefaults(ClangInstance->getLangOpts(),
+- IK_OpenCL, T, PPOpts);
++ InputKind::OpenCL, T, PPOpts);
+ }
+ else {
+ ErrorMsg = "Unsupported file type!";
+--
+2.15.1
+
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-01 8:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-04 17:07 [gentoo-commits] repo/gentoo:master commit in: dev-util/creduce/files/, dev-util/creduce/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2020-05-01 8:54 Michał Górny
2018-01-04 4:42 Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox