diff --git a/sys-devel/llvm/llvm-4.0.0.recipe b/sys-devel/llvm/llvm-4.0.1.recipe similarity index 94% rename from sys-devel/llvm/llvm-4.0.0.recipe rename to sys-devel/llvm/llvm-4.0.1.recipe index 72d8a3ecf..c346e3263 100644 --- a/sys-devel/llvm/llvm-4.0.0.recipe +++ b/sys-devel/llvm/llvm-4.0.1.recipe @@ -31,15 +31,15 @@ other than the ones listed above. HOMEPAGE="http://www.llvm.org/" COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign" LICENSE="UIUC" -REVISION="2" +REVISION="1" SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.xz" SOURCE_URI_2="http://llvm.org/releases/${portVersion}/cfe-${portVersion}.src.tar.xz" SOURCE_URI_3="http://llvm.org/releases/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz" SOURCE_URI_4="http://llvm.org/releases/${portVersion}/compiler-rt-${portVersion}.src.tar.xz" -CHECKSUM_SHA256="8d10511df96e73b8ff9e7abbfb4d4d432edbdbe965f1f4f07afaf370b8a533be" -CHECKSUM_SHA256_2="cea5f88ebddb30e296ca89130c83b9d46c2d833685e2912303c828054c4dc98a" -CHECKSUM_SHA256_3="41b7d37eb128fd362ab3431be5244cf50325bb3bb153895735c5bacede647c99" -CHECKSUM_SHA256_4="d3f25b23bef24c305137e6b44f7e81c51bbec764c119e01512a9bd2330be3115" +CHECKSUM_SHA256="da783db1f82d516791179fe103c71706046561f7972b18f0049242dee6712b51" +CHECKSUM_SHA256_2="61738a735852c23c3bdbe52d035488cdb2083013f384d67c1ba36fabebd8769b" +CHECKSUM_SHA256_3="35d1e64efc108076acbe7392566a52c35df9ec19778eb9eb12245fc7d8b915b6" +CHECKSUM_SHA256_4="a3c87794334887b93b7a766c507244a7cdcce1d48b2e9249fc9a94f2c3beb440" SOURCE_DIR="llvm-${portVersion}.src" SOURCE_DIR_2="cfe-${portVersion}.src" SOURCE_DIR_3="clang-tools-extra-${portVersion}.src" @@ -47,7 +47,7 @@ SOURCE_DIR_4="compiler-rt-${portVersion}.src" PATCHES="llvm-${portVersion}.patchset" PATCHES_2="clang-${portVersion}.patchset" -ARCHITECTURES="!x86_gcc2 x86 x86_64" +ARCHITECTURES="!x86_gcc2 ?x86 x86_64" SECONDARY_ARCHITECTURES="?x86" PROVIDES=" @@ -101,9 +101,11 @@ PROVIDES=" cmd:yaml2obj lib:BugpointPasses$secondaryArchSuffix lib:LLVMHello$secondaryArchSuffix - lib:libLTO$secondaryArchSuffix devel:libfindAllSymbols$secondaryArchSuffix + devel:libLLVM_$portVersion$secondaryArchSuffix + devel:libLLVM_4.0$secondaryArchSuffix + devel:libLLVM$secondaryArchSuffix devel:libLLVMAArch64AsmParser$secondaryArchSuffix devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix devel:libLLVMAArch64CodeGen$secondaryArchSuffix @@ -238,6 +240,7 @@ PROVIDES=" " REQUIRES=" haiku$secondaryArchSuffix + lib:libLLVM_4.0$secondaryArchSuffix lib:libz$secondaryArchSuffix " PROVIDES_clang=" @@ -312,6 +315,7 @@ PROVIDES_clang=" " REQUIRES_clang=" haiku$secondaryArchSuffix + lib:libLLVM_4.0$secondaryArchSuffix lib:libz$secondaryArchSuffix " PROVIDES_clang_analysis=" @@ -325,6 +329,16 @@ REQUIRES_clang_analysis=" llvm${secondaryArchSuffix}_clang == $portVersion base cmd:python " +PROVIDES_libs=" + llvm${secondaryArchSuffix}_libs = $portVersion + lib:libLLVM_4.0$secondaryArchSuffix + lib:libLTO$secondaryArchSuffix +" +REQUIRES_libs=" + haiku$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libz$secondaryArchSuffix @@ -366,6 +380,7 @@ BUILD() cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$prefix \ -DCMAKE_SKIP_RPATH=YES $cmakeFlags \ -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_THREADS=NO \ + -DLLVM_LINK_LLVM_DYLIB=YES \ .. make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \ PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir @@ -423,6 +438,7 @@ INSTALL() $includeDir/clang* \ $libDir/libclang* \ $libDir/clang \ + $libDir/cmake/clang \ $developLibDir/libclang* # analysis package @@ -434,6 +450,11 @@ INSTALL() $dataDir/scan-build \ $dataDir/scan-view \ $manDir/man1/scan-build.1 + + # libs package + packageEntries libs \ + $libDir/libLLVM* \ + $libDir/libLTO* } TEST() diff --git a/sys-devel/llvm/patches/clang-4.0.0.patchset b/sys-devel/llvm/patches/clang-4.0.1.patchset similarity index 91% rename from sys-devel/llvm/patches/clang-4.0.0.patchset rename to sys-devel/llvm/patches/clang-4.0.1.patchset index 5cd153485..8f4f2dce0 100644 --- a/sys-devel/llvm/patches/clang-4.0.0.patchset +++ b/sys-devel/llvm/patches/clang-4.0.1.patchset @@ -1,22 +1,13 @@ -From 6c7bd2f1da283aebc727f51fb8f1b8438d12e611 Mon Sep 17 00:00:00 2001 +From 61c5cccbbe786e6b3b6ca581232c28c4eaeaea98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 18 Jul 2016 14:13:19 +0200 -Subject: [PATCH] support for secondary arch. +Subject: support for secondary arch. add a test for haiku driver. * upstream wants a case for libcxx in ToolChains.cpp, so add it. Enable thread-local storage and disable PIE by default ---- - CMakeLists.txt | 4 ++++ - lib/Basic/Targets.cpp | 2 -- - lib/Driver/ToolChains.cpp | 15 ++++++++++++++- - lib/Driver/ToolChains.h | 4 +--- - lib/Frontend/InitHeaderSearch.cpp | 25 +++++++++++++++++++++++++ - test/Driver/haiku.c | 12 ++++++++++++ - 6 files changed, 56 insertions(+), 6 deletions(-) - create mode 100644 test/Driver/haiku.c diff --git a/CMakeLists.txt b/CMakeLists.txt index ff1ff21..3739e5b 100644 @@ -34,7 +25,7 @@ index ff1ff21..3739e5b 100644 # Clang version information set(CLANG_EXECUTABLE_VERSION diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp -index 1a95ff2..f4ec19b 100644 +index 445b412..dffeddb 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -420,8 +420,6 @@ public: diff --git a/sys-devel/llvm/patches/llvm-4.0.0.patchset b/sys-devel/llvm/patches/llvm-4.0.1.patchset similarity index 63% rename from sys-devel/llvm/patches/llvm-4.0.0.patchset rename to sys-devel/llvm/patches/llvm-4.0.1.patchset index 08ed69f86..7191b5f89 100644 --- a/sys-devel/llvm/patches/llvm-4.0.0.patchset +++ b/sys-devel/llvm/patches/llvm-4.0.1.patchset @@ -1,12 +1,9 @@ -From dd13b8d2fc9971fab0d35ae24939726f4316aa50 Mon Sep 17 00:00:00 2001 +From b08432486912bafc8e058577cb90271b2117eff1 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Wed, 20 Jan 2016 21:13:28 +0000 -Subject: [PATCH] llvm-config: use /develop/headers instead of /include +Subject: llvm-config: use /develop/headers instead of /include * don't provide obj-root and src-root. ---- - tools/llvm-config/llvm-config.cpp | 21 ++++++++++++++++----- - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp index 25344e4..11901bf 100644 @@ -50,5 +47,28 @@ index 25344e4..11901bf 100644 LinkDyLib = false; LinkMode = BuiltSharedLibs ? LinkModeShared : LinkModeAuto; -- -2.11.0 +2.12.2 + + +From 4c58933420077f3520c2a9348ad560eddcd676a7 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Tue, 4 Jul 2017 20:41:17 +0200 +Subject: --whole-archive also on Haiku for GNU ld. + + +diff --git a/tools/llvm-shlib/CMakeLists.txt b/tools/llvm-shlib/CMakeLists.txt +index edadb82..f96b016 100644 +--- a/tools/llvm-shlib/CMakeLists.txt ++++ b/tools/llvm-shlib/CMakeLists.txt +@@ -37,7 +37,7 @@ endif() + add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES}) + + list(REMOVE_DUPLICATES LIB_NAMES) +-if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR MINGW) # FIXME: It should be "GNU ld for elf" ++if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR MINGW OR HAIKU) # FIXME: It should be "GNU ld for elf" + # GNU ld doesn't resolve symbols in the version script. + set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive) + elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") +-- +2.12.2