[arch-commits] Commit in openshadinglanguage/trunk (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Sun Oct 6 10:15:52 UTC 2019
Date: Sunday, October 6, 2019 @ 10:15:52
Author: foutrelis
Revision: 513202
Remove old patches
Deleted:
openshadinglanguage/trunk/clang7.patch
openshadinglanguage/trunk/llvm-static-system-libs.patch
-------------------------------+
clang7.patch | 173 ----------------------------------------
llvm-static-system-libs.patch | 15 ---
2 files changed, 188 deletions(-)
Deleted: clang7.patch
===================================================================
--- clang7.patch 2019-10-06 09:50:34 UTC (rev 513201)
+++ clang7.patch 2019-10-06 10:15:52 UTC (rev 513202)
@@ -1,173 +0,0 @@
-From 8fbbe7dc32e2a418cc259ff8392bd29045d228f8 Mon Sep 17 00:00:00 2001
-From: Larry Gritz <lg at larrygritz.com>
-Date: Sun, 23 Sep 2018 13:19:49 -0700
-Subject: [PATCH] Support clang7 and llvm7
-
-(backported from master)
----
- CHANGES.md | 2 +-
- INSTALL.md | 2 +-
- site/spi/Makefile-bits | 24 +++++++++++++--
- src/liboslcomp/oslcomp.cpp | 6 ++++
- src/liboslexec/llvm_util.cpp | 28 +++++++++++++++---
- .../render-background/ref/out-clang7mac.exr | Bin 0 -> 345516 bytes
- 6 files changed, 53 insertions(+), 9 deletions(-)
- create mode 100644 testsuite/render-background/ref/out-clang7mac.exr
-
-diff --git a/site/spi/Makefile-bits b/site/spi/Makefile-bits
-index fc7dd5542..3ec6a4270 100644
---- a/site/spi/Makefile-bits
-+++ b/site/spi/Makefile-bits
-@@ -18,7 +18,7 @@ ifeq ($(SP_OS), rhel7)
-
- ## If not overridden, here is our preferred LLVM installation
- ## (may be changed as new versions are rolled out to the facility)
-- LLVM_DIRECTORY ?= /shots/spi/home/lib/arnold/rhel7/llvm_5.0.0
-+ LLVM_DIRECTORY ?= /shots/spi/home/lib/arnold/rhel7/llvm_7.0.0
-
- # A variety of tags can be used to try specific versions of gcc or
- # clang from the site-specific places we have installed them.
-@@ -28,14 +28,26 @@ ifeq ($(SP_OS), rhel7)
- -DCMAKE_CXX_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_4.0_final/bin/clang++
- else ifeq (${COMPILER}, clang5)
- MY_CMAKE_FLAGS += \
-- -DCMAKE_C_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_5.0.0/bin/clang \
-- -DCMAKE_CXX_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_5.0.0/bin/clang++
-+ -DCMAKE_C_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_5.0.1/bin/clang \
-+ -DCMAKE_CXX_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_5.0.1/bin/clang++
-+ else ifeq (${COMPILER}, clang6)
-+ MY_CMAKE_FLAGS += \
-+ -DCMAKE_C_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_6.0.1/bin/clang \
-+ -DCMAKE_CXX_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_6.0.1/bin/clang++
-+ else ifeq (${COMPILER}, clang7)
-+ MY_CMAKE_FLAGS += \
-+ -DCMAKE_C_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_7.0.0/bin/clang \
-+ -DCMAKE_CXX_COMPILER=/shots/spi/home/lib/arnold/rhel7/llvm_7.0.0/bin/clang++
- else ifeq (${COMPILER},clang)
- MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
- else ifeq (${COMPILER}, gcc490)
- MY_CMAKE_FLAGS += \
- -DCMAKE_C_COMPILER=/net/soft_scratch/apps/arnold/tools/gcc-4.9-20130512-test/bin/gcc \
- -DCMAKE_CXX_COMPILER=/net/soft_scratch/apps/arnold/tools/gcc-4.9-20130512-test/bin/g++
-+ else ifeq (${COMPILER}, gcc6)
-+ MY_CMAKE_FLAGS += \
-+ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-6/root/usr/bin/gcc \
-+ -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-6/root/usr/bin/g++
- else ifeq (${COMPILER},gcc)
- MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
- else ifeq (${COMPILER},)
-@@ -43,8 +55,12 @@ ifeq ($(SP_OS), rhel7)
- MY_CMAKE_FLAGS += \
- -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang \
- -DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
-+ MY_CMAKE_FLAGS += -DCMAKE_C_FLAGS="--gcc-toolchain=/usr" \
-+ -DCMAKE_CXX_FLAGS="--gcc-toolchain=/usr" \
-+ -DTOOLCHAIN_FLAGS="--gcc-toolchain=/usr"
- endif
-
-+
- MY_CMAKE_FLAGS += \
- -DOPENEXR_CUSTOM_INCLUDE_DIR=/usr/include/OpenEXR2 \
- -DOPENEXR_CUSTOM_LIB_DIR=/usr/lib64/OpenEXR2 \
-@@ -93,6 +109,8 @@ else ifeq (${platform}, macosx)
- MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=clang-3.5 -DCMAKE_CXX_COMPILER=clang++-3.5
- else ifeq (${COMPILER},clang40)
- MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm at 4/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm at 4/bin/clang++
-+ else ifeq (${COMPILER},clang7)
-+ MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/Cellar/llvm/7.0.0/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/Cellar/llvm/7.0.0/bin/clang++
- else ifeq (${COMPILER},clang)
- MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
- else ifeq (${COMPILER},gcc)
-diff --git a/src/liboslcomp/oslcomp.cpp b/src/liboslcomp/oslcomp.cpp
-index 56baa05dc..308d88cad 100644
---- a/src/liboslcomp/oslcomp.cpp
-+++ b/src/liboslcomp/oslcomp.cpp
-@@ -331,6 +331,12 @@ OSLCompilerImpl::preprocess_buffer (const std::string &buffer,
-
- inst.getPreprocessorOutputOpts().ShowCPP = 1;
- inst.getPreprocessorOutputOpts().ShowMacros = 0;
-+#if OSL_LLVM_VERSION >= 40
-+ inst.getPreprocessorOutputOpts().ShowComments = 0;
-+ inst.getPreprocessorOutputOpts().ShowLineMarkers = 1;
-+ inst.getPreprocessorOutputOpts().ShowMacroComments = 0;
-+ inst.getPreprocessorOutputOpts().ShowIncludeDirectives = 0;
-+#endif
-
- clang::HeaderSearchOptions &headerOpts = inst.getHeaderSearchOpts();
- headerOpts.UseBuiltinIncludes = 0;
-diff --git a/src/liboslexec/llvm_util.cpp b/src/liboslexec/llvm_util.cpp
-index ca8b3585d..041f6cd0d 100644
---- a/src/liboslexec/llvm_util.cpp
-+++ b/src/liboslexec/llvm_util.cpp
-@@ -88,6 +88,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- # include <llvm/Transforms/Scalar/GVN.h>
- #endif
-
-+#if OSL_LLVM_VERSION >= 70
-+#include <llvm/Transforms/Utils.h>
-+#include <llvm/Transforms/InstCombine/InstCombine.h>
-+#endif
-+
- OSL_NAMESPACE_ENTER
-
- namespace pvt {
-@@ -1353,6 +1358,10 @@ LLVM_Util::op_memset (llvm::Value *ptr, int val, int len, int align)
- void
- LLVM_Util::op_memset (llvm::Value *ptr, int val, llvm::Value *len, int align)
- {
-+#if OSL_LLVM_VERSION >= 70
-+ builder().CreateMemSet (ptr, builder().getInt8((unsigned char)val),
-+ len, (unsigned)align);
-+#else
- // memset with i32 len
- // and with an i8 pointer (dst) for LLVM-2.8
- llvm::Type* types[] = {
-@@ -1381,6 +1390,7 @@ LLVM_Util::op_memset (llvm::Value *ptr, int val, llvm::Value *len, int align)
- };
- builder().CreateCall (func, llvm::ArrayRef<llvm::Value*>(args, 5));
-
-+#endif
- #endif
- }
-
-@@ -1389,6 +1399,10 @@ LLVM_Util::op_memset (llvm::Value *ptr, int val, llvm::Value *len, int align)
- void
- LLVM_Util::op_memcpy (llvm::Value *dst, llvm::Value *src, int len, int align)
- {
-+#if OSL_LLVM_VERSION >= 70
-+ builder().CreateMemCpy (dst, (unsigned)align, src, (unsigned)align,
-+ uint64_t(len));
-+#else
- // i32 len
- // and with i8 pointers (dst and src) for LLVM-2.8
- llvm::Type* types[] = {
-@@ -1412,6 +1426,7 @@ LLVM_Util::op_memcpy (llvm::Value *dst, llvm::Value *src, int len, int align)
- };
- builder().CreateCall (func, llvm::ArrayRef<llvm::Value*>(args, 5));
- #endif
-+#endif
- }
-
-
-@@ -1713,12 +1728,17 @@ LLVM_Util::write_bitcode_file (const char *filename, std::string *err)
- std::string local_error;
- llvm::raw_fd_ostream out (filename, err ? *err : local_error, llvm::sys::fs::F_None);
- #endif
-- llvm::WriteBitcodeToFile (module(), out);
--
-+ if (! out.has_error()) {
-+#if OSL_LLVM_VERSION >= 70
-+ llvm::WriteBitcodeToFile (*module(), out);
-+#else
-+ llvm::WriteBitcodeToFile (module(), out);
-+#endif
- #if OSL_LLVM_VERSION >= 36
-- if (err && local_error)
-- *err = local_error.message ();
-+ if (err && local_error)
-+ *err = local_error.message ();
- #endif
-+ }
- }
-
-
Deleted: llvm-static-system-libs.patch
===================================================================
--- llvm-static-system-libs.patch 2019-10-06 09:50:34 UTC (rev 513201)
+++ llvm-static-system-libs.patch 2019-10-06 10:15:52 UTC (rev 513202)
@@ -1,15 +0,0 @@
-diff -upr OpenShadingLanguage-Release-1.5.12.orig/src/cmake/externalpackages.cmake OpenShadingLanguage-Release-1.5.12/src/cmake/externalpackages.cmake
---- OpenShadingLanguage-Release-1.5.12.orig/src/cmake/externalpackages.cmake 2014-12-26 22:22:53.000000000 +0200
-+++ OpenShadingLanguage-Release-1.5.12/src/cmake/externalpackages.cmake 2015-03-16 03:12:56.052479730 +0200
-@@ -211,9 +211,10 @@ if ((LLVM_LIBRARY OR LLVM_STATIC) AND LL
- # if static LLVM libraries were requested, use llvm-config to generate
- # the list of what libraries we need, and substitute that in the right
- # way for LLVM_LIBRARY.
-- execute_process (COMMAND ${LLVM_CONFIG} --libfiles
-+ execute_process (COMMAND ${LLVM_CONFIG} --libfiles --system-libs
- OUTPUT_VARIABLE LLVM_LIBRARY
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-+ string (REPLACE "\n" " " LLVM_LIBRARY ${LLVM_LIBRARY})
- string (REPLACE " " ";" LLVM_LIBRARY ${LLVM_LIBRARY})
- endif ()
- if (VERBOSE)
More information about the arch-commits
mailing list