Accepting request 396684 from home:Ronis_BR:branches:devel:tools:compiler
- Build LLDB separated from LLVM. - Re-enable python bindings for the LLDB API. OBS-URL: https://build.opensuse.org/request/show/396684 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=456
This commit is contained in:
committed by
Git OBS Bridge
parent
dc64dfcf7a
commit
3d39b878d7
3822
D15067.id41365.diff
Normal file
3822
D15067.id41365.diff
Normal file
File diff suppressed because it is too large
Load Diff
20
lldb-add-pthread-dl-libs.patch
Normal file
20
lldb-add-pthread-dl-libs.patch
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
Index: lldb-3.8.0.src/cmake/modules/LLDBConfig.cmake
|
||||||
|
===================================================================
|
||||||
|
--- lldb-3.8.0.src.orig/cmake/modules/LLDBConfig.cmake
|
||||||
|
+++ lldb-3.8.0.src/cmake/modules/LLDBConfig.cmake
|
||||||
|
@@ -323,13 +323,9 @@ else()
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-if (HAVE_LIBPTHREAD)
|
||||||
|
- list(APPEND system_libs pthread)
|
||||||
|
-endif(HAVE_LIBPTHREAD)
|
||||||
|
+list(APPEND system_libs pthread)
|
||||||
|
|
||||||
|
-if (HAVE_LIBDL)
|
||||||
|
- list(APPEND system_libs ${CMAKE_DL_LIBS})
|
||||||
|
-endif()
|
||||||
|
+list(APPEND system_libs ${CMAKE_DL_LIBS})
|
||||||
|
|
||||||
|
if(LLDB_REQUIRES_EH)
|
||||||
|
set(LLDB_REQUIRES_RTTI ON)
|
61
lldb.changes
Normal file
61
lldb.changes
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun May 15 17:13:24 UTC 2016 - ronisbr@gmail.com
|
||||||
|
|
||||||
|
- Update to version 3.8.0
|
||||||
|
* No upstream changelog.
|
||||||
|
- Refresh `lldb-cmake.patch`.
|
||||||
|
- Add patch `D15067.id41365.diff` from upstream review system to
|
||||||
|
fix out of tree build (http://reviews.llvm.org/D15067).
|
||||||
|
- Add patch `lldb-add-pthread-dl-libs.patch` to force CMake to add
|
||||||
|
the options `-lpthread` and `-ldl` to the end of linking command.
|
||||||
|
Otherwise, LLDB linking will fail with these errors:
|
||||||
|
|
||||||
|
undefined reference to symbol 'pthread_setname_np@@GLIBC_2.12'
|
||||||
|
undefined reference to symbol 'dladdr@@GLIBC_2.2.5'
|
||||||
|
|
||||||
|
- Run spec-cleaner.
|
||||||
|
- Add `fdupes` to remove duplicated files.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
||||||
|
|
132
lldb.spec
Normal file
132
lldb.spec
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
#
|
||||||
|
# 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 262553
|
||||||
|
Name: lldb
|
||||||
|
Version: 3.8.0
|
||||||
|
Release: 0
|
||||||
|
Summary: Next generation high-performance debugger
|
||||||
|
License: NCSA
|
||||||
|
Group: Development/Languages/Other
|
||||||
|
Url: http://lldb.llvm.org
|
||||||
|
Source: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
|
||||||
|
# PATCH-FIX-OPENSUSE lldb-cmake.patch -- Let us set LLDB_REVISION and fix ncurses include path.
|
||||||
|
Patch0: lldb-cmake.patch
|
||||||
|
# PATCH-FIX-UPSTREAM D15067.id41365.diff -- Patch from upstream review system to fix out of tree build (http://reviews.llvm.org/D15067)
|
||||||
|
Patch1: D15067.id41365.diff
|
||||||
|
# PATCH-FIX-OPENSUSE lldb-add-pthread-dl-libs.patch -- Add -lpthread and -ldl options to the end of LDFLAGS to fix linking problems.
|
||||||
|
Patch2: lldb-add-pthread-dl-libs.patch
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: libedit-devel
|
||||||
|
BuildRequires: libffi-devel
|
||||||
|
BuildRequires: libxml2-devel
|
||||||
|
BuildRequires: llvm-clang-devel = %{version}
|
||||||
|
BuildRequires: llvm-devel = %{version}
|
||||||
|
BuildRequires: ncurses-devel
|
||||||
|
BuildRequires: ninja
|
||||||
|
BuildRequires: python-devel
|
||||||
|
BuildRequires: swig
|
||||||
|
BuildRequires: zlib-devel
|
||||||
|
Requires: libLLVM = %{version}
|
||||||
|
Requires: libclang = %{version}
|
||||||
|
Requires: python
|
||||||
|
Requires: python-six
|
||||||
|
ExclusiveArch: arm x86_64
|
||||||
|
|
||||||
|
%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: Development files for LLDB
|
||||||
|
Group: Development/Languages/Other
|
||||||
|
Requires: libedit-devel
|
||||||
|
Requires: lldb = %{version}
|
||||||
|
Requires: zlib-devel
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package contains the development files for LLDB.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{name}-%{version}.src
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
|
# Set LLDB revision
|
||||||
|
sed -i s,LLDB_REVISION,\"%{_revision}\",g source/lldb.cpp #"
|
||||||
|
|
||||||
|
%build
|
||||||
|
mkdir build
|
||||||
|
pushd build
|
||||||
|
|
||||||
|
cmake -DCMAKE_C_COMPILER=clang \
|
||||||
|
-DCMAKE_CXX_COMPILER=clang++ \
|
||||||
|
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
||||||
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
%if "%{_lib}" == "lib64"
|
||||||
|
-DLLVM_LIBDIR_SUFFIX=64 \
|
||||||
|
%endif
|
||||||
|
-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
|
||||||
|
|
||||||
|
# Python: fix binary libraries location.
|
||||||
|
rm %{buildroot}%{py_sitedir}/lldb/_lldb.so
|
||||||
|
liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so))
|
||||||
|
ln -vsf "../../../${liblldb}" %{buildroot}%{python_sitearch}/lldb/_lldb.so
|
||||||
|
|
||||||
|
# Remove bundled six.py.
|
||||||
|
rm -f %{buildroot}%{py_sitedir}/six.*
|
||||||
|
|
||||||
|
# Remove static libraries.
|
||||||
|
rm %{buildroot}%{_libdir}/liblldb*.a
|
||||||
|
|
||||||
|
# Fix duplicated files.
|
||||||
|
%fdupes %{_includedir}/%{name}/Host/
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{_bindir}/lldb*
|
||||||
|
%{_libdir}/liblldb.so.*
|
||||||
|
%{py_sitedir}/lldb
|
||||||
|
%{py_sitedir}/readline.so
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{_includedir}/lldb
|
||||||
|
%{_libdir}/liblldb.so
|
||||||
|
|
||||||
|
%changelog
|
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 18 13:22:17 UTC 2016 - ronisbr@gmail.com
|
||||||
|
|
||||||
|
- Build LLDB separated from LLVM.
|
||||||
|
- Re-enable python bindings for the LLDB API.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 18 11:14:38 UTC 2016 - idonmez@suse.com
|
Wed May 18 11:14:38 UTC 2016 - idonmez@suse.com
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user