Accepting request 368685 from home:namtrac:branches:devel:tools:compiler

- Update to llvm 3.8.0
  * See http://llvm.org/releases/3.8.0/docs/ReleaseNotes.html and
    http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html
- Fold lldb build into llvm and disable python support
- Drop clang-disable-ada-extension.patch, libcxxabi-exceptions.patch
  and cmake-host-triple.patch
- Add revert-cmake-soname.patch to fix soname handling

OBS-URL: https://build.opensuse.org/request/show/368685
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=430
This commit is contained in:
Martin Pluskal 2016-03-09 06:32:53 +00:00 committed by Git OBS Bridge
parent e8b1875bae
commit f49d2e187c
37 changed files with 327 additions and 510 deletions

View File

@ -1,7 +1,7 @@
Index: cfe-3.7.0.src/lib/Driver/ToolChains.cpp Index: cfe-3.8.0.src/lib/Driver/ToolChains.cpp
=================================================================== ===================================================================
--- cfe-3.7.0.src.orig/lib/Driver/ToolChains.cpp --- cfe-3.8.0.src/lib/Driver/ToolChains.cpp
+++ cfe-3.7.0.src/lib/Driver/ToolChains.cpp +++ cfe-3.8.0.src/lib/Driver/ToolChains.cpp
@@ -1266,16 +1266,18 @@ bool Generic_GCC::GCCInstallationDetecto @@ -1266,16 +1266,18 @@ bool Generic_GCC::GCCInstallationDetecto
static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
static const char *const AArch64Triples[] = { static const char *const AArch64Triples[] = {

View File

@ -1,21 +1,21 @@
Index: cfe-3.7.0.src/lib/Driver/ToolChains.cpp Index: cfe-3.8.0.src/lib/Driver/ToolChains.cpp
=================================================================== ===================================================================
--- cfe-3.7.0.src/lib/Driver/ToolChains.cpp --- cfe-3.8.0.src/lib/Driver/ToolChains.cpp
+++ cfe-3.7.0.src/lib/Driver/ToolChains.cpp +++ cfe-3.8.0.src/lib/Driver/ToolChains.cpp
@@ -2794,6 +2794,7 @@ static bool IsUbuntu(enum Distro Distro) @@ -3080,6 +3080,7 @@ static bool IsUbuntu(enum Distro Distro)
} }
static Distro DetectDistro(llvm::Triple::ArchType Arch) { static Distro DetectDistro(const Driver &D, llvm::Triple::ArchType Arch) {
+ return OpenSUSE; /* +#if 0
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File = llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
llvm::MemoryBuffer::getFile("/etc/lsb-release"); llvm::MemoryBuffer::getFile("/etc/lsb-release");
if (File) { if (File) {
@@ -2861,7 +2862,7 @@ static Distro DetectDistro(llvm::Triple: @@ -3155,6 +3156,8 @@ static Distro DetectDistro(const Driver
if (llvm::sys::fs::exists("/etc/arch-release"))
return ArchLinux; return ArchLinux;
- return UnknownDistro; return UnknownDistro;
+ return UnknownDistro;*/ +#endif
+ return OpenSUSE;
} }
/// \brief Get our best guess at the multiarch triple for a target. /// \brief Get our best guess at the multiarch triple for a target.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ed740c5a91df1c90a4118c5154851d6a475f39a91346bdf268c1c29c13aa1cc
size 9147204

3
cfe-3.8.0.src.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:04149236de03cf05232d68eb7cb9c50f03062e339b68f4f8a03b650a11536cf9
size 9627228

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ae5d2629874032eebc51fc4c169a2b684c3d653a3bb39b86e98297d42496f9e9
size 642056

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9097443437dc7394e1b5bf09ebdd1a740734f2974d408a8ff136bcfcfd81b4b5
size 661952

View File

