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 0F0661382C5 for ; Sun, 28 Jun 2020 16:45:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2CB46E090F; Sun, 28 Jun 2020 16:45:25 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 090F8E090F for ; Sun, 28 Jun 2020 16:45:25 +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 02B9934F152 for ; Sun, 28 Jun 2020 16:45:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 01BE72B3 for ; Sun, 28 Jun 2020 16:45:21 +0000 (UTC) From: "Christoph Junghans" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Christoph Junghans" Message-ID: <1593362696.526716bac86709f53cab67e71ab2d899cdcd2269.junghans@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/ispc/, dev-lang/ispc/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/ispc/files/ispc-9999-cmake-gentoo-release.patch dev-lang/ispc/files/ispc-9999-llvm-10.patch dev-lang/ispc/files/ispc-9999-werror.patch dev-lang/ispc/ispc-9999.ebuild dev-lang/ispc/metadata.xml X-VCS-Directories: dev-lang/ispc/files/ dev-lang/ispc/ X-VCS-Committer: junghans X-VCS-Committer-Name: Christoph Junghans X-VCS-Revision: 526716bac86709f53cab67e71ab2d899cdcd2269 X-VCS-Branch: master Date: Sun, 28 Jun 2020 16:45:21 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0b1658a1-5f1c-4d4c-8f70-6ace6619abf4 X-Archives-Hash: 8661d877cefe4e87e9839441b70a0e76 commit: 526716bac86709f53cab67e71ab2d899cdcd2269 Author: Guillaume BRUN gmail com> AuthorDate: Sun Jun 28 15:56:26 2020 +0000 Commit: Christoph Junghans gentoo org> CommitDate: Sun Jun 28 16:44:56 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=526716ba dev-lang/ispc: Add -9999 ebuild Signed-off-by: Guillaume BRUN gmail.com> Package-Manager: Portage-2.3.99, Repoman-2.3.23 Signed-off-by: Christoph Junghans gentoo.org> .../files/ispc-9999-cmake-gentoo-release.patch | 13 +++ dev-lang/ispc/files/ispc-9999-llvm-10.patch | 106 +++++++++++++++++++++ dev-lang/ispc/files/ispc-9999-werror.patch | 13 +++ dev-lang/ispc/ispc-9999.ebuild | 59 ++++++++++++ dev-lang/ispc/metadata.xml | 5 +- 5 files changed, 192 insertions(+), 4 deletions(-) diff --git a/dev-lang/ispc/files/ispc-9999-cmake-gentoo-release.patch b/dev-lang/ispc/files/ispc-9999-cmake-gentoo-release.patch new file mode 100644 index 00000000000..b89e6150400 --- /dev/null +++ b/dev-lang/ispc/files/ispc-9999-cmake-gentoo-release.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 13e66268..27ff8364 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -137,7 +137,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin ) + + if(CMAKE_BUILD_TYPE) + # Validate build type +- set(CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo") ++ set(CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo;Gentoo") + + string(FIND "${CONFIGURATION_TYPES}" "${CMAKE_BUILD_TYPE}" MATCHED_CONFIG) + if (${MATCHED_CONFIG} EQUAL -1) diff --git a/dev-lang/ispc/files/ispc-9999-llvm-10.patch b/dev-lang/ispc/files/ispc-9999-llvm-10.patch new file mode 100644 index 00000000000..6911a76d9e1 --- /dev/null +++ b/dev-lang/ispc/files/ispc-9999-llvm-10.patch @@ -0,0 +1,106 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 13e66268..27ff8364 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -218,7 +218,7 @@ if (WASM_ENABLED) + list(APPEND ISPC_TARGETS wasm-i32x4) + endif() + +-set(CLANG_LIBRARY_LIST clangFrontend clangDriver clangSerialization clangParse clangSema clangAnalysis clangAST clangBasic clangEdit clangLex) ++set(CLANG_LIBRARY_LIST clang clang-cpp) + set(LLVM_COMPONENTS engine ipo bitreader bitwriter instrumentation linker option) + + if (${LLVM_VERSION_NUMBER} VERSION_GREATER_EQUAL "10.0.0") +@@ -402,11 +402,8 @@ if (ISPC_USE_ASAN) + endif() + + # Link against Clang libraries +-foreach(clangLib ${CLANG_LIBRARY_LIST}) +- find_library(${clangLib}Path NAMES ${clangLib} HINTS ${LLVM_LIBRARY_DIRS}) +- list(APPEND CLANG_LIBRARY_FULL_PATH_LIST ${${clangLib}Path}) +-endforeach() +-target_link_libraries(${PROJECT_NAME} ${CLANG_LIBRARY_FULL_PATH_LIST}) ++find_package(Clang REQUIRED) ++target_link_libraries(${PROJECT_NAME} ${CLANG_LIBRARY_LIST}) + + # Link against LLVM libraries + target_link_libraries(${PROJECT_NAME} ${LLVM_LIBRARY_LIST}) +diff --git a/src/llvmutil.cpp b/src/llvmutil.cpp +index 06fab989..57a7130f 100644 +--- a/src/llvmutil.cpp ++++ b/src/llvmutil.cpp +@@ -42,6 +42,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1394,7 +1395,7 @@ static void lDumpValue(llvm::Value *v, std::set &done) { + return; + + fprintf(stderr, " "); +- v->dump(); ++ v->print(llvm::outs(), false); + done.insert(v); + + if (inst == NULL) +diff --git a/src/opt.cpp b/src/opt.cpp +index d78ac374..a607594a 100644 +--- a/src/opt.cpp ++++ b/src/opt.cpp +@@ -142,7 +142,7 @@ static llvm::Pass *CreateFixBooleanSelectPass(); + getenv("FUNC"), strlen(getenv("FUNC")))))) { \ + fprintf(stderr, "Start of " NAME "\n"); \ + fprintf(stderr, "---------------\n"); \ +- bb.dump(); \ ++ bb.print(llvm::outs(), false); \ + fprintf(stderr, "---------------\n\n"); \ + } else /* eat semicolon */ + +@@ -152,7 +152,7 @@ static llvm::Pass *CreateFixBooleanSelectPass(); + getenv("FUNC"), strlen(getenv("FUNC")))))) { \ + fprintf(stderr, "End of " NAME " %s\n", modifiedAny ? "** CHANGES **" : ""); \ + fprintf(stderr, "---------------\n"); \ +- bb.dump(); \ ++ bb.print(llvm::outs(), false); \ + fprintf(stderr, "---------------\n\n"); \ + } else /* eat semicolon */ + #else +@@ -453,7 +453,7 @@ void Optimize(llvm::Module *module, int optLevel) { + #ifndef ISPC_NO_DUMPS + if (g->debugPrint) { + printf("*** Code going into optimization ***\n"); +- module->dump(); ++ module->print(llvm::outs(), nullptr); + } + #endif + DebugPassManager optPM; +@@ -666,7 +666,7 @@ void Optimize(llvm::Module *module, int optLevel) { + #ifndef ISPC_NO_DUMPS + if (g->debugPrint) { + printf("\n*****\nFINAL OUTPUT\n*****\n"); +- module->dump(); ++ module->print(llvm::outs(), nullptr); + } + #endif + } +@@ -4256,7 +4256,7 @@ char DebugPass::ID = 0; + bool DebugPass::runOnModule(llvm::Module &module) { + fprintf(stderr, "%s", str_output); + fflush(stderr); +- module.dump(); ++ module.print(llvm::outs(), nullptr); + return true; + } + +@@ -4303,7 +4303,7 @@ void DebugPassFile::run(llvm::Module &module, bool init) { + snprintf(fname, sizeof(fname), "%s_%d_%s.ll", init ? "init" : "ir", pnum, sanitize(std::string(pname)).c_str()); + llvm::raw_fd_ostream OS(fname, EC, llvm::sys::fs::F_None); + Assert(!EC && "IR dump file creation failed!"); +- module.print(OS, 0); ++ module.print(OS, nullptr); + } + + bool DebugPassFile::runOnModule(llvm::Module &module) { diff --git a/dev-lang/ispc/files/ispc-9999-werror.patch b/dev-lang/ispc/files/ispc-9999-werror.patch new file mode 100644 index 00000000000..3fa144b78db --- /dev/null +++ b/dev-lang/ispc/files/ispc-9999-werror.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 13e66268..27ff8364 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -352,7 +352,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}) + # Compile options + if (UNIX) +- target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wno-sign-compare -Wno-unused-function -Werror ${LLVM_CPP_FLAGS}) ++ target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wno-sign-compare -Wno-unused-function ${LLVM_CPP_FLAGS}) + # Security options + target_compile_options(${PROJECT_NAME} PRIVATE -fstack-protector -fdata-sections -ffunction-sections + -Wformat -Wformat-security -fpie -fwrapv) diff --git a/dev-lang/ispc/ispc-9999.ebuild b/dev-lang/ispc/ispc-9999.ebuild new file mode 100644 index 00000000000..244bb728565 --- /dev/null +++ b/dev-lang/ispc/ispc-9999.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 ) + +inherit cmake toolchain-funcs python-any-r1 + +DESCRIPTION="Intel SPMD Program Compiler" +HOMEPAGE="https://ispc.github.com/" + +if [[ ${PV} = *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/ispc/ispc.git" + KEYWORDS="" +else + SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="BSD BSD-2 UoI-NCSA" +SLOT="0" +IUSE="examples" + +RDEPEND=" + >=sys-devel/clang-3.0:* + >=sys-devel/llvm-3.0:* + " +DEPEND=" + ${RDEPEND} + ${PYTHON_DEPS} + sys-devel/bison + sys-devel/flex + " + +PATCHES=( + "${FILESDIR}/${P}-cmake-gentoo-release.patch" + "${FILESDIR}/${P}-llvm-10.patch" + "${FILESDIR}/${P}-werror.patch" +) + +src_configure() { + local mycmakeargs=( + "-DARM_ENABLED=$(usex arm)" + ) + cmake_src_configure +} + +src_install() { + dobin ${BUILD_DIR}/bin/ispc + dodoc README.md + + if use examples; then + insinto "/usr/share/doc/${PF}/examples" + docompress -x "/usr/share/doc/${PF}/examples" + doins -r ${BUILD_DIR}/examples/* + fi +} diff --git a/dev-lang/ispc/metadata.xml b/dev-lang/ispc/metadata.xml index c214c07655f..285bd7dd705 100644 --- a/dev-lang/ispc/metadata.xml +++ b/dev-lang/ispc/metadata.xml @@ -1,10 +1,7 @@ - - junghans@gentoo.org - Christoph Junghans - + ispc/ispc