From 89f9fb91e74cfd8e9c1047469fef98162a97b1d6 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 26 Dec 2018 23:57:03 +0100 Subject: [PATCH 1/3] fix a typo in the patch --- debian/patches/bootstrap-fix-include-next.diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/patches/bootstrap-fix-include-next.diff b/debian/patches/bootstrap-fix-include-next.diff index ee9dc9e4..87514b5c 100644 --- a/debian/patches/bootstrap-fix-include-next.diff +++ b/debian/patches/bootstrap-fix-include-next.diff @@ -10,7 +10,7 @@ include_next to get the glibc (libc6-dev package) header. However, in the previous example, because we have inttypes.h twice in the include search path, clang's header will call itself without any effect. -Therefor, it will do include_next until the define from the libc is existing (ex: _INTTYPES_H) +Therefore, it will do include_next until the define from the libc is existing (ex: _INTTYPES_H) Index: llvm-toolchain-7-7/clang/lib/Headers/inttypes.h From b5c74fb45b4d9b2dca24791d9601c85bc81cee42 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 27 Dec 2018 00:03:34 +0100 Subject: [PATCH 2/3] remove old patch --- .../patches/fix-include-next-bootstrap.diff | 41 ----------- debian/patches/fix-lldb-server-build | 73 ------------------- debian/patches/install-lldb-sb-headers.patch | 58 --------------- 3 files changed, 172 deletions(-) delete mode 100644 debian/patches/fix-include-next-bootstrap.diff delete mode 100644 debian/patches/fix-lldb-server-build delete mode 100644 debian/patches/install-lldb-sb-headers.patch diff --git a/debian/patches/fix-include-next-bootstrap.diff b/debian/patches/fix-include-next-bootstrap.diff deleted file mode 100644 index 0ad00550..00000000 --- a/debian/patches/fix-include-next-bootstrap.diff +++ /dev/null @@ -1,41 +0,0 @@ -When doing a bootstrap, we use a newly built clang. -When this one is used, if already installed on the system, -we have clang header in two places: -llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0/include/inttypes.h -and -/usr/include/clang/7.0.0/include/inttypes.h - -Because clang expects only one of his headers to be available, it uses -include_next to get the glibc (libc6-dev package) header. - -However, in the previous example, because we have inttypes.h twice in the -include search path, clang's header will call itself without any effect. -Therefor, it will do include_next until the define from the libc is existing (ex: _INTTYPES_H) - - -Index: llvm-toolchain-7-7/clang/lib/Headers/inttypes.h -=================================================================== ---- llvm-toolchain-7-7.orig/clang/lib/Headers/inttypes.h -+++ llvm-toolchain-7-7/clang/lib/Headers/inttypes.h -@@ -20,7 +20,7 @@ - * - \*===----------------------------------------------------------------------===*/ - --#ifndef __CLANG_INTTYPES_H -+#if !defined(__CLANG_INTTYPES_H) || !defined(_INTTYPES_H) - #define __CLANG_INTTYPES_H - - #if defined(_MSC_VER) && _MSC_VER < 1800 -Index: llvm-toolchain-7-7/clang/lib/Headers/limits.h -=================================================================== ---- llvm-toolchain-7-7.orig/clang/lib/Headers/limits.h -+++ llvm-toolchain-7-7/clang/lib/Headers/limits.h -@@ -22,7 +22,7 @@ - * - \*===----------------------------------------------------------------------===*/ - --#ifndef __CLANG_LIMITS_H -+#if !defined(__CLANG_LIMITS_H) || !defined(_LIBC_LIMITS_H_) - #define __CLANG_LIMITS_H - - /* The system's limits.h may, in turn, try to #include_next GCC's limits.h. diff --git a/debian/patches/fix-lldb-server-build b/debian/patches/fix-lldb-server-build deleted file mode 100644 index c9f92d4d..00000000 --- a/debian/patches/fix-lldb-server-build +++ /dev/null @@ -1,73 +0,0 @@ ---- - cmake/modules/AddLLVM.cmake | 2 - - polly/lib/CMakeLists.txt | 47 +++++++++++++++++--------------------------- - 2 files changed, 20 insertions(+), 29 deletions(-) - ---- a/cmake/modules/AddLLVM.cmake -+++ b/cmake/modules/AddLLVM.cmake -@@ -501,7 +501,7 @@ function(llvm_add_library name) - # 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) -- if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB) -+ if (NOT ARG_STATIC AND LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB) - set(llvm_libs LLVM) - else() - llvm_map_components_to_libnames(llvm_libs ---- a/polly/lib/CMakeLists.txt -+++ b/polly/lib/CMakeLists.txt -@@ -66,35 +66,26 @@ endif (GPU_CODEGEN) - - target_link_libraries(Polly PollyISL jsoncpp) - --if (BUILD_SHARED_LIBS) -- target_link_libraries(Polly -- LLVMSupport -- LLVMCore -- LLVMScalarOpts -- LLVMInstCombine -- LLVMTransformUtils -- LLVMAnalysis -- LLVMipo -- LLVMMC -+target_link_libraries(Polly -+ LLVMSupport -+ LLVMCore -+ LLVMScalarOpts -+ LLVMInstCombine -+ LLVMTransformUtils -+ LLVMAnalysis -+ LLVMipo -+ LLVMMC - # The libraries below are required for darwin: http://PR26392 -- LLVMBitReader -- LLVMMCParser -- LLVMObject -- LLVMProfileData -- LLVMTarget -- LLVMVectorize -- ) -- link_directories( -- ${LLVM_LIBRARY_DIR} -- ) --elseif (LLVM_LINK_LLVM_DYLIB) -- target_link_libraries(Polly -- LLVM -- ) -- link_directories( -- ${LLVM_LIBRARY_DIR} -- ) --endif() -+ LLVMBitReader -+ LLVMMCParser -+ LLVMObject -+ LLVMProfileData -+ LLVMTarget -+ LLVMVectorize -+) -+link_directories( -+ ${LLVM_LIBRARY_DIR} -+) - - # Build a monolithic Polly.a and a thin module LLVMPolly.moduleext that links to - # that static library. diff --git a/debian/patches/install-lldb-sb-headers.patch b/debian/patches/install-lldb-sb-headers.patch deleted file mode 100644 index a1ee4364..00000000 --- a/debian/patches/install-lldb-sb-headers.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 8f577000b2fe2f5bf5d08e352a2f15f9421f9c82 Mon Sep 17 00:00:00 2001 -From: Pavel Labath -Date: Thu, 8 Mar 2018 15:52:46 +0000 -Subject: [PATCH] Install lldb's SB headers (pr36630) - -These were removed in r309021 in what looks like an accidentally -committed change. This brings them back. - -I also rename the header component to lldb-headers (instead of -lldb_headers) to match the llvm style and add a special -install-lldb-headers target, which installs just the headers. - -git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@327016 91177308-0d34-0410-b5e6-96231b3b80d8 -Origin: upstream, https://github.com/llvm-mirror/lldb/commit/8f577000b2fe2f5bf5d08e352a2f15f9421f9c82.patch -Bug-Ubuntu: https://launchpad.net/bugs/1761009 -Forwarded: will be done by Nishanth Aravamudan -Last-Update: 2018-04-05 - ---- llvm-toolchain-6.0-6.0.orig/lldb/cmake/modules/LLDBConfig.cmake -+++ llvm-toolchain-6.0-6.0/lldb/cmake/modules/LLDBConfig.cmake -@@ -277,27 +277,31 @@ include_directories(BEFORE - - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) - install(DIRECTORY include/ -- COMPONENT lldb_headers -+ COMPONENT lldb-headers - DESTINATION include - FILES_MATCHING - PATTERN "*.h" - PATTERN ".svn" EXCLUDE - PATTERN ".cmake" EXCLUDE - PATTERN "Config.h" EXCLUDE -- PATTERN "lldb-*.h" EXCLUDE -- PATTERN "API/*.h" EXCLUDE - ) - - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ -- COMPONENT lldb_headers -+ COMPONENT lldb-headers - DESTINATION include - FILES_MATCHING - PATTERN "*.h" - PATTERN ".svn" EXCLUDE - PATTERN ".cmake" EXCLUDE -- PATTERN "lldb-*.h" EXCLUDE -- PATTERN "API/*.h" EXCLUDE - ) -+ -+ add_custom_target(lldb-headers) -+ set_target_properties(lldb-headers PROPERTIES FOLDER "Misc") -+ -+ if (NOT CMAKE_CONFIGURATION_TYPES) -+ add_llvm_install_targets(install-lldb-headers -+ COMPONENT lldb-headers) -+ endif() - endif() - - if (NOT LIBXML2_FOUND AND NOT (CMAKE_SYSTEM_NAME MATCHES "Windows")) From 0d75b604535f575e05f54ab28decd0c0dcf709b5 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 27 Dec 2018 00:12:04 +0100 Subject: [PATCH 3/3] fix some typos --- debian/changelog | 8 ++++---- .../lldb-addversion-suffix-to-llvm-server-exec.patch | 2 +- debian/patches/series | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 278679e0..b1398dc0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -123,7 +123,7 @@ llvm-toolchain-7 (1:7.0.1~+rc2-3) unstable; urgency=medium * Disable gold for sparc* (Closes: #913260) * Hide a symbol in openmp for mips64el - * Try to integrate a pach to make pch reproducible + * Try to integrate a patch to make pch reproducible Thanks to Rebecca Palmer for the patch (Closes: #877359) * Fix the misscompilation issue causing rustc to crash (Closes: #913271) @@ -186,7 +186,7 @@ llvm-toolchain-7 (1:7-8) unstable; urgency=medium (Closes: #909705) * Add tests from old bugs to make sure they don't come back (Closes: #889832, #827866) - * The sanitizers use the versionned llvm-symbolizer provided by the + * The sanitizers use the versioned llvm-symbolizer provided by the llvm-X package (Closes: #753572) -- Sylvestre Ledru Sat, 20 Oct 2018 16:00:58 +0200 @@ -207,7 +207,7 @@ llvm-toolchain-7 (1:7-7~exp2) experimental; urgency=medium (Closes: #909705) * Add tests from old bugs to make sure they don't come back (Closes: #889832, #827866) - * The sanitizers use the versionned llvm-symbolizer provided by the + * The sanitizers use the versioned llvm-symbolizer provided by the llvm-X package (Closes: #753572) -- Sylvestre Ledru Sun, 21 Oct 2018 18:34:20 +0200 @@ -215,7 +215,7 @@ llvm-toolchain-7 (1:7-7~exp2) experimental; urgency=medium llvm-toolchain-7 (1:7-7~exp1) experimental; urgency=medium * Experiment the clang bootstrap - * Try to boostrap clang using clang + * Try to bootstrap clang using clang -- Sylvestre Ledru Wed, 17 Oct 2018 20:15:57 +0200 diff --git a/debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch b/debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch index 561fdd6c..0489ecb3 100644 --- a/debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch +++ b/debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch @@ -3,7 +3,7 @@ for any debugging with lldb which makes it unusable unless default version package has been installed. Small changes to code and debian/rules allows a workaround for lldb-server start up. -To use this one needs to add cmake defination during configure. eg +To use this one needs to add cmake definition during configure. eg -DDEBIAN_VERSION_SUFFIX=-$(LLVM_VERSION) Better implementation would be to use /usr/share/llvm-$(VERSION)/bin but diff --git a/debian/patches/series b/debian/patches/series index e413cce7..f189a676 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -96,7 +96,7 @@ clang-baseline-fix-i386.patch disable-sse2-old-x86.diff clang-arm-default-vfp3-on-armv7a.patch -# For the boostrap +# For the bootstrap bootstrap-fix-include-next.diff clangd-atomic-cmake.patch pr39427-misscompile.diff