@ -1,13 +0,0 @@
Index: cfe-3.7.0.src/lib/Driver/Types.cpp
===================================================================
--- cfe-3.7.0.src/lib/Driver/Types.cpp
+++ cfe-3.7.0.src/lib/Driver/Types.cpp
@@ -158,8 +158,6 @@ types::ID types::lookupTypeForExtension(
.Case("hh", TY_CXXHeader)
.Case("ll", TY_LLVM_IR)
.Case("hpp", TY_CXXHeader)
- .Case("ads", TY_Ada)
- .Case("adb", TY_Ada)
.Case("ast", TY_AST)
.Case("c++", TY_CXX)
.Case("C++", TY_CXX)

View File

@ -1,7 +1,7 @@
Index: cfe-3.7.0.src/lib/Driver/Driver.cpp Index: cfe-3.8.0.src/lib/Driver/Driver.cpp
=================================================================== ===================================================================
--- cfe-3.7.0.src/lib/Driver/Driver.cpp --- cfe-3.8.0.src/lib/Driver/Driver.cpp
+++ cfe-3.7.0.src/lib/Driver/Driver.cpp +++ cfe-3.8.0.src/lib/Driver/Driver.cpp
@@ -64,7 +64,7 @@ Driver::Driver(StringRef ClangExecutable @@ -64,7 +64,7 @@ Driver::Driver(StringRef ClangExecutable
// Compute the path to the resource directory. // Compute the path to the resource directory.

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:afbda810106a6e64444bc164b921be928af46829117c95b996f2678ce4cb1ec4
size 334072

View File

@ -1,33 +0,0 @@
Index: llvm-3.3/cmake/modules/GetHostTriple.cmake
===================================================================
--- llvm-3.3.orig/cmake/modules/GetHostTriple.cmake
+++ llvm-3.3/cmake/modules/GetHostTriple.cmake
@@ -15,15 +15,19 @@ function( get_host_triple var )
set( value "i686-pc-mingw32" )
endif()
else( MSVC )
- set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess)
- execute_process(COMMAND sh ${config_guess}
- RESULT_VARIABLE TT_RV
- OUTPUT_VARIABLE TT_OUT
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if( NOT TT_RV EQUAL 0 )
- message(FATAL_ERROR "Failed to execute ${config_guess}")
- endif( NOT TT_RV EQUAL 0 )
- set( value ${TT_OUT} )
+ if( NOT LLVM_HOST_TRIPLE )
+ set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess)
+ execute_process(COMMAND sh ${config_guess}
+ RESULT_VARIABLE TT_RV
+ OUTPUT_VARIABLE TT_OUT
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if( NOT TT_RV EQUAL 0 )
+ message(FATAL_ERROR "Failed to execute ${config_guess}")
+ endif( NOT TT_RV EQUAL 0 )
+ set( value ${TT_OUT} )
+ else( LLVM_HOST_TRIPLE )
+ set( value ${LLVM_HOST_TRIPLE} )
+ endif( NOT LLVM_HOST_TRIPLE )
endif( MSVC )
set( ${var} ${value} PARENT_SCOPE )
message(STATUS "Target triple: ${value}")

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:227fa998520bc94974a428dc8e7654d9bdf277e5bc70d4064ebc05691bd62b0b
size 1192832

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c8d3387e55f229543dac1941769120f24dc50183150bf19d1b070d53d29d56b0
size 1270128

View File

@ -1,7 +1,7 @@
Index: cfe-3.7.0.src/lib/Driver/Tools.cpp Index: cfe-3.8.0.src/lib/Driver/Tools.cpp
=================================================================== ===================================================================
--- cfe-3.7.0.src/lib/Driver/Tools.cpp --- cfe-3.8.0.src/lib/Driver/Tools.cpp
+++ cfe-3.7.0.src/lib/Driver/Tools.cpp +++ cfe-3.8.0.src/lib/Driver/Tools.cpp
@@ -1322,8 +1322,8 @@ static const char *getX86TargetCPU(const @@ -1322,8 +1322,8 @@ static const char *getX86TargetCPU(const
case llvm::Triple::Bitrig: case llvm::Triple::Bitrig:
return "i686"; return "i686";

View File

@ -1,20 +1,7 @@
Index: libcxx-3.7.0.src/test/std/depr/depr.c.headers/math_h.pass.cpp Index: libcxx-3.8.0.src/test/std/numerics/c.math/cmath_isinf.pass.cpp
=================================================================== ===================================================================
--- libcxx-3.7.0.src.orig/test/std/depr/depr.c.headers/math_h.pass.cpp --- libcxx-3.8.0.src.orig/test/std/numerics/c.math/cmath_isinf.pass.cpp
+++ libcxx-3.7.0.src/test/std/depr/depr.c.headers/math_h.pass.cpp +++ libcxx-3.8.0.src/test/std/numerics/c.math/cmath_isinf.pass.cpp
@@ -9,8 +9,6 @@
// <math.h>
-// XFAIL: linux
-
#include <math.h>
#include <type_traits>
#include <cassert>
Index: libcxx-3.7.0.src/test/std/numerics/c.math/cmath_isinf.pass.cpp
===================================================================
--- libcxx-3.7.0.src.orig/test/std/numerics/c.math/cmath_isinf.pass.cpp
+++ libcxx-3.7.0.src/test/std/numerics/c.math/cmath_isinf.pass.cpp
@@ -11,8 +11,6 @@ @@ -11,8 +11,6 @@
// isinf // isinf
@ -31,10 +18,10 @@ Index: libcxx-3.7.0.src/test/std/numerics/c.math/cmath_isinf.pass.cpp
-} -}
\ No newline at end of file \ No newline at end of file
+} +}
Index: libcxx-3.7.0.src/test/std/numerics/c.math/cmath_isnan.pass.cpp Index: libcxx-3.8.0.src/test/std/numerics/c.math/cmath_isnan.pass.cpp
=================================================================== ===================================================================
--- libcxx-3.7.0.src.orig/test/std/numerics/c.math/cmath_isnan.pass.cpp --- libcxx-3.8.0.src.orig/test/std/numerics/c.math/cmath_isnan.pass.cpp
+++ libcxx-3.7.0.src/test/std/numerics/c.math/cmath_isnan.pass.cpp +++ libcxx-3.8.0.src/test/std/numerics/c.math/cmath_isnan.pass.cpp
@@ -11,8 +11,6 @@ @@ -11,8 +11,6 @@
// isnan // isnan
@ -44,3 +31,16 @@ Index: libcxx-3.7.0.src/test/std/numerics/c.math/cmath_isnan.pass.cpp
#include <cmath> #include <cmath>
#include <type_traits> #include <type_traits>
#include <cassert> #include <cassert>
Index: libcxx-3.8.0.src/test/std/depr/depr.c.headers/math_h_isinf.pass.cpp
===================================================================
--- libcxx-3.8.0.src.orig/test/std/depr/depr.c.headers/math_h_isinf.pass.cpp
+++ libcxx-3.8.0.src/test/std/depr/depr.c.headers/math_h_isinf.pass.cpp
@@ -11,8 +11,6 @@
// isinf
-// XFAIL: linux
-
#include <math.h>
#include <type_traits>
#include <cassert>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c18f3c8333cd7e678c1424a57fe5e25efe740ca7caf62ac67152b4723f3ad08e
size 994580

3
libcxx-3.8.0.src.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:36804511b940bc8a7cefc7cb391a6b28f5e3f53f6372965642020db91174237b
size 1062884

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:48b074fd334958b2d8bab893c897a0c8258328782cdec2d229c7bce432b49beb
size 507428

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c5ee0871aff6ec741380c4899007a7d97f0b791c81df69d25b744eebc5cee504
size 508900

View File

@ -1,13 +0,0 @@
Index: libcxxabi-3.7.0.src/src/CMakeLists.txt
===================================================================
--- libcxxabi-3.7.0.src/src/CMakeLists.txt
+++ libcxxabi-3.7.0.src/src/CMakeLists.txt
@@ -52,7 +52,7 @@ append_if(libraries LIBCXXABI_HAS_PTHREA
if (LIBCXXABI_USE_LLVM_UNWINDER)
list(APPEND libraries unwind)
else()
- append_if(libraries LIBCXXABI_HAS_GCC_EH_LIB gcc_eh)
+ append_if(libraries LIBCXXABI_HAS_GCC_EH_LIB gcc_s)
endif()
# Setup flags.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f4d7505bc111044eaa4033af012221e492938405b62522b8e3e354c20c4b71e9
size 10649660

3
lldb-3.8.0.src.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e3f68f44147df0433e7989bf6ed1c58ff28d7c68b9c47553cb9915f744785a35
size 10929768

View File

@ -1,7 +1,7 @@
Index: lldb-3.7.0.src/source/lldb.cpp Index: lldb-3.8.0.src/source/lldb.cpp
=================================================================== ===================================================================
--- lldb-3.7.0.src.orig/source/lldb.cpp --- lldb-3.8.0.src.orig/source/lldb.cpp
+++ lldb-3.7.0.src/source/lldb.cpp +++ lldb-3.8.0.src/source/lldb.cpp
@@ -21,11 +21,7 @@ extern "C" const unsigned char liblldb_c @@ -21,11 +21,7 @@ extern "C" const unsigned char liblldb_c
static const char * static const char *
GetLLDBRevision() GetLLDBRevision()
@ -14,27 +14,18 @@ Index: lldb-3.7.0.src/source/lldb.cpp
} }
static const char * static const char *
Index: lldb-3.7.0.src/source/Core/IOHandler.cpp Index: lldb-3.8.0.src/source/Core/IOHandler.cpp
=================================================================== ===================================================================
--- lldb-3.7.0.src.orig/source/Core/IOHandler.cpp --- lldb-3.8.0.src.orig/source/Core/IOHandler.cpp
+++ lldb-3.7.0.src/source/Core/IOHandler.cpp +++ lldb-3.8.0.src/source/Core/IOHandler.cpp
@@ -29,8 +29,8 @@ @@ -9,8 +9,8 @@
#include "lldb/Target/ThreadPlan.h"
// C Includes
#ifndef LLDB_DISABLE_CURSES #ifndef LLDB_DISABLE_CURSES
-#include <ncurses.h> -#include <curses.h>
-#include <panel.h> -#include <panel.h>
+#include <ncurses/ncurses.h> +#include <ncurses/curses.h>
+#include <ncurses/panel.h> +#include <ncurses/panel.h>
#endif #endif
using namespace lldb; // C++ Includes
Index: lldb-3.7.0.src/source/Host/CMakeLists.txt
===================================================================
--- lldb-3.7.0.src.orig/source/Host/CMakeLists.txt
+++ lldb-3.7.0.src/source/Host/CMakeLists.txt
@@ -134,3 +134,4 @@ else()
endif()
add_lldb_library(lldbHost ${HOST_SOURCES})
+target_link_libraries(lldbHost dl pthread)

