From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 17F201382C5 for ; Thu, 4 Jan 2018 04:42:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 21F4FE084A; Thu, 4 Jan 2018 04:42:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E1FF2E084A for ; Thu, 4 Jan 2018 04:42:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 00D2D335C07 for ; Thu, 4 Jan 2018 04:42:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8BDC7197 for ; Thu, 4 Jan 2018 04:42:06 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1515040886.5c5af6f0b0c4fb3e986d6a878568b2f8fed91db0.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/creduce/files/, dev-util/creduce/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/creduce/creduce-2.7.0-r1.ebuild dev-util/creduce/files/creduce-2.7.0-llvm-5.patch X-VCS-Directories: dev-util/creduce/files/ dev-util/creduce/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 5c5af6f0b0c4fb3e986d6a878568b2f8fed91db0 X-VCS-Branch: master Date: Thu, 4 Jan 2018 04:42:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b96fa47d-02e7-47ef-8ea7-4753cd469299 X-Archives-Hash: e792561d8dd3b20f563423205a23e21d commit: 5c5af6f0b0c4fb3e986d6a878568b2f8fed91db0 Author: Mike Frysinger gentoo org> AuthorDate: Thu Jan 4 04:40:06 2018 +0000 Commit: Mike Frysinger gentoo 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 +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 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 +