summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume BRUN <the.cheaterman@gmail.com>2020-06-28 17:48:55 +0200
committerChristoph Junghans <junghans@gentoo.org>2020-06-28 10:43:42 -0600
commitf073ca910b7838d71043c2ae752fcd0d147937bd (patch)
tree87f138decd65ef91af78384c653fd69febe53f81 /dev-lang/ispc/files
parentdev-perl/Convert-ASN1: -r bump for CVE-2013-7488 bug #716680 (diff)
downloadgentoo-f073ca910b7838d71043c2ae752fcd0d147937bd.tar.gz
gentoo-f073ca910b7838d71043c2ae752fcd0d147937bd.tar.bz2
gentoo-f073ca910b7838d71043c2ae752fcd0d147937bd.zip
dev-lang/ispc: Add -1.13.0 ebuild
Closes: https://bugs.gentoo.org/656632 Closes: https://bugs.gentoo.org/729924 Signed-off-by: Guillaume BRUN <the.cheaterman@gmail.com> Package-Manager: Portage-2.3.99, Repoman-2.3.23 Signed-off-by: Christoph Junghans <junghans@gentoo.org>
Diffstat (limited to 'dev-lang/ispc/files')
-rw-r--r--dev-lang/ispc/files/ispc-1.13.0-cmake-gentoo-release.patch13
-rw-r--r--dev-lang/ispc/files/ispc-1.13.0-llvm-10.patch106
-rw-r--r--dev-lang/ispc/files/ispc-1.13.0-werror.patch13
3 files changed, 132 insertions, 0 deletions
diff --git a/dev-lang/ispc/files/ispc-1.13.0-cmake-gentoo-release.patch b/dev-lang/ispc/files/ispc-1.13.0-cmake-gentoo-release.patch
new file mode 100644
index 000000000000..b89e61504008
--- /dev/null
+++ b/dev-lang/ispc/files/ispc-1.13.0-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-1.13.0-llvm-10.patch b/dev-lang/ispc/files/ispc-1.13.0-llvm-10.patch
new file mode 100644
index 000000000000..6911a76d9e18
--- /dev/null
+++ b/dev-lang/ispc/files/ispc-1.13.0-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 <llvm/IR/BasicBlock.h>
+ #include <llvm/IR/Instructions.h>
+ #include <llvm/IR/Module.h>
++#include <llvm/Support/raw_ostream.h>
+ #include <map>
+ #include <set>
+ #include <vector>
+@@ -1394,7 +1395,7 @@ static void lDumpValue(llvm::Value *v, std::set<llvm::Value *> &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-1.13.0-werror.patch b/dev-lang/ispc/files/ispc-1.13.0-werror.patch
new file mode 100644
index 000000000000..3fa144b78dbc
--- /dev/null
+++ b/dev-lang/ispc/files/ispc-1.13.0-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)