View File

@ -1,43 +0,0 @@
-------------------------------------------------------------------
Wed Sep 2 08:23:08 UTC 2015 - idonmez@suse.com
- Update to version 3.7.0
* No changelog upstream
- Refresh lldb-cmake.patch
-------------------------------------------------------------------
Mon Jun 22 09:45:33 UTC 2015 - idonmez@suse.com
- Update lldb-cmake.patch to fix compilation on Factory
-------------------------------------------------------------------
Mon May 25 13:59:56 UTC 2015 - idonmez@suse.com
- Update to version 3.6.1
* No changelog upstream
-------------------------------------------------------------------
Mon Mar 2 10:14:22 UTC 2015 - idonmez@suse.com
- Update to version 3.6.0
* No changelog upstream
- Merge lldb-underlink.patch into lldb-cmake.patch
- Swich to static library build, shared build is not supported
-------------------------------------------------------------------
Wed Sep 17 13:26:34 UTC 2014 - idonmez@suse.com
- Add BuildRequires on ncurses-devel
-------------------------------------------------------------------
Sat Sep 6 14:59:58 UTC 2014 - idonmez@suse.com
- Update to version 3.5.0
* No changelog upstream
- Add lldb-underlink.patch to link to LLVMSupport
-------------------------------------------------------------------
Mon Mar 17 09:02:51 UTC 2014 - idonmez@suse.com
- First release on build.opensuse.org

127
lldb.spec
View File

@ -1,127 +0,0 @@
#
# spec file for package lldb
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _revision 246586
Name: lldb
Version: 3.7.0
Release: 0
Summary: The LLDB Debugger
License: NCSA
Group: Development/Languages
Url: http://lldb.llvm.org/
Source: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
Patch1: lldb-cmake.patch
BuildRequires: cmake
BuildRequires: libedit-devel
BuildRequires: llvm-clang-devel = %{version}
BuildRequires: llvm-devel = %{version}
BuildRequires: ncurses-devel
BuildRequires: ninja
BuildRequires: python-devel
BuildRequires: swig
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: libLLVM = %{version}
Requires: libclang = %{version}
Requires: python-base
ExclusiveArch: %arm x86_64
%define py_major $(python -c "import sys; print sys.version_info[0];")
%define py_minor $(python -c "import sys; print sys.version_info[1];")
%description
LLDB is a next generation, high-performance debugger. It is built as a set
of reusable components which highly leverage existing libraries in the
larger LLVM Project, such as the Clang expression parser and LLVM
disassembler.
%package devel
Summary: Next generation high-performance debugger (devel package)
Group: Development/Languages
Requires: libedit-devel
Requires: lldb = %{version}
Requires: zlib-devel
%description devel
LLDB is a next generation, high-performance debugger. It is built as a set
of reusable components which highly leverage existing libraries in the
larger LLVM Project, such as the Clang expression parser and LLVM
disassembler.
%prep
%setup -q -n %{name}-%{version}.src
%patch1 -p1
sed -i s,LLDB_REVISION,\"%{_revision}\",g source/lldb.cpp
%build
mkdir build
pushd build
cmake -DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_BUILD_TYPE=Release \
%if "%{_lib}" == "lib64"
-DLLVM_LIBDIR_SUFFIX=64 \
%endif
-DLLDB_PATH_TO_LLVM_BUILD=%{_prefix} \
-DLLDB_PATH_TO_CLANG_BUILD=%{_prefix} \
-DLLVM_RUNTIME_OUTPUT_INTDIR=$PWD/bin \
-DLLVM_LIBRARY_OUTPUT_INTDIR=$PWD/%{_lib} \
-DPYTHON_VERSION_MAJOR=%{py_major} \
-DPYTHON_VERSION_MINOR=%{py_minor} \
-G "Ninja" \
..
ninja
%install
pushd build
DESTDIR=%{buildroot} ninja install
# Fix the lldb.so link
rm %{buildroot}%{py_sitedir}/lldb/_lldb.so
ln -sf %{_libdir}/liblldb.so.%{version} %{buildroot}%{py_sitedir}/lldb/_lldb.so
# Fix the lib link
rm %{buildroot}%{py_sitedir}/lib
ln -sf %{libdir} %{buildroot}%{py_sitedir}/lib
rm %{buildroot}%{_libdir}/liblldb*.a
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%{_libdir}/liblldb.so.*
%{_bindir}/argdumper
%{_bindir}/lldb*
%{py_sitedir}/readline.so
%{py_sitedir}/lib
%{py_sitedir}/lldb
%files devel
%defattr(-,root,root,-)
%{_includedir}/lldb
%{_libdir}/liblldb.so
%changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ab45895f9dcdad1e140a3a79fd709f64b05ad7364e308c0e582c5b02e9cc3153
size 14636252

