summaryrefslogtreecommitdiff
path: root/dev-lang/ispc/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-31 20:59:14 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-31 20:59:14 +0100
commite748ba9741f6540f4675c23e3e37b73e822c13a4 (patch)
tree23dece8beabb3a3d7c6c0273b0eb40b21c62a889 /dev-lang/ispc/files
parent908778078736bd36f7a60a2d576d415cb8e000fa (diff)
gentoo resync : 31.05.2021
Diffstat (limited to 'dev-lang/ispc/files')
-rw-r--r--dev-lang/ispc/files/ispc-9999-llvm.patch39
-rw-r--r--dev-lang/ispc/files/ispc-9999-werror.patch13
2 files changed, 52 insertions, 0 deletions
diff --git a/dev-lang/ispc/files/ispc-9999-llvm.patch b/dev-lang/ispc/files/ispc-9999-llvm.patch
new file mode 100644
index 000000000000..7303ac0fd6e8
--- /dev/null
+++ b/dev-lang/ispc/files/ispc-9999-llvm.patch
@@ -0,0 +1,39 @@
+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 frontendopenmp)
+
+ if (X86_ENABLED)
+@@ -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>
+
+ #ifdef ISPC_GENX_ENABLED
+ #include <llvm/GenXIntrinsics/GenXIntrinsics.h>
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 000000000000..0e860a95de26
--- /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
+ set_source_files_properties(${FLEX_OUTPUT} PROPERTIES COMPILE_FLAGS "/wd4005 /wd4003")
+ set_source_files_properties(${BISON_OUTPUT} PROPERTIES COMPILE_FLAGS "/wd4005 /wd4065")
+ else()
+- 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})
+ # The change implementing -Wno-unused-but-set-variable in clang was reverted, so commenting out for now.
+ #if (${LLVM_VERSION_NUMBER} VERSION_GREATER_EQUAL "13.0.0")
+ # set_source_files_properties(${BISON_CPP_OUTPUT} PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")