Hello community, here is the log from the commit of package llvm5 for openSUSE:Factory checked in at 2018-10-11 11:58:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/llvm5 (Old) and /work/SRC/openSUSE:Factory/.llvm5.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "llvm5" Thu Oct 11 11:58:28 2018 rev:13 rq:640999 version:5.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/llvm5/llvm5.changes 2018-06-19 12:01:41.626419983 +0200 +++ /work/SRC/openSUSE:Factory/.llvm5.new/llvm5.changes 2018-10-11 11:58:28.809792525 +0200 @@ -1,0 +2,8 @@ +Tue Oct 9 10:51:41 UTC 2018 - m...@suse.com + +- llvm_build_tablegen_component_as_shared_library.patch + * Build TableGen component as its own shared library because it + is not included in the libLLVM library and is needed for ldc. + (bsc#1111190) + +------------------------------------------------------------------- New: ---- llvm_build_tablegen_component_as_shared_library.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ llvm5.spec ++++++ --- /var/tmp/diff_new_pack.l0NTUm/_old 2018-10-11 11:58:31.657788905 +0200 +++ /var/tmp/diff_new_pack.l0NTUm/_new 2018-10-11 11:58:31.657788905 +0200 @@ -1,7 +1,7 @@ # # spec file for package llvm5 # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -99,6 +99,7 @@ Patch15: opt-viewer-Do-not-require-python-2.patch Patch16: n_clang_allow_BUILD_SHARED_LIBRARY.patch Patch17: llvm-build-tests-with-rtti.patch +Patch18: llvm_build_tablegen_component_as_shared_library.patch BuildRequires: binutils-devel >= 2.21.90 BuildRequires: binutils-gold BuildRequires: cmake @@ -180,8 +181,8 @@ %package -n clang%{_sonum} Summary: CLANG frontend for LLVM -# Avoid multiple provider errors Group: Development/Languages/Other +# Avoid multiple provider errors Requires: libLTO%{_sonum} Requires: libclang%{_sonum} Recommends: clang%{_sonum}-checker @@ -201,8 +202,8 @@ %package -n clang%{_sonum}-checker Summary: Static code analyzer for CLANG -# Avoid multiple provider errors Group: Development/Languages/Other +# Avoid multiple provider errors Requires: libclang%{_sonum} # Due to a packaging error in clang3_8 we have to conflict. Conflicts: clang3_8 @@ -217,8 +218,8 @@ %package -n clang%{_sonum}-include-fixer Summary: Automatically add missing includes -# Avoid multiple provider errors Group: Development/Languages/Other +# Avoid multiple provider errors Requires: libclang%{_sonum} = %{version} Conflicts: clang-include-fixer Conflicts: find-all-symbols @@ -239,8 +240,8 @@ %package -n libclang%{_sonum} Summary: Library files needed for clang -# Avoid multiple provider errors Group: Development/Libraries/C and C++ +# Avoid multiple provider errors Requires: libLLVM%{_sonum} Requires: libstdc++-devel @@ -260,8 +261,8 @@ %package -n libLTO%{_sonum} Summary: Link-time optimizer for LLVM -# Avoid multiple provider errors Group: Development/Languages/Other +# Avoid multiple provider errors Requires: libLLVM%{_sonum} %description -n libLTO%{_sonum} @@ -269,8 +270,8 @@ %package LTO-devel Summary: Link-time optimizer for LLVM (devel package) -# Avoid multiple provider errors Group: Development/Languages/Other +# Avoid multiple provider errors Requires: %{name}-devel = %{version} Requires: libLTO%{_sonum} Conflicts: libLTO.so @@ -282,8 +283,8 @@ %package gold Summary: Gold linker plugin for LLVM -# Avoid multiple provider errors Group: Development/Languages/Other +# Avoid multiple provider errors Requires: %{name}-devel = %{version} Requires: libLLVM%{_sonum} Conflicts: llvm-gold-provider @@ -294,8 +295,8 @@ %package -n libomp%{_sonum}-devel Summary: MPI plugin for LLVM -# Avoid multiple provider errors Group: Development/Languages/Other +# Avoid multiple provider errors Requires: libLLVM%{_sonum} Conflicts: libomp-devel Provides: libomp-devel @@ -315,8 +316,8 @@ %package -n libc++-devel Summary: C++ standard library implementation (devel package) -# Avoid multiple provider errors Group: Development/Languages/C and C++ +# Avoid multiple provider errors Requires: libc++%{_socxx} = %{version} Requires: libc++abi-devel = %{version} Conflicts: libc++.so @@ -444,8 +445,8 @@ %package -n liblldb%{_sonum} Summary: LLDB software debugger runtime library -# Avoid multiple provider errors Group: System/Libraries +# Avoid multiple provider errors Requires: libLLVM%{_sonum} Requires: libclang%{_sonum} @@ -454,8 +455,8 @@ %package -n lldb%{_sonum}-devel Summary: Development files for LLDB -# Avoid multiple provider errors Group: Development/Languages/Other +# Avoid multiple provider errors Requires: clang%{_sonum}-devel = %{version} Requires: cmake Requires: liblldb%{_sonum} = %{version} @@ -475,8 +476,8 @@ %if %{with lldb_python} %package -n python3-lldb%{_sonum} Summary: Python bindings for liblldb -# Avoid multiple provider errors Group: Development/Languages/Python +# Avoid multiple provider errors BuildRequires: swig >= 3.0.11 Requires: liblldb%{_sonum} = %{version} Provides: %{python3_sitearch}/lldb/ @@ -502,6 +503,7 @@ %patch15 -p1 %patch16 -p1 %patch17 -p1 +%patch18 -p1 pushd cfe-%{version}.src %patch1 -p1 @@ -1492,6 +1494,7 @@ %defattr(-,root,root,-) %{_bindir}/llvm-config %{_libdir}/libLLVM.so +%{_libdir}/libLLVMTableGen.so %{_libdir}/BugpointPasses.* %{_libdir}/LLVMHello.* %{_includedir}/llvm/ ++++++ llvm_build_tablegen_component_as_shared_library.patch ++++++ The LLVMTableGen component is a special case that is excluded from libLLVM and normally is only built as static library and linked into llvm-tblgen. We need to have it as a shared library to be available for other projects such as ldc. This patch makes it even more special and forces it to be build and installed as separate shared library. Index: llvm-5.0.2.src/cmake/modules/AddLLVM.cmake =================================================================== --- llvm-5.0.2.src.orig/cmake/modules/AddLLVM.cmake +++ llvm-5.0.2.src/cmake/modules/AddLLVM.cmake @@ -517,7 +517,7 @@ function(llvm_add_library name) if(ARG_MODULE AND LLVM_EXPORT_SYMBOLS_FOR_PLUGINS AND ARG_PLUGIN_TOOL AND (WIN32 OR CYGWIN)) # On DLL platforms symbols are imported from the tool by linking against it. set(llvm_libs ${ARG_PLUGIN_TOOL}) - elseif (DEFINED LLVM_LINK_COMPONENTS OR DEFINED ARG_LINK_COMPONENTS) + elseif (DEFINED LLVM_LINK_COMPONENTS OR DEFINED ARG_LINK_COMPONENTS OR (${name} STREQUAL "LLVMTableGen" AND LLVM_BUILD_LLVM_DYLIB)) if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB) set(llvm_libs LLVM) else() @@ -569,7 +569,7 @@ macro(add_llvm_library name) "" "" ${ARGN}) - if( BUILD_SHARED_LIBS OR ARG_SHARED ) + if( BUILD_SHARED_LIBS OR ARG_SHARED) llvm_add_library(${name} SHARED ${ARG_UNPARSED_ARGUMENTS}) else() llvm_add_library(${name} ${ARG_UNPARSED_ARGUMENTS}) @@ -588,7 +588,7 @@ macro(add_llvm_library name) set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name}) else() if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LTO" OR - (LLVM_LINK_LLVM_DYLIB AND ${name} STREQUAL "LLVM")) + (LLVM_LINK_LLVM_DYLIB AND (${name} STREQUAL "LLVM" OR ${name} STREQUAL "LLVMTableGen"))) set(install_dir lib${LLVM_LIBDIR_SUFFIX}) if(ARG_SHARED OR BUILD_SHARED_LIBS) if(WIN32 OR CYGWIN OR MINGW) Index: llvm-5.0.2.src/cmake/modules/TableGen.cmake =================================================================== --- llvm-5.0.2.src.orig/cmake/modules/TableGen.cmake +++ llvm-5.0.2.src/cmake/modules/TableGen.cmake @@ -133,7 +133,8 @@ macro(add_tablegen target project) set(LLVM_ENABLE_OBJLIB ON) endif() - add_llvm_executable(${target} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN}) + add_llvm_executable(${target} ${ARGN}) + target_link_libraries(${target} LLVMTableGen) set(LLVM_LINK_COMPONENTS ${${target}_OLD_LLVM_LINK_COMPONENTS}) set(${project}_TABLEGEN "${target}" CACHE Index: llvm-5.0.2.src/lib/TableGen/CMakeLists.txt =================================================================== --- llvm-5.0.2.src.orig/lib/TableGen/CMakeLists.txt +++ llvm-5.0.2.src/lib/TableGen/CMakeLists.txt @@ -1,3 +1,7 @@ +if (LLVM_BUILD_LLVM_DYLIB) + set(MAYBE_SHARED SHARED) +endif() + add_llvm_library(LLVMTableGen Error.cpp Main.cpp @@ -8,6 +12,8 @@ add_llvm_library(LLVMTableGen TGLexer.cpp TGParser.cpp + ${MAYBE_SHARED} + ADDITIONAL_HEADER_DIRS ${LLVM_MAIN_INCLUDE_DIR}/llvm/TableGen ) Index: llvm-5.0.2.src/test/tools/llvm-config/system-libs.test =================================================================== --- llvm-5.0.2.src.orig/test/tools/llvm-config/system-libs.test +++ /dev/null @@ -1,6 +0,0 @@ -RUN: llvm-config --link-static --system-libs 2>&1 | FileCheck %s -REQUIRES: static-libs -UNSUPPORTED: system-windows -CHECK: -l -CHECK-NOT: error -CHECK-NOT: warning