3
llvm-3.8.0.src.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:555b028e9ee0f6445ff8f949ea10e9cd8be0d084840e21fbbe1d31d51fc06e46
size 16580932

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:047afe2d5162ee96a3eb15cf3ff965d3ef2e615895c29049c0d772c59a302fdf
size 1570796

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:465e749bb89b96e50d0a03f1b7e84f25ed81a9e325664b1c5843580adfc94248
size 1605660

View File

@ -1,7 +1,7 @@
Index: cfe-3.7.0.src/lib/Driver/ToolChains.cpp Index: cfe-3.8.0.src/lib/Driver/ToolChains.cpp
=================================================================== ===================================================================
--- cfe-3.7.0.src/lib/Driver/ToolChains.cpp --- cfe-3.8.0.src/lib/Driver/ToolChains.cpp
+++ cfe-3.7.0.src/lib/Driver/ToolChains.cpp +++ cfe-3.8.0.src/lib/Driver/ToolChains.cpp
@@ -1091,7 +1091,8 @@ Generic_GCC::GCCVersion Linux::GCCVersio @@ -1091,7 +1091,8 @@ Generic_GCC::GCCVersion Linux::GCCVersio
if (First.first.getAsInteger(10, GoodVersion.Major) || GoodVersion.Major < 0) if (First.first.getAsInteger(10, GoodVersion.Major) || GoodVersion.Major < 0)
return BadVersion; return BadVersion;

View File

@ -1,7 +1,7 @@
Index: llvm-3.7.0.src/cmake/modules/HandleLLVMOptions.cmake Index: llvm-3.8.0.src/cmake/modules/HandleLLVMOptions.cmake
=================================================================== ===================================================================
--- llvm-3.7.0.src.orig/cmake/modules/HandleLLVMOptions.cmake --- llvm-3.8.0.src.orig/cmake/modules/HandleLLVMOptions.cmake
+++ llvm-3.7.0.src/cmake/modules/HandleLLVMOptions.cmake +++ llvm-3.8.0.src/cmake/modules/HandleLLVMOptions.cmake
@@ -302,9 +302,6 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE @@ -302,9 +302,6 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE
endif() endif()
endif (LLVM_ENABLE_WARNINGS) endif (LLVM_ENABLE_WARNINGS)

View File

@ -1,11 +1,10 @@
# This line is mandatory to access the configuration functions # This line is mandatory to access the configuration functions
from Config import * from Config import *
# it is a compiler and the package provides llvm-gcc-devel, llvm-gcc-c++-devel
addFilter("devel-file-in-non-devel-package .*/clang/.*/include/.*") addFilter("devel-file-in-non-devel-package .*/clang/.*/include/.*")
addFilter("devel-file-in-non-devel-package .*/clang/.*/lib/.*") addFilter("devel-file-in-non-devel-package .*/clang/.*/lib/.*")
addFilter("devel-file-in-non-devel-package .*/usr/include/.*")
# PPC64 related hacks, remove these when we can
# build shared libs there.
addFilter("devel-file-in-non-devel-package .*/lib.*/*.a") addFilter("devel-file-in-non-devel-package .*/lib.*/*.a")
addFilter ("libclang.*shlib-policy-name-error") addFilter ("libclang.*shlib-policy-name-error")
addFilter ("libLLVM.*shlib-policy-name-error")

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Mar 8 18:52:11 UTC 2016 - idonmez@suse.com
- Update to llvm 3.8.0
* See http://llvm.org/releases/3.8.0/docs/ReleaseNotes.html and
http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html
- Fold lldb build into llvm and disable python support
- Drop clang-disable-ada-extension.patch, libcxxabi-exceptions.patch
and cmake-host-triple.patch
- Add revert-cmake-soname.patch to fix soname handling
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Mar 2 09:08:12 UTC 2016 - idonmez@suse.com Wed Mar 2 09:08:12 UTC 2016 - idonmez@suse.com

300
llvm.spec
View File

