mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-22 23:07:10 -08:00
sys-devel/llvm: Group all patches by newest version applicable
This commit is contained in:
+71
@@ -0,0 +1,71 @@
|
||||
From 2907883b3c504a08b98cf735ceaa8e438d20f37e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Sun, 21 Aug 2016 22:46:48 +0200
|
||||
Subject: [PATCH 01/10] cmake: Install OCaml modules into correct package
|
||||
location
|
||||
|
||||
Ensure that correct libdir is used for OCaml modules, and install them
|
||||
into dedicated llvm subdirectory rather than the top directory which is
|
||||
supposedly reserved for the standard library.
|
||||
|
||||
Author: Mark Wright <gienah@gentoo.org>
|
||||
Bug: https://bugs.gentoo.org/559134
|
||||
Bug: https://bugs.gentoo.org/559624
|
||||
---
|
||||
bindings/ocaml/backends/CMakeLists.txt | 2 +-
|
||||
bindings/ocaml/llvm/CMakeLists.txt | 2 +-
|
||||
cmake/modules/AddOCaml.cmake | 6 +++---
|
||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/bindings/ocaml/backends/CMakeLists.txt b/bindings/ocaml/backends/CMakeLists.txt
|
||||
index a980638..9e5dc50 100644
|
||||
--- a/bindings/ocaml/backends/CMakeLists.txt
|
||||
+++ b/bindings/ocaml/backends/CMakeLists.txt
|
||||
@@ -23,5 +23,5 @@ foreach(TARGET ${LLVM_TARGETS_TO_BUILD})
|
||||
"${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}")
|
||||
|
||||
install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}"
|
||||
- DESTINATION lib/ocaml)
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm)
|
||||
endforeach()
|
||||
diff --git a/bindings/ocaml/llvm/CMakeLists.txt b/bindings/ocaml/llvm/CMakeLists.txt
|
||||
index 4956fa4..c612f73 100644
|
||||
--- a/bindings/ocaml/llvm/CMakeLists.txt
|
||||
+++ b/bindings/ocaml/llvm/CMakeLists.txt
|
||||
@@ -8,4 +8,4 @@ configure_file(
|
||||
"${LLVM_LIBRARY_DIR}/ocaml/META.llvm")
|
||||
|
||||
install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm"
|
||||
- DESTINATION lib/ocaml)
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm)
|
||||
diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
|
||||
index e3dd1d8..a16238e 100644
|
||||
--- a/cmake/modules/AddOCaml.cmake
|
||||
+++ b/cmake/modules/AddOCaml.cmake
|
||||
@@ -137,7 +137,7 @@ function(add_ocaml_library name)
|
||||
if( APPLE )
|
||||
set(ocaml_rpath "@executable_path/../../lib")
|
||||
elseif( UNIX )
|
||||
- set(ocaml_rpath "\\$ORIGIN/../../lib")
|
||||
+ set(ocaml_rpath "\\$ORIGIN/../../${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
|
||||
|
||||
@@ -189,12 +189,12 @@ function(add_ocaml_library name)
|
||||
endforeach()
|
||||
|
||||
install(FILES ${install_files}
|
||||
- DESTINATION lib/ocaml)
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm)
|
||||
install(FILES ${install_shlibs}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
- DESTINATION lib/ocaml)
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm)
|
||||
|
||||
foreach( install_file ${install_files} ${install_shlibs} )
|
||||
get_filename_component(filename "${install_file}" NAME)
|
||||
--
|
||||
2.9.3
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
From 726806d9b4932287d67f9b6b112099648ea008b4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Sun, 21 Aug 2016 23:01:47 +0200
|
||||
Subject: [PATCH 02/10] cmake: Make OCaml docs dependent on LLVM_BUILD_DOCS
|
||||
|
||||
Author: Bernard Cafarelli <voyageur@gentoo.org>
|
||||
Bug: https://bugs.gentoo.org/562008
|
||||
Patch: https://reviews.llvm.org/D23763
|
||||
---
|
||||
docs/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
|
||||
index eaa1750..f2cd7e9 100644
|
||||
--- a/docs/CMakeLists.txt
|
||||
+++ b/docs/CMakeLists.txt
|
||||
@@ -115,7 +115,7 @@ if (LLVM_ENABLE_SPHINX)
|
||||
endif()
|
||||
|
||||
list(FIND LLVM_BINDINGS_LIST ocaml uses_ocaml)
|
||||
-if( NOT uses_ocaml LESS 0 )
|
||||
+if( NOT uses_ocaml LESS 0 AND LLVM_BUILD_DOCS )
|
||||
set(doc_targets
|
||||
ocaml_llvm
|
||||
ocaml_llvm_all_backends
|
||||
--
|
||||
2.9.3
|
||||
|
||||
+7
-6
@@ -1,19 +1,20 @@
|
||||
From 2ec240a76253839cd1c5dc2e964f55698ae468fc Mon Sep 17 00:00:00 2001
|
||||
From 1251ac2021b768d3a56b4dc03212ea2fd12a34dd Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Mon, 8 Jun 2015 06:43:00 +0200
|
||||
Subject: [PATCH 2/4] cmake: Support overriding Sphinx HTML doc install
|
||||
Subject: [PATCH 03/10] cmake: Support overriding Sphinx HTML doc install
|
||||
directory
|
||||
|
||||
Provide ${PROJECT}_INSTALL_HTML variables (e.g. LLVM_INSTALL_HTML) to
|
||||
override Sphinx HTML doc install directory.
|
||||
|
||||
Fixes: https://llvm.org/bugs/show_bug.cgi?id=23780
|
||||
Bug: https://llvm.org/bugs/show_bug.cgi?id=23780
|
||||
Patch: https://reviews.llvm.org/D23757
|
||||
---
|
||||
cmake/modules/AddSphinxTarget.cmake | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
|
||||
index 045dc23..9c9c444 100644
|
||||
index 045dc23..fac143f 100644
|
||||
--- a/cmake/modules/AddSphinxTarget.cmake
|
||||
+++ b/cmake/modules/AddSphinxTarget.cmake
|
||||
@@ -53,8 +53,12 @@ function (add_sphinx_target builder project)
|
||||
@@ -26,11 +27,11 @@ index 045dc23..9c9c444 100644
|
||||
+ set(${project_upper}_INSTALL_HTML "share/doc/${project}/html"
|
||||
+ CACHE STRING "HTML documentation install directory for ${project}")
|
||||
+
|
||||
+ install(DIRECTORY "${SPHINX_BUILD_DIR}/"
|
||||
+ install(DIRECTORY "${SPHINX_BUILD_DIR}/."
|
||||
+ DESTINATION "${${project_upper}_INSTALL_HTML}")
|
||||
else()
|
||||
message(WARNING Installation of ${builder} not supported)
|
||||
endif()
|
||||
--
|
||||
2.4.3
|
||||
2.9.3
|
||||
|
||||
+7
-6
@@ -1,23 +1,24 @@
|
||||
From 4f7092ba05cccfeea7d26177d93f3d7a57d9bce2 Mon Sep 17 00:00:00 2001
|
||||
From 2f798e87c10a93235a00e95c38e736f9ff7e991b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Mon, 8 Jun 2015 14:29:03 +0200
|
||||
Subject: [PATCH 3/4] cmake: Add an ordering dep between HTML & man Sphinx
|
||||
Subject: [PATCH 04/10] cmake: Add an ordering dep between HTML & man Sphinx
|
||||
targets
|
||||
|
||||
Add a dependency between HTML & manpage Sphinx targets to prevent two
|
||||
instances of Sphinx from running in parallel, and therefore solves race
|
||||
conditions reusing the same doctree directory.
|
||||
|
||||
Fixes: https://llvm.org/bugs/show_bug.cgi?id=23781
|
||||
Bug: https://llvm.org/bugs/show_bug.cgi?id=23781
|
||||
Patch: https://reviews.llvm.org/D23755
|
||||
---
|
||||
docs/CMakeLists.txt | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
|
||||
index da27627..63309a6 100644
|
||||
index f2cd7e9..179a65b 100644
|
||||
--- a/docs/CMakeLists.txt
|
||||
+++ b/docs/CMakeLists.txt
|
||||
@@ -100,6 +100,9 @@ if (LLVM_ENABLE_SPHINX)
|
||||
@@ -109,6 +109,9 @@ if (LLVM_ENABLE_SPHINX)
|
||||
|
||||
if (${SPHINX_OUTPUT_MAN})
|
||||
add_sphinx_target(man llvm)
|
||||
@@ -28,5 +29,5 @@ index da27627..63309a6 100644
|
||||
|
||||
endif()
|
||||
--
|
||||
2.4.3
|
||||
2.9.3
|
||||
|
||||
+7
-5
@@ -1,19 +1,21 @@
|
||||
From d9f80393cfd4e586242ac3efd4e6ba6b49ce39ae Mon Sep 17 00:00:00 2001
|
||||
From 1303993b5b9a4195ebe4930a8cd345c875e7f25c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Tue, 9 Jun 2015 11:58:52 +0200
|
||||
Subject: [PATCH 4/4] cmake: Do not install libgtest
|
||||
Subject: [PATCH 05/10] cmake: Do not install libgtest
|
||||
|
||||
libgtest is an internal test dependency, and should not be installed to
|
||||
the live system as a part of LLVM.
|
||||
|
||||
Bug: http://llvm.org/bugs/show_bug.cgi?id=18341
|
||||
---
|
||||
utils/unittest/CMakeLists.txt | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt
|
||||
index b34e22a..3fe5884 100644
|
||||
index c9a2cdd..bb4f667 100644
|
||||
--- a/utils/unittest/CMakeLists.txt
|
||||
+++ b/utils/unittest/CMakeLists.txt
|
||||
@@ -41,6 +41,9 @@ if (PTHREAD_LIBRARY_PATH)
|
||||
@@ -37,6 +37,9 @@ if (PTHREAD_LIBRARY_PATH)
|
||||
list(APPEND LIBS pthread)
|
||||
endif()
|
||||
|
||||
@@ -24,5 +26,5 @@ index b34e22a..3fe5884 100644
|
||||
googletest/src/gtest-all.cc
|
||||
|
||||
--
|
||||
2.4.3
|
||||
2.9.3
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From a2ecd4815d285281cb816e06b25dc0dc2a933073 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Sun, 21 Aug 2016 23:13:45 +0200
|
||||
Subject: [PATCH 06/10] cmake: Remove the CMAKE_BUILD_TYPE assertion
|
||||
|
||||
---
|
||||
CMakeLists.txt | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 894bc8c..453fcb8 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -232,11 +232,6 @@ endif()
|
||||
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
||||
|
||||
-if (CMAKE_BUILD_TYPE AND
|
||||
- NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
|
||||
- message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
|
||||
-endif()
|
||||
-
|
||||
set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
|
||||
|
||||
set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
|
||||
--
|
||||
2.9.3
|
||||
|
||||
+29
-8
@@ -1,8 +1,8 @@
|
||||
From 93133d777fd4c9d5e0f0cc563927f303f9527159 Mon Sep 17 00:00:00 2001
|
||||
From 2dba8c81db58d7dd62c67379eaa175498a4370f2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Sat, 20 Aug 2016 23:47:41 +0200
|
||||
Subject: [PATCH] llvm-config: Clean up exported values, update for shared
|
||||
linking
|
||||
Subject: [PATCH 07/10] llvm-config: Clean up exported values, update for
|
||||
shared linking
|
||||
|
||||
Gentoo-specific fixup for llvm-config, including:
|
||||
- wiping build-specific CFLAGS, CXXFLAGS,
|
||||
@@ -24,7 +24,9 @@ diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
|
||||
index 744fa4e..593788a 100644
|
||||
--- a/tools/llvm-config/CMakeLists.txt
|
||||
+++ b/tools/llvm-config/CMakeLists.txt
|
||||
@@ -34,4 +34,8 @@ set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
|
||||
@@ -32,8 +32,12 @@ get_property(COMPILE_FLAGS TARGET llvm-config PROPERTY COMPILE_FLAGS)
|
||||
set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
|
||||
set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
|
||||
set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
|
||||
-set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
|
||||
-set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
|
||||
@@ -35,25 +37,42 @@ index 744fa4e..593788a 100644
|
||||
+set(LLVM_CFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
|
||||
+set(LLVM_CXXFLAGS "${CMAKE_CPP_FLAGS} -std=c++11 ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
|
||||
set(LLVM_BUILD_SYSTEM cmake)
|
||||
@@ -48,3 +52,4 @@ set(LLVM_LDFLAGS "${CMAKE_CXX_LINK_FLAGS}")
|
||||
set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
|
||||
set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX}")
|
||||
@@ -46,7 +50,8 @@ endif()
|
||||
# Use the C++ link flags, since they should be a superset of C link flags.
|
||||
set(LLVM_LDFLAGS "${CMAKE_CXX_LINK_FLAGS}")
|
||||
set(LLVM_BUILDMODE ${CMAKE_BUILD_TYPE})
|
||||
-set(LLVM_SYSTEM_LIBS ${SYSTEM_LIBS})
|
||||
+# We don't do static libs, so we don't need to supply any system-libs
|
||||
+set(LLVM_SYSTEM_LIBS "")
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(LLVM_ENABLE_SHARED ON)
|
||||
else()
|
||||
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
|
||||
index c63733f..ead11b9 100644
|
||||
--- a/tools/llvm-config/llvm-config.cpp
|
||||
+++ b/tools/llvm-config/llvm-config.cpp
|
||||
@@ -524,3 +524,4 @@ int main(int argc, char **argv) {
|
||||
@@ -522,7 +522,8 @@ int main(int argc, char **argv) {
|
||||
} else if (Arg == "--host-target") {
|
||||
OS << Triple::normalize(LLVM_DEFAULT_TARGET_TRIPLE) << '\n';
|
||||
} else if (Arg == "--build-mode") {
|
||||
- OS << build_mode << '\n';
|
||||
+ // force Release since we force non-standard Gentoo build mode
|
||||
+ OS << "Release" << '\n';
|
||||
} else if (Arg == "--assertion-mode") {
|
||||
@@ -540,5 +540,9 @@ int main(int argc, char **argv) {
|
||||
#if defined(NDEBUG)
|
||||
OS << "OFF\n";
|
||||
@@ -538,9 +539,17 @@ int main(int argc, char **argv) {
|
||||
} else if (Arg == "--shared-mode") {
|
||||
PrintSharedMode = true;
|
||||
} else if (Arg == "--obj-root") {
|
||||
OS << ActivePrefix << '\n';
|
||||
- OS << ActivePrefix << '\n';
|
||||
+ if (IsInDevelopmentTree) {
|
||||
+ OS << ActivePrefix << '\n';
|
||||
+ } else {
|
||||
+ OS << "/dev/null\n";
|
||||
+ }
|
||||
} else if (Arg == "--src-root") {
|
||||
- OS << LLVM_SRC_ROOT << '\n';
|
||||
+ if (IsInDevelopmentTree) {
|
||||
@@ -62,6 +81,8 @@ index c63733f..ead11b9 100644
|
||||
+ OS << "/dev/null\n";
|
||||
+ }
|
||||
} else if (Arg == "--link-shared") {
|
||||
LinkMode = LinkModeShared;
|
||||
} else if (Arg == "--link-static") {
|
||||
--
|
||||
2.9.3
|
||||
|
||||
+5
-5
@@ -1,17 +1,17 @@
|
||||
From 3da7d5f7f928aa2aa5e7436b27908bb7e7eb3cc1 Mon Sep 17 00:00:00 2001
|
||||
From 597ebcc28580a8532f6634e2a723901c3448b9ff Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Mon, 28 Mar 2016 22:21:19 +0200
|
||||
Subject: [PATCH] cmake: Restore SOVERSIONs on shared libraries
|
||||
Subject: [PATCH 08/10] cmake: Restore SOVERSIONs on shared libraries
|
||||
|
||||
---
|
||||
cmake/modules/AddLLVM.cmake | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
|
||||
index a829751..a7e0688 100644
|
||||
index 9590a1b..83a2359 100644
|
||||
--- a/cmake/modules/AddLLVM.cmake
|
||||
+++ b/cmake/modules/AddLLVM.cmake
|
||||
@@ -436,6 +436,11 @@ function(llvm_add_library name)
|
||||
@@ -445,6 +445,11 @@ function(llvm_add_library name)
|
||||
PREFIX ""
|
||||
)
|
||||
endif()
|
||||
@@ -24,5 +24,5 @@ index a829751..a7e0688 100644
|
||||
|
||||
if(ARG_MODULE OR ARG_SHARED)
|
||||
--
|
||||
2.7.4
|
||||
2.9.3
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -Naur llvm-3.7.0.src.orig/docs/CMakeLists.txt llvm-3.7.0.src/docs/CMakeLists.txt
|
||||
--- llvm-3.7.0.src.orig/docs/CMakeLists.txt 2015-08-18 18:48:44.000000000 +0200
|
||||
+++ llvm-3.7.0.src/docs/CMakeLists.txt 2015-10-12 14:40:00.985384589 +0200
|
||||
@@ -115,7 +115,7 @@
|
||||
endif()
|
||||
|
||||
list(FIND LLVM_BINDINGS_LIST ocaml uses_ocaml)
|
||||
-if( NOT uses_ocaml LESS 0 )
|
||||
+if( NOT uses_ocaml LESS 0 AND LLVM_BUILD_DOCS )
|
||||
set(doc_targets
|
||||
ocaml_llvm
|
||||
ocaml_llvm_all_backends
|
||||
@@ -1,43 +0,0 @@
|
||||
--- llvm-3.7.0rc3.src-orig/cmake/modules/AddOCaml.cmake 2015-06-08 05:22:22.000000000 +1000
|
||||
+++ llvm-3.7.0rc3.src/cmake/modules/AddOCaml.cmake 2015-08-30 19:22:37.216580808 +1000
|
||||
@@ -131,7 +131,7 @@
|
||||
if( APPLE )
|
||||
set(ocaml_rpath "@executable_path/../../lib")
|
||||
elseif( UNIX )
|
||||
- set(ocaml_rpath "\\$ORIGIN/../../lib")
|
||||
+ set(ocaml_rpath "\\$ORIGIN/../../${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
|
||||
|
||||
@@ -183,12 +183,12 @@
|
||||
endforeach()
|
||||
|
||||
install(FILES ${install_files}
|
||||
- DESTINATION lib/ocaml)
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm)
|
||||
install(FILES ${install_shlibs}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
- DESTINATION lib/ocaml)
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm)
|
||||
|
||||
foreach( install_file ${install_files} ${install_shlibs} )
|
||||
get_filename_component(filename "${install_file}" NAME)
|
||||
--- llvm-3.7.0rc3.src-orig/bindings/ocaml/backends/CMakeLists.txt 2014-12-30 14:24:07.000000000 +1100
|
||||
+++ llvm-3.7.0rc3.src/bindings/ocaml/backends/CMakeLists.txt 2015-08-30 19:23:49.726583886 +1000
|
||||
@@ -23,5 +23,5 @@
|
||||
"${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}")
|
||||
|
||||
install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}"
|
||||
- DESTINATION lib/ocaml)
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm)
|
||||
endforeach()
|
||||
--- llvm-3.7.0rc3.src-orig/bindings/ocaml/llvm/CMakeLists.txt 2014-12-30 14:24:07.000000000 +1100
|
||||
+++ llvm-3.7.0rc3.src/bindings/ocaml/llvm/CMakeLists.txt 2015-08-30 19:23:43.561583624 +1000
|
||||
@@ -8,4 +8,4 @@
|
||||
"${LLVM_LIBRARY_DIR}/ocaml/META.llvm")
|
||||
|
||||
install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm"
|
||||
- DESTINATION lib/ocaml)
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm)
|
||||
@@ -1,14 +0,0 @@
|
||||
--- a/CMakeLists.txt 2015-08-12 20:04:55.397881480 +0200
|
||||
+++ b/CMakeLists.txt 2015-08-12 20:05:06.625741113 +0200
|
||||
@@ -152,11 +152,6 @@
|
||||
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
|
||||
|
||||
-if (CMAKE_BUILD_TYPE AND
|
||||
- NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
|
||||
- message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
|
||||
-endif()
|
||||
-
|
||||
set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
|
||||
|
||||
# They are used as destination of target generators.
|
||||
@@ -143,18 +143,18 @@ src_unpack() {
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch
|
||||
epatch "${FILESDIR}"/${PN}-3.5-gcc-4.9.patch
|
||||
epatch "${FILESDIR}"/${PN}-3.5-gentoo-install.patch
|
||||
epatch "${FILESDIR}"/3.6.2/nodoctargz.patch
|
||||
epatch "${FILESDIR}"/3.6.2/gcc-4.9.patch
|
||||
epatch "${FILESDIR}"/3.5.2/gentoo-install.patch
|
||||
|
||||
epatch "${FILESDIR}"/${P}-fix_LLVMExports_cmake.patch
|
||||
epatch "${FILESDIR}"/3.5.0/fix_LLVMExports_cmake.patch
|
||||
|
||||
if use clang; then
|
||||
# Automatically select active system GCC's libraries, bugs #406163 and #417913
|
||||
epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
|
||||
epatch "${FILESDIR}"/3.8.1/clang/gentoo-runtime-gcc-detection-v3.patch
|
||||
|
||||
epatch "${FILESDIR}"/clang-3.5-gentoo-install.patch
|
||||
epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch
|
||||
epatch "${FILESDIR}"/3.5.2/clang/gentoo-install.patch
|
||||
epatch "${FILESDIR}"/3.8.1/clang/darwin_prefix-include-paths.patch
|
||||
eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp
|
||||
fi
|
||||
|
||||
|
||||
@@ -144,19 +144,19 @@ src_unpack() {
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch
|
||||
epatch "${FILESDIR}"/${PN}-3.5-gcc-4.9.patch
|
||||
epatch "${FILESDIR}"/${PN}-3.5-gentoo-install.patch
|
||||
epatch "${FILESDIR}"/${P}-gcc-5.1.patch
|
||||
epatch "${FILESDIR}"/3.6.2/nodoctargz.patch
|
||||
epatch "${FILESDIR}"/3.6.2/gcc-4.9.patch
|
||||
epatch "${FILESDIR}"/3.5.2/gentoo-install.patch
|
||||
epatch "${FILESDIR}"/3.5.2/gcc-5.1.patch
|
||||
# Make ocaml warnings non-fatal, bug #537308
|
||||
sed -e "/RUN/s/-warn-error A//" -i test/Bindings/Ocaml/*ml || die
|
||||
|
||||
if use clang; then
|
||||
# Automatically select active system GCC's libraries, bugs #406163 and #417913
|
||||
epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
|
||||
epatch "${FILESDIR}"/3.8.1/clang/gentoo-runtime-gcc-detection-v3.patch
|
||||
|
||||
epatch "${FILESDIR}"/clang-3.5-gentoo-install.patch
|
||||
epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch
|
||||
epatch "${FILESDIR}"/3.5.2/clang/gentoo-install.patch
|
||||
epatch "${FILESDIR}"/3.8.1/clang/darwin_prefix-include-paths.patch
|
||||
eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp
|
||||
fi
|
||||
|
||||
|
||||
@@ -148,23 +148,23 @@ src_unpack() {
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-3.2-nodoctargz.patch
|
||||
epatch "${FILESDIR}"/${PN}-3.5-gcc-4.9.patch
|
||||
epatch "${FILESDIR}"/${PN}-3.6-gentoo-install.patch
|
||||
epatch "${FILESDIR}"/${PN}-3.6.0-ocaml-ctypes-0.4.0.patch
|
||||
epatch "${FILESDIR}"/3.6.2/nodoctargz.patch
|
||||
epatch "${FILESDIR}"/3.6.2/gcc-4.9.patch
|
||||
epatch "${FILESDIR}"/3.6.2/gentoo-install.patch
|
||||
epatch "${FILESDIR}"/3.6.2/ocaml-ctypes-0.4.0.patch
|
||||
# Make ocaml warnings non-fatal, bug #537308
|
||||
sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die
|
||||
|
||||
if use clang; then
|
||||
# Automatically select active system GCC's libraries, bugs #406163 and #417913
|
||||
epatch "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
|
||||
epatch "${FILESDIR}"/3.8.1/clang/gentoo-runtime-gcc-detection-v3.patch
|
||||
|
||||
epatch "${FILESDIR}"/clang-3.6-gentoo-install.patch
|
||||
epatch "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch
|
||||
epatch "${FILESDIR}"/3.7.1/clang/gentoo-install.patch
|
||||
epatch "${FILESDIR}"/3.8.1/clang/darwin_prefix-include-paths.patch
|
||||
eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp
|
||||
|
||||
# Fix build fails with using gcc-4.9 on Gentoo/FreeBSD, bug #548444
|
||||
epatch "${FILESDIR}"/clang-3.6-fbsd-gcc49.patch
|
||||
epatch "${FILESDIR}"/3.6.2/clang/fbsd-gcc49.patch
|
||||
fi
|
||||
|
||||
if use prefix && use clang; then
|
||||
|
||||
@@ -141,21 +141,21 @@ src_prepare() {
|
||||
# Make ocaml warnings non-fatal, bug #537308
|
||||
sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die
|
||||
# Fix libdir for ocaml bindings install, bug #559134
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-multilib.patch
|
||||
eapply "${FILESDIR}"/9999/0001-cmake-Install-OCaml-modules-into-correct-package-loc.patch
|
||||
# Do not build/install ocaml docs with USE=-doc, bug #562008
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-build_doc.patch
|
||||
eapply "${FILESDIR}"/9999/0002-cmake-Make-OCaml-docs-dependent-on-LLVM_BUILD_DOCS.patch
|
||||
|
||||
# Make it possible to override Sphinx HTML install dirs
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23780
|
||||
eapply "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
|
||||
eapply "${FILESDIR}"/9999/0003-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
|
||||
|
||||
# Prevent race conditions with parallel Sphinx runs
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23781
|
||||
eapply "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
|
||||
eapply "${FILESDIR}"/9999/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
|
||||
|
||||
# Prevent installing libgtest
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=18341
|
||||
eapply "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch
|
||||
eapply "${FILESDIR}"/9999/0005-cmake-Do-not-install-libgtest.patch
|
||||
|
||||
# Fix llvm-config for shared linking, sane flags and return values
|
||||
# in order:
|
||||
@@ -165,49 +165,49 @@ src_prepare() {
|
||||
# - backported r260343 that fixes cross-compilation
|
||||
# combination of backported upstream r252532 with our patch
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=565358
|
||||
eapply "${FILESDIR}"/llvm-3.7.1-llvm-config-0.patch
|
||||
eapply "${FILESDIR}"/llvm-3.7.1-llvm-config-1.patch
|
||||
eapply "${FILESDIR}"/llvm-3.7.1-llvm-config-2.patch
|
||||
eapply "${FILESDIR}"/llvm-3.7.1-llvm-config-3.patch
|
||||
eapply "${FILESDIR}"/3.7.1/llvm-config-0.patch
|
||||
eapply "${FILESDIR}"/3.7.1/llvm-config-1.patch
|
||||
eapply "${FILESDIR}"/3.7.1/llvm-config-2.patch
|
||||
eapply "${FILESDIR}"/3.7.1/llvm-config-3.patch
|
||||
|
||||
# Fix msan with newer kernels, #569894
|
||||
eapply "${FILESDIR}"/llvm-3.7-msan-fix.patch
|
||||
eapply "${FILESDIR}"/3.7.1/msan-fix.patch
|
||||
|
||||
# disable use of SDK on OSX, bug #568758
|
||||
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
|
||||
|
||||
if use clang; then
|
||||
# Automatically select active system GCC's libraries, bugs #406163 and #417913
|
||||
eapply "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/gentoo-runtime-gcc-detection-v3.patch
|
||||
|
||||
# Support gcc4.9 search paths
|
||||
# https://github.com/llvm-mirror/clang/commit/af4db76e059c1a3
|
||||
eapply "${FILESDIR}"/clang-3.8-gcc4.9-search-path.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/gcc4.9-search-path.patch
|
||||
|
||||
eapply "${FILESDIR}"/clang-3.6-gentoo-install.patch
|
||||
eapply "${FILESDIR}"/3.7.1/clang/gentoo-install.patch
|
||||
|
||||
eapply "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/darwin_prefix-include-paths.patch
|
||||
eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp
|
||||
|
||||
# Fix -isystem support in ccc-analyzer
|
||||
eapply "${FILESDIR}"/clang-3.7.1-ccc-analyzer-isystem.patch
|
||||
eapply "${FILESDIR}"/3.7.1/clang/ccc-analyzer-isystem.patch
|
||||
|
||||
sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
|
||||
tools/clang/tools/scan-build/scan-build || die
|
||||
|
||||
# Install clang runtime into /usr/lib/clang
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23792
|
||||
eapply "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix.patch
|
||||
eapply "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
|
||||
eapply "${FILESDIR}"/3.7.1/clang/0001-Install-clang-runtime-into-usr-lib-without-suffix.patch
|
||||
eapply "${FILESDIR}"/3.8.1/compiler-rt/0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
|
||||
|
||||
# Do not force -march flags on arm platforms
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=562706
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.7.0-compiler_rt_arm_march_flags.patch
|
||||
eapply "${FILESDIR}"/3.7.1/compiler-rt/arm_march_flags.patch
|
||||
|
||||
# Make it possible to override CLANG_LIBDIR_SUFFIX
|
||||
# (that is used only to find LLVMgold.so)
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23793
|
||||
eapply "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
|
||||
|
||||
# Fix git-clang-format shebang, bug #562688
|
||||
python_fix_shebang tools/clang/tools/clang-format/git-clang-format
|
||||
@@ -215,7 +215,7 @@ src_prepare() {
|
||||
pushd projects/compiler-rt >/dev/null || die
|
||||
|
||||
# Fix msan with newer kernels, compiler-rt part, #569894
|
||||
eapply "${FILESDIR}"/compiler-rt-3.7-msan-fix.patch
|
||||
eapply "${FILESDIR}"/3.7.1/compiler-rt/msan-fix.patch
|
||||
|
||||
# Fix WX sections, bug #421527
|
||||
find lib/builtins -type f -name '*.S' -exec sed \
|
||||
@@ -232,13 +232,13 @@ src_prepare() {
|
||||
-i tools/lldb/scripts/Python/modules/CMakeLists.txt || die
|
||||
|
||||
# Fix Python paths, bugs #562436 and #562438
|
||||
eapply "${FILESDIR}"/${PN}-3.7-lldb_python.patch
|
||||
eapply "${FILESDIR}"/3.7.1/lldb/python.patch
|
||||
sed -e "s/GENTOO_LIBDIR/$(get_libdir)/" \
|
||||
-i tools/lldb/scripts/Python/finishSwigPythonLLDB.py || die
|
||||
|
||||
# Fix build with ncurses[tinfo], #560474
|
||||
# http://llvm.org/viewvc/llvm-project?view=revision&revision=247842
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.7.0-lldb_tinfo.patch
|
||||
eapply "${FILESDIR}"/3.7.1/lldb/tinfo.patch
|
||||
fi
|
||||
|
||||
# User patches
|
||||
|
||||
@@ -142,32 +142,32 @@ src_prepare() {
|
||||
# Make ocaml warnings non-fatal, bug #537308
|
||||
sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die
|
||||
# Fix libdir for ocaml bindings install, bug #559134
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-multilib.patch
|
||||
eapply "${FILESDIR}"/9999/0001-cmake-Install-OCaml-modules-into-correct-package-loc.patch
|
||||
# Do not build/install ocaml docs with USE=-doc, bug #562008
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-build_doc.patch
|
||||
eapply "${FILESDIR}"/9999/0002-cmake-Make-OCaml-docs-dependent-on-LLVM_BUILD_DOCS.patch
|
||||
|
||||
# Make it possible to override Sphinx HTML install dirs
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23780
|
||||
eapply "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
|
||||
eapply "${FILESDIR}"/9999/0003-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
|
||||
|
||||
# Prevent race conditions with parallel Sphinx runs
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23781
|
||||
eapply "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
|
||||
eapply "${FILESDIR}"/9999/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
|
||||
|
||||
# Prevent installing libgtest
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=18341
|
||||
eapply "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch
|
||||
eapply "${FILESDIR}"/9999/0005-cmake-Do-not-install-libgtest.patch
|
||||
|
||||
# Allow custom cmake build types (like 'Gentoo')
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.8-allow_custom_cmake_build_types.patch
|
||||
eapply "${FILESDIR}"/9999/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch
|
||||
|
||||
# Fix llvm-config for shared linking and sane flags
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=565358
|
||||
eapply "${FILESDIR}"/llvm-3.8-llvm-config.patch
|
||||
eapply "${FILESDIR}"/3.8.1/llvm-config.patch
|
||||
|
||||
# Restore SOVERSIONs for shared libraries
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=578392
|
||||
eapply "${FILESDIR}"/llvm-3.8-soversion.patch
|
||||
eapply "${FILESDIR}"/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch
|
||||
|
||||
# disable use of SDK on OSX, bug #568758
|
||||
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
|
||||
@@ -177,13 +177,13 @@ src_prepare() {
|
||||
|
||||
if use clang; then
|
||||
# Automatically select active system GCC's libraries, bugs #406163 and #417913
|
||||
eapply "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/gentoo-runtime-gcc-detection-v3.patch
|
||||
|
||||
# Support gcc4.9 search paths
|
||||
# https://github.com/llvm-mirror/clang/commit/af4db76e059c1a3
|
||||
eapply "${FILESDIR}"/clang-3.8-gcc4.9-search-path.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/gcc4.9-search-path.patch
|
||||
|
||||
eapply "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/darwin_prefix-include-paths.patch
|
||||
eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp
|
||||
|
||||
sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
|
||||
@@ -191,24 +191,24 @@ src_prepare() {
|
||||
|
||||
# Install clang runtime into /usr/lib/clang
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23792
|
||||
eapply "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch
|
||||
eapply "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/0001-Install-clang-runtime-into-usr-lib-without-suffix.patch
|
||||
eapply "${FILESDIR}"/3.8.1/compiler-rt/0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
|
||||
|
||||
# Do not force -march flags on arm platforms
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=562706
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.8.0-compiler_rt_arm_march_flags.patch
|
||||
eapply "${FILESDIR}"/3.8.1/compiler-rt/arm_march_flags.patch
|
||||
|
||||
# Make it possible to override CLANG_LIBDIR_SUFFIX
|
||||
# (that is used only to find LLVMgold.so)
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23793
|
||||
eapply "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
|
||||
|
||||
# Fix git-clang-format shebang, bug #562688
|
||||
python_fix_shebang tools/clang/tools/clang-format/git-clang-format
|
||||
|
||||
# Fix 'stdarg.h' file not found on Gentoo/FreeBSD, bug #578064
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=26651
|
||||
eapply "${FILESDIR}"/clang-3.8-compiler-rt-fbsd.patch
|
||||
eapply "${FILESDIR}"/3.8.1/compiler-rt/fbsd.patch
|
||||
|
||||
pushd projects/compiler-rt >/dev/null || die
|
||||
|
||||
@@ -226,7 +226,7 @@ src_prepare() {
|
||||
sed -e 's/add_subdirectory(readline)/#&/' \
|
||||
-i tools/lldb/scripts/Python/modules/CMakeLists.txt || die
|
||||
# Do not install bundled six module
|
||||
eapply "${FILESDIR}"/${PN}-3.8-lldb_six.patch
|
||||
eapply "${FILESDIR}"/3.8.1/lldb/six.patch
|
||||
fi
|
||||
|
||||
# User patches
|
||||
|
||||
@@ -143,38 +143,38 @@ src_prepare() {
|
||||
# Make ocaml warnings non-fatal, bug #537308
|
||||
sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die
|
||||
# Fix libdir for ocaml bindings install, bug #559134
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-multilib.patch
|
||||
eapply "${FILESDIR}"/9999/0001-cmake-Install-OCaml-modules-into-correct-package-loc.patch
|
||||
# Do not build/install ocaml docs with USE=-doc, bug #562008
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-build_doc.patch
|
||||
eapply "${FILESDIR}"/9999/0002-cmake-Make-OCaml-docs-dependent-on-LLVM_BUILD_DOCS.patch
|
||||
|
||||
# Make it possible to override Sphinx HTML install dirs
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23780
|
||||
eapply "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
|
||||
eapply "${FILESDIR}"/9999/0003-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
|
||||
|
||||
# Prevent race conditions with parallel Sphinx runs
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23781
|
||||
eapply "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
|
||||
eapply "${FILESDIR}"/9999/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
|
||||
|
||||
# Prevent installing libgtest
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=18341
|
||||
eapply "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch
|
||||
eapply "${FILESDIR}"/9999/0005-cmake-Do-not-install-libgtest.patch
|
||||
|
||||
# Allow custom cmake build types (like 'Gentoo')
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.8-allow_custom_cmake_build_types.patch
|
||||
eapply "${FILESDIR}"/9999/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch
|
||||
|
||||
# Fix llvm-config for shared linking and sane flags
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=565358
|
||||
eapply "${FILESDIR}"/llvm-3.8-llvm-config-r1.patch
|
||||
eapply "${FILESDIR}"/3.8.1/llvm-config-r1.patch
|
||||
|
||||
# Restore SOVERSIONs for shared libraries
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=578392
|
||||
eapply "${FILESDIR}"/llvm-3.8-soversion.patch
|
||||
eapply "${FILESDIR}"/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch
|
||||
|
||||
# support building llvm against musl-libc
|
||||
use elibc_musl && eapply "${FILESDIR}"/llvm-3.8-musl-fixes.patch
|
||||
use elibc_musl && eapply "${FILESDIR}"/9999/musl-fixes.patch
|
||||
|
||||
# support "musl" as a valid environment type in llvm
|
||||
eapply "${FILESDIR}"/llvm-3.8-musl-support.patch
|
||||
eapply "${FILESDIR}"/3.8.1/musl-env-support.patch
|
||||
|
||||
# disable use of SDK on OSX, bug #568758
|
||||
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
|
||||
@@ -184,21 +184,21 @@ src_prepare() {
|
||||
|
||||
if use clang; then
|
||||
# Automatically select active system GCC's libraries, bugs #406163 and #417913
|
||||
eapply "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/gentoo-runtime-gcc-detection-v3.patch
|
||||
|
||||
# Support gcc4.9 search paths
|
||||
# https://github.com/llvm-mirror/clang/commit/af4db76e059c1a3
|
||||
eapply "${FILESDIR}"/clang-3.8-gcc4.9-search-path.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/gcc4.9-search-path.patch
|
||||
|
||||
eapply "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/darwin_prefix-include-paths.patch
|
||||
eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp
|
||||
|
||||
pushd "${S}"/tools/clang >/dev/null || die
|
||||
# be able to specify default values for -stdlib and -rtlib at build time
|
||||
eapply "${FILESDIR}"/clang-3.8-default-libs.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/default-libs.patch
|
||||
|
||||
# enable clang to recognize musl-libc
|
||||
eapply "${FILESDIR}"/clang-3.8-musl-support.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/musl-support.patch
|
||||
popd >/dev/null || die
|
||||
|
||||
sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
|
||||
@@ -206,28 +206,28 @@ src_prepare() {
|
||||
|
||||
# Install clang runtime into /usr/lib/clang
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23792
|
||||
eapply "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch
|
||||
eapply "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/0001-Install-clang-runtime-into-usr-lib-without-suffix.patch
|
||||
eapply "${FILESDIR}"/3.8.1/compiler-rt/0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
|
||||
|
||||
# Do not force -march flags on arm platforms
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=562706
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.8.0-compiler_rt_arm_march_flags.patch
|
||||
eapply "${FILESDIR}"/3.8.1/compiler-rt/arm_march_flags.patch
|
||||
|
||||
# Make it possible to override CLANG_LIBDIR_SUFFIX
|
||||
# (that is used only to find LLVMgold.so)
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23793
|
||||
eapply "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
|
||||
|
||||
# Fix git-clang-format shebang, bug #562688
|
||||
python_fix_shebang tools/clang/tools/clang-format/git-clang-format
|
||||
|
||||
# Fix 'stdarg.h' file not found on Gentoo/FreeBSD, bug #578064
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=26651
|
||||
eapply "${FILESDIR}"/clang-3.8-compiler-rt-fbsd.patch
|
||||
eapply "${FILESDIR}"/3.8.1/compiler-rt/fbsd.patch
|
||||
|
||||
# Backport abi-tag support, bug #571600
|
||||
eapply "${FILESDIR}"/clang-3.8-abi-tag-support-sema.patch
|
||||
eapply "${FILESDIR}"/clang-3.8-abi-tag-support-mangler.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/abi-tag-support-sema.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/abi-tag-support-mangler.patch
|
||||
|
||||
pushd projects/compiler-rt >/dev/null || die
|
||||
|
||||
@@ -245,7 +245,7 @@ src_prepare() {
|
||||
sed -e 's/add_subdirectory(readline)/#&/' \
|
||||
-i tools/lldb/scripts/Python/modules/CMakeLists.txt || die
|
||||
# Do not install bundled six module
|
||||
eapply "${FILESDIR}"/${PN}-3.8-lldb_six.patch
|
||||
eapply "${FILESDIR}"/3.8.1/lldb/six.patch
|
||||
fi
|
||||
|
||||
# User patches
|
||||
|
||||
@@ -142,32 +142,32 @@ src_prepare() {
|
||||
# Make ocaml warnings non-fatal, bug #537308
|
||||
sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die
|
||||
# Fix libdir for ocaml bindings install, bug #559134
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-multilib.patch
|
||||
eapply "${FILESDIR}"/9999/0001-cmake-Install-OCaml-modules-into-correct-package-loc.patch
|
||||
# Do not build/install ocaml docs with USE=-doc, bug #562008
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-build_doc.patch
|
||||
eapply "${FILESDIR}"/9999/0002-cmake-Make-OCaml-docs-dependent-on-LLVM_BUILD_DOCS.patch
|
||||
|
||||
# Make it possible to override Sphinx HTML install dirs
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23780
|
||||
eapply "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
|
||||
eapply "${FILESDIR}"/9999/0003-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
|
||||
|
||||
# Prevent race conditions with parallel Sphinx runs
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23781
|
||||
eapply "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
|
||||
eapply "${FILESDIR}"/9999/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
|
||||
|
||||
# Prevent installing libgtest
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=18341
|
||||
eapply "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch
|
||||
eapply "${FILESDIR}"/9999/0005-cmake-Do-not-install-libgtest.patch
|
||||
|
||||
# Allow custom cmake build types (like 'Gentoo')
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.8-allow_custom_cmake_build_types.patch
|
||||
eapply "${FILESDIR}"/9999/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch
|
||||
|
||||
# Fix llvm-config for shared linking and sane flags
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=565358
|
||||
eapply "${FILESDIR}"/llvm-3.8-llvm-config.patch
|
||||
eapply "${FILESDIR}"/3.8.1/llvm-config.patch
|
||||
|
||||
# Restore SOVERSIONs for shared libraries
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=578392
|
||||
eapply "${FILESDIR}"/llvm-3.8-soversion.patch
|
||||
eapply "${FILESDIR}"/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch
|
||||
|
||||
# disable use of SDK on OSX, bug #568758
|
||||
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
|
||||
@@ -177,13 +177,13 @@ src_prepare() {
|
||||
|
||||
if use clang; then
|
||||
# Automatically select active system GCC's libraries, bugs #406163 and #417913
|
||||
eapply "${FILESDIR}"/clang-3.5-gentoo-runtime-gcc-detection-v3.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/gentoo-runtime-gcc-detection-v3.patch
|
||||
|
||||
# Support gcc4.9 search paths
|
||||
# https://github.com/llvm-mirror/clang/commit/af4db76e059c1a3
|
||||
eapply "${FILESDIR}"/clang-3.8-gcc4.9-search-path.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/gcc4.9-search-path.patch
|
||||
|
||||
eapply "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/darwin_prefix-include-paths.patch
|
||||
eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp
|
||||
|
||||
sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
|
||||
@@ -191,24 +191,24 @@ src_prepare() {
|
||||
|
||||
# Install clang runtime into /usr/lib/clang
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23792
|
||||
eapply "${FILESDIR}"/cmake/clang-0001-Install-clang-runtime-into-usr-lib-without-suffix-3.8.patch
|
||||
eapply "${FILESDIR}"/cmake/compiler-rt-0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/0001-Install-clang-runtime-into-usr-lib-without-suffix.patch
|
||||
eapply "${FILESDIR}"/3.8.1/compiler-rt/0001-cmake-Install-compiler-rt-into-usr-lib-without-suffi.patch
|
||||
|
||||
# Do not force -march flags on arm platforms
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=562706
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.8.0-compiler_rt_arm_march_flags.patch
|
||||
eapply "${FILESDIR}"/3.8.1/compiler-rt/arm_march_flags.patch
|
||||
|
||||
# Make it possible to override CLANG_LIBDIR_SUFFIX
|
||||
# (that is used only to find LLVMgold.so)
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23793
|
||||
eapply "${FILESDIR}"/cmake/clang-0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
|
||||
eapply "${FILESDIR}"/3.8.1/clang/0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch
|
||||
|
||||
# Fix git-clang-format shebang, bug #562688
|
||||
python_fix_shebang tools/clang/tools/clang-format/git-clang-format
|
||||
|
||||
# Fix 'stdarg.h' file not found on Gentoo/FreeBSD, bug #578064
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=26651
|
||||
eapply "${FILESDIR}"/clang-3.8-compiler-rt-fbsd.patch
|
||||
eapply "${FILESDIR}"/3.8.1/compiler-rt/fbsd.patch
|
||||
|
||||
pushd projects/compiler-rt >/dev/null || die
|
||||
|
||||
@@ -226,7 +226,7 @@ src_prepare() {
|
||||
sed -e 's/add_subdirectory(readline)/#&/' \
|
||||
-i tools/lldb/scripts/Python/modules/CMakeLists.txt || die
|
||||
# Do not install bundled six module
|
||||
eapply "${FILESDIR}"/${PN}-3.8-lldb_six.patch
|
||||
eapply "${FILESDIR}"/3.8.1/lldb/six.patch
|
||||
fi
|
||||
|
||||
# User patches
|
||||
|
||||
@@ -93,32 +93,32 @@ src_prepare() {
|
||||
# Make ocaml warnings non-fatal, bug #537308
|
||||
sed -e "/RUN/s/-warn-error A//" -i test/Bindings/OCaml/*ml || die
|
||||
# Fix libdir for ocaml bindings install, bug #559134
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-multilib.patch
|
||||
eapply "${FILESDIR}"/9999/0001-cmake-Install-OCaml-modules-into-correct-package-loc.patch
|
||||
# Do not build/install ocaml docs with USE=-doc, bug #562008
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.7.0-ocaml-build_doc.patch
|
||||
eapply "${FILESDIR}"/9999/0002-cmake-Make-OCaml-docs-dependent-on-LLVM_BUILD_DOCS.patch
|
||||
|
||||
# Make it possible to override Sphinx HTML install dirs
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23780
|
||||
eapply "${FILESDIR}"/cmake/0002-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
|
||||
eapply "${FILESDIR}"/9999/0003-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch
|
||||
|
||||
# Prevent race conditions with parallel Sphinx runs
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=23781
|
||||
eapply "${FILESDIR}"/cmake/0003-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
|
||||
eapply "${FILESDIR}"/9999/0004-cmake-Add-an-ordering-dep-between-HTML-man-Sphinx-ta.patch
|
||||
|
||||
# Prevent installing libgtest
|
||||
# https://llvm.org/bugs/show_bug.cgi?id=18341
|
||||
eapply "${FILESDIR}"/cmake/0004-cmake-Do-not-install-libgtest.patch
|
||||
eapply "${FILESDIR}"/9999/0005-cmake-Do-not-install-libgtest.patch
|
||||
|
||||
# Allow custom cmake build types (like 'Gentoo')
|
||||
eapply "${FILESDIR}"/cmake/${PN}-3.8-allow_custom_cmake_build_types.patch
|
||||
eapply "${FILESDIR}"/9999/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch
|
||||
|
||||
# Fix llvm-config for shared linking and sane flags
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=565358
|
||||
eapply "${FILESDIR}"/llvm-3.9-llvm-config.patch
|
||||
eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
|
||||
|
||||
# Restore SOVERSIONs for shared libraries
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=578392
|
||||
eapply "${FILESDIR}"/llvm-3.8-soversion.patch
|
||||
eapply "${FILESDIR}"/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch
|
||||
|
||||
# Fix lit tests to find installed llvm-lit correctly
|
||||
eapply "${FILESDIR}"/9999/0009-cmake-Use-system-llvm-lit-when-lit.py-does-not-exist.patch
|
||||
@@ -126,7 +126,7 @@ src_prepare() {
|
||||
eapply "${FILESDIR}"/9999/0010-lit-setup.py-Install-as-llvm-lit-as-cmake-expects-it.patch
|
||||
|
||||
# support building llvm against musl-libc
|
||||
use elibc_musl && eapply "${FILESDIR}"/llvm-3.8-musl-fixes.patch
|
||||
use elibc_musl && eapply "${FILESDIR}"/9999/musl-fixes.patch
|
||||
|
||||
# disable use of SDK on OSX, bug #568758
|
||||
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
|
||||
|
||||
Reference in New Issue
Block a user