@ -16,14 +16,16 @@
# #
%define _revision 246586 %define _revision 262553
%define _release_version 3.7.0 %define _release_version 3.8.0
%define build_lldb 0
%define build_libcxx 0 %define build_libcxx 0
%define build_openmp 0 %define build_openmp 0
%ifarch x86_64 %ifarch x86_64
%define build_libcxx 1 %define build_libcxx 1
%define build_lldb 1
%endif %endif
%ifarch ppc64 ppc64le %{ix86} x86_64 %ifarch ppc64 ppc64le %{ix86} x86_64
@ -31,7 +33,7 @@
%endif %endif
Name: llvm Name: llvm
Version: 3.7.0 Version: 3.8.0
Release: 0 Release: 0
Summary: Low Level Virtual Machine Summary: Low Level Virtual Machine
License: NCSA License: NCSA
@ -47,27 +49,27 @@ Source5: http://llvm.org/releases/%{version}/openmp-%{version}.src.tar.xz
# cd docs # cd docs
# make -f Makefile.sphinx man html # make -f Makefile.sphinx man html
# cd .. # cd ..
# tar cvJf llvm-docs-3.7.0.src.tar.xz llvm-3.7.0.src/docs/_build/{man,html} # tar cvJf llvm-docs-3.8.0.src.tar.xz llvm-3.8.0.src/docs/_build/{man,html}
Source6: llvm-docs-%{version}.src.tar.xz Source6: llvm-docs-%{version}.src.tar.xz
Source7: cfe-docs-%{version}.src.tar.xz Source7: cfe-docs-%{version}.src.tar.xz
Source8: http://llvm.org/releases/%{version}/clang-tools-extra-%{version}.src.tar.xz
Source9: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
Source100: %{name}-rpmlintrc Source100: %{name}-rpmlintrc
Source101: baselibs.conf Source101: baselibs.conf
# PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision # PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision
Patch1: set-revision.patch Patch1: set-revision.patch
# PATCH-FIX-OPENSUSE assume-opensuse.patch idoenmez@suse.de -- Always enable openSUSE/SUSE features # PATCH-FIX-OPENSUSE assume-opensuse.patch idoenmez@suse.de -- Always enable openSUSE/SUSE features
Patch2: assume-opensuse.patch Patch2: assume-opensuse.patch
# PATCH-FIX-OPENSUSE clang-disable-ada-extension.patch idoenmez@suse.de -- Don't run gcc for ada files
Patch3: clang-disable-ada-extension.patch
# PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 32bit # PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 32bit
Patch4: default-to-i586.patch Patch3: default-to-i586.patch
# PATCH-FIX-OPENSUSE arm_suse_support.diff --Enable ARM suse toolchain support # PATCH-FIX-OPENSUSE arm_suse_support.diff --Enable ARM suse toolchain support
Patch6: arm_suse_support.diff Patch4: arm_suse_support.diff
Patch7: cmake-host-triple.patch Patch5: clang-resourcedirs.patch
Patch10: clang-resourcedirs.patch Patch6: llvm-remove-clang-only-flags.patch
Patch11: libcxxabi-exceptions.patch Patch7: llvm-fix-find-gcc5-install.patch
Patch13: llvm-remove-clang-only-flags.patch Patch8: revert-cmake-soname.patch
Patch15: llvm-fix-find-gcc5-install.patch Patch9: lldb-cmake.patch
Patch16: glibc-2.23-libcxx.patch Patch10: glibc-2.23-libcxx.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: binutils-devel >= 2.21.90 BuildRequires: binutils-devel >= 2.21.90
BuildRequires: bison BuildRequires: bison
@ -75,14 +77,15 @@ BuildRequires: cmake
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: flex BuildRequires: flex
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: groff BuildRequires: groff
BuildRequires: libedit-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool BuildRequires: libtool
BuildRequires: llvm-clang
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: ninja BuildRequires: ninja
BuildRequires: python-base BuildRequires: python-base
BuildRequires: python-xml BuildRequires: python-xml
Requires: libLLVM = %{version}-%{release}
# llvm does not work on ppc or s390 # llvm does not work on ppc or s390
ExcludeArch: ppc s390 ExcludeArch: ppc s390
@ -113,11 +116,6 @@ new native programs that use the LLVM infrastructure.
%package clang %package clang
Summary: CLANG frontend for LLVM Summary: CLANG frontend for LLVM
Group: Development/Languages/Other Group: Development/Languages/Other
Requires: %{name} = %{version}
Requires: binutils
Requires: gcc
Requires: libclang = %{version}-%{release}
Requires: libstdc++-devel
Provides: clang Provides: clang
%description clang %description clang
@ -157,25 +155,41 @@ Requires: python
%description -n python-clang %description -n python-clang
This package contains the Python bindings to clang (C language) frontend for LLVM. This package contains the Python bindings to clang (C language) frontend for LLVM.
%if %{build_lldb}
%package -n lldb
Summary: Next generation high-performance debugger
Group: Development/Languages
# We don't want to provide an unstable lldb-devel package now.
# Reconsider later when it has a stable API.
Provides: lldb-devel = %{version}
Obsoletes: lldb-devel < %{version}
%description -n lldb
LLDB is a next generation, high-performance debugger. It is built as a set
of reusable components which highly leverage existing libraries in the
larger LLVM Project, such as the Clang expression parser and LLVM
disassembler.
%endif
%prep %prep
%setup -q -a 1 -a 2 -a 3 -a 4 -a 5 -a 7 -b 6 -n %{name}-%{version}.src %setup -q -a 1 -a 2 -a 3 -a 4 -a 5 -a 7 -a 8 -a 9 -b 6 -n %{name}-%{version}.src
%patch1 %patch1
%patch2 %patch2
%patch3 %patch3
%patch4 %patch4
%patch6 %patch5
%patch7 -p1 %patch6 -p1
%patch10 %patch7
%patch11 %patch8 -p1
%patch13 -p1 %patch9
%patch15
%if 0%{?suse_version} > 1320 %if 0%{?suse_version} > 1320
%patch16 %patch10
%endif %endif
# Move into right place # Move into right place
mv cfe-%{version}.src tools/clang mv cfe-%{version}.src tools/clang
mv compiler-rt-%{version}.src projects/compiler-rt mv compiler-rt-%{version}.src projects/compiler-rt
mv clang-tools-extra-%{version}.src tools/clang/tools/extra
%if %{build_openmp} %if %{build_openmp}
mv openmp-%{version}.src projects/openmp mv openmp-%{version}.src projects/openmp
@ -189,6 +203,10 @@ rm projects/libcxx/test/std/localization/locale.categories/category.time/locale.
rm projects/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp rm projects/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
%endif %endif
%if %{build_lldb}
mv lldb-%{version}.src tools/lldb
%endif
# We hardcode i586 # We hardcode i586
rm tools/clang/test/Driver/x86_features.c rm tools/clang/test/Driver/x86_features.c
rm tools/clang/test/Driver/nacl-direct.c rm tools/clang/test/Driver/nacl-direct.c
@ -196,51 +214,45 @@ rm tools/clang/test/Driver/nacl-direct.c
sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
%if %{build_lldb}
sed -i s,LLDB_REVISION,\"%{_revision}\",g tools/lldb/source/lldb.cpp
%endif
# ARMv6 needs this exact host triple
%ifarch armv6hl
cat > autoconf/config.guess << EOF
#!/bin/sh
echo armv6hl-suse-linux-gnueabi
EOF
%endif
%build %build
TOPLEVEL=$PWD TOPLEVEL=$PWD
mkdir stage1 stage2 mkdir stage1 stage2
pushd stage1 pushd stage1
# Define host-triple export CC=clang
%ifarch %{ix86} export CXX=clang++
%define host_triple i586-suse-linux
%endif
%ifarch x86_64
%define host_triple x86_64-suse-linux
%endif
%ifarch armv6hl
%define host_triple armv6hl-suse-linux-gnueabi
%endif
%ifarch armv7hl
%define host_triple armv7hl-suse-linux-gnueabi
%endif
%ifarch aarch64
%define host_triple aarch64-suse-linux
%endif
%ifarch ppc64
%define host_triple powerpc64-suse-linux
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"PowerPC"',g ../cmake/modules/AddLLVM.cmake
%endif
%ifarch ppc64le
%define host_triple powerpc64le-suse-linux
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"PowerPC"',g ../cmake/modules/AddLLVM.cmake
%endif
%ifarch s390x
%define host_triple s390x-suse-linux
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"SystemZ"',g ../cmake/modules/AddLLVM.cmake
%endif
cmake -G "Ninja" \ cmake -G "Ninja" \
-DBUILD_SHARED_LIBS=OFF \ -DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_TARGETS_TO_BUILD=host \ -DLLVM_TARGETS_TO_BUILD=host \
-DCMAKE_C_FLAGS="-O0" \ -DLLDB_DISABLE_PYTHON=ON \
-DCMAKE_CXX_FLAGS="-O0" \ %ifarch armv6hl
-DLLVM_HOST_TRIPLE=%{host_triple} \ -DCMAKE_C_FLAGS="-target armv6hl-suse-linux-gnueabi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \
-DCMAKE_CXX_FLAGS="-target armv6hl-suse-linux-gnueabi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \
-DLLVM_DEFAULT_TARGET_TRIPLE=armv6-unknown-linux-gnueabihf \
%endif
%ifarch armv7hl
-DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \
-DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \
-DLLVM_DEFAULT_TARGET_TRIPLE=armv7l-unknown-linux-gnueabihf \
%endif
.. ..
ninja %{?_smp_mflags} clang ninja %{?_smp_mflags} clang -v
popd popd
pushd stage2 pushd stage2
@ -254,12 +266,11 @@ cmake -G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
%else %else
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DLLVM_HOST_TRIPLE=%{host_triple} \
%endif %endif
-DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
%ifarch armv6hl %ifarch armv6hl
-DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \ -DCMAKE_C_FLAGS="-target armv6hl-suse-linux-gnueabi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \
-DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \ -DCMAKE_CXX_FLAGS="-target armv6hl-suse-linux-gnueabi -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \
-DLLVM_DEFAULT_TARGET_TRIPLE=armv6-unknown-linux-gnueabihf \ -DLLVM_DEFAULT_TARGET_TRIPLE=armv6-unknown-linux-gnueabihf \
%endif %endif
%ifarch armv7hl %ifarch armv7hl
@ -275,18 +286,17 @@ cmake -G "Ninja" \
-DLLVM_ENABLE_ASSERTIONS=OFF \ -DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_ENABLE_PIC=ON \ -DLLVM_ENABLE_PIC=ON \
-DLLVM_BINUTILS_INCDIR=/usr/include \ -DLLVM_BINUTILS_INCDIR=/usr/include \
%if %{build_openmp}
-DCLANG_DEFAULT_OPENMP_RUNTIME=libomp \
%endif
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
-DLLVM_TARGETS_TO_BUILD="all" \ -DLLVM_TARGETS_TO_BUILD="all" \
%else %else
-DLLVM_TARGETS_TO_BUILD=host \ -DLLVM_TARGETS_TO_BUILD=host \
%endif %endif
-DLLVM_INCLUDE_TESTS=OFF \ %if %{build_lldb}
-DLLDB_DISABLE_PYTHON=ON \
%endif
.. ..
ninja %{?_smp_mflags} ninja %{?_smp_mflags} -v
%check %check
cd stage2 cd stage2
@ -294,54 +304,11 @@ cd stage2
%if 0%{!?qemu_user_space_build:1} %if 0%{!?qemu_user_space_build:1}
# we just do not have enough memory with qemu emulation # we just do not have enough memory with qemu emulation
# Rebuild to enable tests, if we enable
# at first time gtest junk ends up in installed
# cmake files
rm CMakeCache.txt
cmake -G "Ninja" \
-DBUILD_SHARED_LIBS=ON \
%ifarch %arm ppc64 ppc64le
-DCMAKE_BUILD_TYPE=Release \
%else
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DLLVM_HOST_TRIPLE=%{host_triple} \
%endif
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
%ifarch armv6hl
-DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \
-DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp" \
-DLLVM_DEFAULT_TARGET_TRIPLE=armv6-unknown-linux-gnueabihf \
%endif
%ifarch armv7hl
-DCMAKE_C_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \
-DCMAKE_CXX_FLAGS="-mfloat-abi=hard -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16" \
-DLLVM_DEFAULT_TARGET_TRIPLE=armv7l-unknown-linux-gnueabihf \
%endif
%if "%{_lib}" == "lib64"
-DLLVM_LIBDIR_SUFFIX=64 \
%endif
-DLLVM_REQUIRES_RTTI=ON \
-DLLVM_ENABLE_TIMESTAMPS=OFF \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_ENABLE_PIC=ON \
-DLLVM_BINUTILS_INCDIR=/usr/include \
%if %{build_openmp}
-DCLANG_DEFAULT_OPENMP_RUNTIME=libomp \
%endif
%ifarch %{ix86} x86_64
-DLLVM_TARGETS_TO_BUILD="all" \
%else
-DLLVM_TARGETS_TO_BUILD=host \
%endif
-DLLVM_INCLUDE_TESTS=ON \
-DLLVM_BUILD_TESTS=ON \
..
ninja %{?_smp_mflags}
ninja check ninja check
ninja clang-test ninja clang-test
%if %{build_libcxx} %if %{build_libcxx}
ninja check-libcxx ninja check-libcxx
ninja check-libcxxabi ninja check-libcxxabi
%endif %endif
@ -356,7 +323,7 @@ cd ..
# Build man/html pages # Build man/html pages
cd docs cd docs
# Docs are prebuilt due to sphinx dependency -- cartman # Docs are prebuilt due to sphinx dependency
#make -f Makefile.sphinx html man #make -f Makefile.sphinx html man
rm -rf %{buildroot}/usr/docs rm -rf %{buildroot}/usr/docs
@ -371,28 +338,6 @@ cp -r _build/man/* %{buildroot}/usr/share/man/man1
cp -r _build/html/* %{buildroot}%{_docdir}/llvm-clang/html cp -r _build/html/* %{buildroot}%{_docdir}/llvm-clang/html
cd ../../.. cd ../../..
# install scan-build et al
install -d %{buildroot}%{_datadir}/clang
install -d %{buildroot}%{py_sitedir}
pushd tools/clang/tools
for file in scan-build/ccc-analyzer scan-build/scan-build \
scan-view/scan-view; do
install $file %{buildroot}%{_bindir}
done
for file in scan-build/scanview.css scan-build/sorttable.js; do
install -m 644 $file %{buildroot}%{_datadir}/clang/
done
for file in scan-view/Reporter.py scan-view/ScanView.py \
scan-view/startfile.py; do
install -m 644 $file %{buildroot}%{py_sitedir}
done
install -d %{buildroot}%{py_sitedir}/Resources/
for file in scan-view/Resources/*; do
install -m 644 $file %{buildroot}%{py_sitedir}/Resources/
done
popd
# install python bindings # install python bindings
install -d %{buildroot}%{py_sitedir}/clang install -d %{buildroot}%{py_sitedir}/clang
pushd tools/clang/bindings/python pushd tools/clang/bindings/python
@ -402,50 +347,31 @@ cp -r examples %{buildroot}%{_docdir}/python-clang
install -d %{buildroot}%{_docdir}/python-clang/tests/cindex/INPUTS install -d %{buildroot}%{_docdir}/python-clang/tests/cindex/INPUTS
cp -r tests %{buildroot}%{_docdir}/python-clang cp -r tests %{buildroot}%{_docdir}/python-clang
popd popd
pushd %{buildroot}%{_bindir}
ln -s ccc-analyzer c++-analyzer
popd
mkdir -p %{buildroot}%{_libdir}/bfd-plugins mkdir -p %{buildroot}%{_libdir}/bfd-plugins
ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/ ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/
sed -i 's,RealBin/bin/clang,RealBin/clang,' \
%{buildroot}%{_bindir}/scan-build
sed -i 's,RealBin/bin/ccc-analyzer,RealBin/ccc-analyzer,' \
%{buildroot}%{_bindir}/scan-build
sed -i 's,RealBin/bin/ccc-analyzer,RealBin/ccc-analyzer,' \
%{buildroot}%{_bindir}/scan-build
sed -i 's,$RealBin/sorttable.js,%{_datadir}/clang/sorttable.js,' \
%{buildroot}%{_bindir}/scan-build
sed -i 's,$RealBin/scanview.css,%{_datadir}/clang/scanview.css,' \
%{buildroot}%{_bindir}/scan-build
sed -i 's,RealBin/bin,RealBin,' \
%{buildroot}%{_bindir}/scan-build
install -m 755 -d %{buildroot}%{_datadir}/vim/site/ install -m 755 -d %{buildroot}%{_datadir}/vim/site/
for i in ftdetect ftplugin indent syntax; do for i in ftdetect ftplugin indent syntax; do
cp -r utils/vim/$i %{buildroot}%{_datadir}/vim/site/ cp -r utils/vim/$i %{buildroot}%{_datadir}/vim/site/
done done
mv utils/vim/README utils/vim/README.vim mv utils/vim/README utils/vim/README.vim
mv %{buildroot}%{_prefix}/libexec/{c++,ccc}-analyzer %{buildroot}%{_bindir}
chmod -x %{buildroot}%{_mandir}/man1/scan-build.1
# Stuff we don't want to include # Stuff we don't want to include
rm %{buildroot}%{_mandir}/man1/lit.1 rm %{buildroot}%{_mandir}/man1/lit.1
%if %{build_openmp} %if %{build_openmp}
rm -f %{buildroot}%{_libdir}/libgomp.so rm %{buildroot}%{_libdir}/libgomp.so
rm %{buildroot}%{_libdir}/libiomp*.so
%endif %endif
%if %{build_libcxx} %if %{build_lldb}
# Create an libc++.so as an ldscript rm %{buildroot}%{_libdir}/liblldb*.a
rm %{buildroot}%{_libdir}/libc++.so rm %{buildroot}%{_libdir}/liblldb.so
cat > %{buildroot}%{_libdir}/libc++.so <<EOF rm -r %{buildroot}%{_includedir}/lldb
GROUP ( %{_libdir}/libc++.so.1 %{_libdir}/libc++abi.so )
EOF
%endif %endif
%fdupes -s %{buildroot}%{_docdir}/%{name} %fdupes -s %{buildroot}%{_docdir}/%{name}
@ -468,14 +394,14 @@ EOF
%{_bindir}/bugpoint %{_bindir}/bugpoint
%{_bindir}/llc %{_bindir}/llc
%{_bindir}/lli %{_bindir}/lli
%{_bindir}/macho-dump %exclude %{_bindir}/llvm-config
%exclude %{_bindir}/%{name}-config %{_bindir}/llvm*
%{_bindir}/%{name}*
%{_bindir}/obj2yaml %{_bindir}/obj2yaml
%{_bindir}/opt %{_bindir}/opt
%{_bindir}/sancov
%{_bindir}/verify-uselistorder %{_bindir}/verify-uselistorder
%{_bindir}/yaml2obj %{_bindir}/yaml2obj
%exclude %{_mandir}/man1/%{name}-config.1%{ext_man} %exclude %{_mandir}/man1/llvm-config.1%{ext_man}
%{_mandir}/man1/bugpoint.1%{ext_man} %{_mandir}/man1/bugpoint.1%{ext_man}
%{_mandir}/man1/tblgen.1%{ext_man} %{_mandir}/man1/tblgen.1%{ext_man}
%{_mandir}/man1/llc.1%{ext_man} %{_mandir}/man1/llc.1%{ext_man}
@ -490,25 +416,25 @@ EOF
%files clang %files clang
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/c-index-test
%{_bindir}/c++-analyzer
%{_bindir}/ccc-analyzer
%{_bindir}/clang %{_bindir}/clang
%{_bindir}/clang-* %{_bindir}/clang-*
%{_bindir}/clang++ %{_bindir}/clang++
%{_bindir}/clang-format %{_bindir}/clang-format
%{_bindir}/ccc-analyzer
%{_bindir}/c++-analyzer
%{_bindir}/git-clang-format %{_bindir}/git-clang-format
%{_bindir}/modularize
%{_bindir}/scan-build %{_bindir}/scan-build
%{_bindir}/scan-view %{_bindir}/scan-view
%{py_sitedir}/ScanView.py
%{py_sitedir}/Reporter.py
%{py_sitedir}/startfile.py
%{py_sitedir}/Resources
%{_datadir}/clang %{_datadir}/clang
%{_datadir}/scan-build
%{_datadir}/scan-view
%{_mandir}/man1/clang.1%{ext_man} %{_mandir}/man1/clang.1%{ext_man}
%{_mandir}/man1/scan-build.1%{ext_man}
%{_libdir}/libLTO.* %{_libdir}/libLTO.*
%if %{build_openmp} %if %{build_openmp}
%{_libdir}/libomp.so %{_libdir}/libomp.so
%{_libdir}/libiomp5.so
%endif %endif
%if %{build_libcxx} %if %{build_libcxx}
%{_libdir}/libc++* %{_libdir}/libc++*
@ -534,16 +460,16 @@ EOF
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_bindir}/%{name}-config %{_bindir}/llvm-config
%{_libdir}/libLLVM*.so %{_libdir}/libLLVM*.so
%{_libdir}/BugpointPasses.* %{_libdir}/BugpointPasses.*
%{_libdir}/LLVMHello.* %{_libdir}/LLVMHello.*
%doc %{_mandir}/man1/%{name}-config.1%{ext_man} %doc %{_mandir}/man1/llvm-config.1%{ext_man}
%{_includedir}/%{name}/ %{_includedir}/llvm/
%{_includedir}/%{name}-c/ %{_includedir}/llvm-c/
%dir %{_datadir}/%{name} %dir %{_datadir}/llvm
%{_datadir}/%{name}/cmake/ %{_datadir}/llvm/cmake/
%doc %{_docdir}/%{name} %doc %{_docdir}/llvm
%files vim-plugins %files vim-plugins
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -556,7 +482,13 @@ EOF
%{py_sitedir}/clang/__init__.py %{py_sitedir}/clang/__init__.py
%{py_sitedir}/clang/cindex.py %{py_sitedir}/clang/cindex.py
%{py_sitedir}/clang/enumerations.py %{py_sitedir}/clang/enumerations.py
%doc %{_docdir}/python-clang %doc %{_docdir}/python-clang
%if %{build_lldb}
%files -n lldb
%defattr(-,root,root,-)
%{_libdir}/liblldb.so.*
%{_bindir}/lldb*
%endif
%changelog %changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8d8a224e5689596a35652fda87e4be29853c4b85fbc7a6562019badfad779f2a
size 2251108

3
openmp-3.8.0.src.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:92510e3f62e3de955e3a0b6708cebee1ca344d92fb02369cba5fdd5c68f773a0
size 2233144

110
revert-cmake-soname.patch Normal file
View File

@ -0,0 +1,110 @@
Index: llvm-3.8.0.src/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm-3.8.0.src.orig/cmake/modules/AddLLVM.cmake
+++ llvm-3.8.0.src/cmake/modules/AddLLVM.cmake
@@ -326,12 +326,10 @@ endfunction(set_windows_version_resource
# Same semantics as target_link_libraries().
# ADDITIONAL_HEADERS
# May specify header files for IDE generators.
-# SONAME
-# Should set SONAME link flags and create symlinks
# )
function(llvm_add_library name)
cmake_parse_arguments(ARG
- "MODULE;SHARED;STATIC;OBJECT;DISABLE_LLVM_LINK_LLVM_DYLIB;SONAME"
+ "MODULE;SHARED;STATIC;OBJECT;DISABLE_LLVM_LINK_LLVM_DYLIB"
"OUTPUT_NAME"
"ADDITIONAL_HEADERS;DEPENDS;LINK_COMPONENTS;LINK_LIBS;OBJLIBS"
${ARGN})
@@ -436,6 +434,11 @@ function(llvm_add_library name)
PREFIX ""
)
endif()
+
+ set_target_properties(${name}
+ PROPERTIES
+ SOVERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}
+ VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX})
endif()
if(ARG_MODULE OR ARG_SHARED)
@@ -450,24 +453,6 @@ function(llvm_add_library name)
endif()
endif()
- if(ARG_SHARED AND UNIX)
- if(NOT APPLE AND ARG_SONAME)
- get_target_property(output_name ${name} OUTPUT_NAME)
- if(${output_name} STREQUAL "output_name-NOTFOUND")
- set(output_name ${name})
- endif()
- set(library_name ${output_name}-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX})
- set(api_name ${output_name}-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX})
- set_target_properties(${name} PROPERTIES OUTPUT_NAME ${library_name})
- llvm_install_library_symlink(${api_name} ${library_name} SHARED
- COMPONENT ${name}
- ALWAYS_GENERATE)
- llvm_install_library_symlink(${output_name} ${library_name} SHARED
- COMPONENT ${name}
- ALWAYS_GENERATE)
- endif()
- endif()
-
if (DEFINED LLVM_LINK_COMPONENTS OR DEFINED ARG_LINK_COMPONENTS)
if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB)
set(llvm_libs LLVM)
@@ -1073,41 +1058,6 @@ function(add_lit_testsuites project dire
endif()
endfunction()
-function(llvm_install_library_symlink name dest type)
- cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
- foreach(path ${CMAKE_MODULE_PATH})
- if(EXISTS ${path}/LLVMInstallSymlink.cmake)
- set(INSTALL_SYMLINK ${path}/LLVMInstallSymlink.cmake)
- break()
- endif()
- endforeach()
-
- set(component ${ARG_COMPONENT})
- if(NOT component)
- set(component ${name})
- endif()
-
- set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
- set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
-
- set(output_dir lib${LLVM_LIBDIR_SUFFIX})
- if(WIN32 AND "${type}" STREQUAL "SHARED")
- set(output_dir bin)
- endif()
-
- install(SCRIPT ${INSTALL_SYMLINK}
- CODE "install_symlink(${full_name} ${full_dest} ${output_dir})"
- COMPONENT ${component})
-
- if (NOT CMAKE_CONFIGURATION_TYPES AND NOT ARG_ALWAYS_GENERATE)
- add_custom_target(install-${name}
- DEPENDS ${name} ${dest} install-${dest}
- COMMAND "${CMAKE_COMMAND}"
- -DCMAKE_INSTALL_COMPONENT=${name}
- -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
- endif()
-endfunction()
-
function(llvm_install_symlink name dest)
cmake_parse_arguments(ARG "ALWAYS_GENERATE" "" "" ${ARGN})
foreach(path ${CMAKE_MODULE_PATH})
Index: llvm-3.8.0.src/tools/llvm-shlib/CMakeLists.txt
===================================================================
--- llvm-3.8.0.src.orig/tools/llvm-shlib/CMakeLists.txt
+++ llvm-3.8.0.src/tools/llvm-shlib/CMakeLists.txt
@@ -38,7 +38,7 @@ if(LLVM_DYLIB_EXPORTED_SYMBOL_FILE)
add_custom_target(libLLVMExports DEPENDS ${LLVM_EXPORTED_SYMBOL_FILE})
endif()
-add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
+add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB ${SOURCES})
list(REMOVE_DUPLICATES LIB_NAMES)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") # FIXME: It should be "GNU ld for elf"

View File

@ -1,7 +1,7 @@
Index: cfe-3.7.0.src/lib/Basic/Version.cpp Index: cfe-3.8.0.src/lib/Basic/Version.cpp
=================================================================== ===================================================================
--- cfe-3.7.0.src/lib/Basic/Version.cpp --- cfe-3.8.0.src/lib/Basic/Version.cpp
+++ cfe-3.7.0.src/lib/Basic/Version.cpp +++ cfe-3.8.0.src/lib/Basic/Version.cpp
@@ -66,19 +66,11 @@ std::string getLLVMRepositoryPath() { @@ -66,19 +66,11 @@ std::string getLLVMRepositoryPath() {
} }