From 1d7acaf472c65d592e8aee8aca90035e709cbc62 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 9 Apr 2017 08:21:01 +0000 Subject: [PATCH 01/70] fix symlink on scan-build-py --- debian/clang-X.Y.links.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/clang-X.Y.links.in b/debian/clang-X.Y.links.in index d2d92626..42bccd2e 100644 --- a/debian/clang-X.Y.links.in +++ b/debian/clang-X.Y.links.in @@ -1,4 +1,4 @@ usr/share/clang/scan-build-@LLVM_VERSION@/bin/scan-build usr/bin/scan-build-@L1;4600;0cLVM_VERSION@ -usr/share/clang/scan-build-py-@LLVM_VERSION@/bin/scan-build-py usr/bin/scan-build-@LLVM_VERSION@-py +usr/share/clang/scan-build-py-@LLVM_VERSION@/bin/scan-build usr/bin/scan-build-py-@LLVM_VERSION@ usr/share/clang/scan-view-@LLVM_VERSION@/bin/scan-view usr/bin/scan-view-@LLVM_VERSION@ From cb938219a3094fa13ec3cd668450563f1d25ada6 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 9 Apr 2017 08:22:18 +0000 Subject: [PATCH 02/70] Fix the symlink on scan-build-py --- debian/changelog | 1 + debian/clang-X.Y.links.in | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b0ef9423..1d6e363b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ llvm-toolchain-4.0 (1:4.0-3) UNRELEASED; urgency=medium * change the min version of the libclang1 symbols to 1:4.0-3~ * Add override_dh_makeshlibs for the libllvm or liblldb versions Thanks to Julien Cristau for the patch + * Fix the symlink on scan-build-py [ Rebecca N. Palmer ] * Use versioned symbols (Closes: #848368) diff --git a/debian/clang-X.Y.links.in b/debian/clang-X.Y.links.in index 42bccd2e..0d92fbcd 100644 --- a/debian/clang-X.Y.links.in +++ b/debian/clang-X.Y.links.in @@ -1,4 +1,3 @@ usr/share/clang/scan-build-@LLVM_VERSION@/bin/scan-build usr/bin/scan-build-@L1;4600;0cLVM_VERSION@ usr/share/clang/scan-build-py-@LLVM_VERSION@/bin/scan-build usr/bin/scan-build-py-@LLVM_VERSION@ usr/share/clang/scan-view-@LLVM_VERSION@/bin/scan-view usr/bin/scan-view-@LLVM_VERSION@ - From ae779d563398ad251302bd17bd1f91de0de33c60 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 9 Apr 2017 08:45:35 +0000 Subject: [PATCH 03/70] rebase of the patch --- debian/patches/add_symbols_versioning.patch | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/debian/patches/add_symbols_versioning.patch b/debian/patches/add_symbols_versioning.patch index ac2540a2..2d423298 100644 --- a/debian/patches/add_symbols_versioning.patch +++ b/debian/patches/add_symbols_versioning.patch @@ -4,7 +4,7 @@ This patch adds a very simple linker script to version the lib's symbols and thus trying to avoid crashes if an application loads two different LLVM versions (as long as they do not share data between them). -Note that we deliberately *don't* make LLVM_4.0 depend on LLVM_4.0: +Note that we deliberately *don't* make LLVM_3.9 depend on LLVM_3.8: they're incompatible and the whole point of this patch is to tell the linker that. @@ -12,29 +12,29 @@ Author: Rebecca N. Palmer Author: Lisandro Damían Nicanor Pérez Meyer Bug-Debian: https://bugs.debian.org/848368 -Index: llvm-toolchain-snapshot_5.0~svn298832/tools/llvm-shlib/CMakeLists.txt +Index: llvm-toolchain-4.0_4.0~svn299455/tools/llvm-shlib/CMakeLists.txt =================================================================== ---- llvm-toolchain-snapshot_5.0~svn298832.orig/tools/llvm-shlib/CMakeLists.txt -+++ llvm-toolchain-snapshot_5.0~svn298832/tools/llvm-shlib/CMakeLists.txt +--- llvm-toolchain-4.0_4.0~svn299455.orig/tools/llvm-shlib/CMakeLists.txt ++++ llvm-toolchain-4.0_4.0~svn299455/tools/llvm-shlib/CMakeLists.txt @@ -40,7 +40,7 @@ set_property(TARGET LLVM PROPERTY VERSIO list(REMOVE_DUPLICATES LIB_NAMES) - if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be "GNU ld for elf" + if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR MINGW) # 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) + set(LIB_NAMES -Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/simple_version_script.map -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive) elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") set(LIB_NAMES -Wl,-all_load ${LIB_NAMES}) endif() -Index: llvm-toolchain-snapshot_5.0~svn298832/tools/llvm-shlib/simple_version_script.map +Index: llvm-toolchain-4.0_4.0~svn299455/tools/llvm-shlib/simple_version_script.map =================================================================== --- /dev/null -+++ llvm-toolchain-snapshot_5.0~svn298832/tools/llvm-shlib/simple_version_script.map ++++ llvm-toolchain-4.0_4.0~svn299455/tools/llvm-shlib/simple_version_script.map @@ -0,0 +1 @@ +LLVM_4.0 { global: *; }; -Index: llvm-toolchain-snapshot_5.0~svn298832/cmake/modules/AddLLVM.cmake +Index: llvm-toolchain-4.0_4.0~svn299455/cmake/modules/AddLLVM.cmake =================================================================== ---- llvm-toolchain-snapshot_5.0~svn298832.orig/cmake/modules/AddLLVM.cmake -+++ llvm-toolchain-snapshot_5.0~svn298832/cmake/modules/AddLLVM.cmake +--- llvm-toolchain-4.0_4.0~svn299455.orig/cmake/modules/AddLLVM.cmake ++++ llvm-toolchain-4.0_4.0~svn299455/cmake/modules/AddLLVM.cmake @@ -82,7 +82,7 @@ function(add_llvm_symbol_exports target_ set(native_export_file "${target_name}.exports") # FIXME: Don't write the "local:" line on OpenBSD. From ca711d0698c8d34268ed3ae84ae8d1ffadaa51b6 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 9 Apr 2017 12:40:03 +0000 Subject: [PATCH 04/70] remove the ocaml stuff --- debian/changelog | 2 -- debian/clang-X.Y.links.in | 2 +- debian/control | 47 ++++++++++++++++++++------------------- debian/rules | 23 ++++++++++--------- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1d6e363b..bf3ac8be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,6 @@ llvm-toolchain-4.0 (1:4.0-3) UNRELEASED; urgency=medium undefined symbols * Add override_dh_makeshlibs for the libllvm or liblldb versions Thanks to Julien Cristau for the patch - * Bring back the ocaml binding. thanks to Cyril Soldani for the patch - (Closes: #858626) * change the min version of the libclang1 symbols to 1:4.0-3~ * Add override_dh_makeshlibs for the libllvm or liblldb versions Thanks to Julien Cristau for the patch diff --git a/debian/clang-X.Y.links.in b/debian/clang-X.Y.links.in index 0d92fbcd..985ab16e 100644 --- a/debian/clang-X.Y.links.in +++ b/debian/clang-X.Y.links.in @@ -1,3 +1,3 @@ -usr/share/clang/scan-build-@LLVM_VERSION@/bin/scan-build usr/bin/scan-build-@L1;4600;0cLVM_VERSION@ +usr/share/clang/scan-build-@LLVM_VERSION@/bin/scan-build usr/bin/scan-build-@LLVM_VERSION@ usr/share/clang/scan-build-py-@LLVM_VERSION@/bin/scan-build usr/bin/scan-build-py-@LLVM_VERSION@ usr/share/clang/scan-view-@LLVM_VERSION@/bin/scan-view usr/bin/scan-view-@LLVM_VERSION@ diff --git a/debian/control b/debian/control index 7cac7fb6..486a84ea 100644 --- a/debian/control +++ b/debian/control @@ -6,9 +6,10 @@ Uploaders: Sylvestre Ledru Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, cmake, perl, libtool, chrpath, texinfo, sharutils, libffi-dev (>= 3.0.9), lsb-release, patchutils, diffstat, xz-utils, python-dev, - libedit-dev, swig, python-six, python-sphinx, ocaml-nox, binutils-dev, - libjsoncpp-dev, - lcov, procps, help2man, dh-ocaml, zlib1g-dev, + libedit-dev, swig, python-six, python-sphinx, binutils-dev, + libjsoncpp-dev, +# ocaml-nox, libctypes-ocaml, ocaml-findlib, libctypes-ocaml-dev, dh-ocaml, + lcov, procps, help2man, zlib1g-dev, g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32] Build-Conflicts: oprofile, ocaml, libllvm-3.4-ocaml-dev, libllvm-3.5-ocaml-dev, libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev @@ -333,26 +334,26 @@ Description: Modular compiler and toolchain technologies, tools . This package provides tools for testing. -Package: libllvm-4.0-ocaml-dev -Section: ocaml -Architecture: any -Suggests: llvm-4.0-doc -Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-4.0-dev (= ${binary:Version}) -Provides: ${ocaml:Provides} -Description: Modular compiler and toolchain technologies, OCaml bindings - LLVM is a collection of libraries and tools that make it easy to build - compilers, optimizers, just-in-time code generators, and many other - compiler-related programs. - . - LLVM uses a single, language-independent virtual instruction set both - as an offline code representation (to communicate code between - compiler phases and to run-time systems) and as the compiler internal - representation (to analyze and transform programs). This persistent - code representation allows a common set of sophisticated compiler - techniques to be applied at compile-time, link-time, install-time, - run-time, or "idle-time" (between program runs). - . - This package provides the OCaml bindings to develop applications using llvm. +#Package: libllvm-4.0-ocaml-dev +#Section: ocaml +#Architecture: any +#Suggests: llvm-4.0-doc +#Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-4.0-dev (= ${binary:Version}) +#Provides: ${ocaml:Provides} +#Description: Modular compiler and toolchain technologies, OCaml bindings +# LLVM is a collection of libraries and tools that make it easy to build +# compilers, optimizers, just-in-time code generators, and many other +# compiler-related programs. +# . +# LLVM uses a single, language-independent virtual instruction set both +# as an offline code representation (to communicate code between +# compiler phases and to run-time systems) and as the compiler internal +# representation (to analyze and transform programs). This persistent +# code representation allows a common set of sophisticated compiler +# techniques to be applied at compile-time, link-time, install-time, +# run-time, or "idle-time" (between program runs). +# . +# This package provides the OCaml bindings to develop applications using llvm. Package: llvm-4.0-doc Section: doc diff --git a/debian/rules b/debian/rules index d3ae3484..68ad2456 100755 --- a/debian/rules +++ b/debian/rules @@ -22,7 +22,7 @@ DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_HOST_ARCH_BITS = $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS) DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) -OCAML_STDLIB_DIR ?= $(shell ocamlc -where) +#OCAML_STDLIB_DIR ?= $(shell ocamlc -where) LDFLAGS_EXTRA = CXXFLAGS_EXTRA = -std=c++0x @@ -141,7 +141,8 @@ endif LLD_ENABLE=yes %: - dh $@ --with ocaml + dh $@ +# --with ocaml @@ -151,13 +152,13 @@ preconfigure: echo "$$f => $$f2"; \ sed -e 's|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|g' \ -e "s|@LLVM_VERSION_FULL@|$(LLVM_VERSION_FULL)|g" \ - -e "s|@OCAML_STDLIB_DIR@|$(OCAML_STDLIB_DIR)|g" \ -e "s|@LLVM_VERSION@|$(LLVM_VERSION)|g" $$f > $$f2; \ done +# -e "s|@OCAML_STDLIB_DIR@|$(OCAML_STDLIB_DIR)|g" # Override this two targets. They are trying to manage the .in conversion for me -override_dh_ocamlinit: -override_dh_ocamlclean: +#override_dh_ocamlinit: +#override_dh_ocamlclean: override_dh_auto_configure: preconfigure echo "Using gcc: " @@ -272,7 +273,7 @@ override_dh_prep: build_doc build_doc: cd $(CURDIR)/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man cd $(CURDIR)/clang/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man - $(PRE_PROCESS) $(MAKE) $(NJOBS) -C "$(TARGET_BUILD)/docs" ocaml_doc +# $(PRE_PROCESS) $(MAKE) $(NJOBS) -C "$(TARGET_BUILD)/docs" ocaml_doc # Continue if failing, Ubuntu precise cannot generate manpages as sphinx is too old -(cd $(TARGET_BUILD) && make $(NJOBS) docs-llvm-html docs-clang-html docs-clang-tools-html docs-polly-html docs-polly-man docs-clang-tools-man docs-clang-man docs-llvm-man) @@ -422,11 +423,11 @@ override_dh_auto_install: cp -R $(TARGET_BUILD)/tools/clang/tools/extra/docs/html $(CURDIR)/debian/usr/share/doc/clang-$(LLVM_VERSION)-doc/clang-extra # Rename OCaml bindings - if test -d "$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml"; then \ - mkdir -p "$(DEB_INST)$(OCAML_STDLIB_DIR)"; \ - mv -f "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml" \ - "$(DEB_INST)$(OCAML_STDLIB_DIR)/llvm-$(LLVM_VERSION)"; \ - fi +# if test -d "$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml"; then \ +# mkdir -p "$(DEB_INST)$(OCAML_STDLIB_DIR)"; \ +# mv -f "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml" \ +# "$(DEB_INST)$(OCAML_STDLIB_DIR)/llvm-$(LLVM_VERSION)"; \ +# fi # Delete the target build directory to save some space on the build systems # All the files have been installed in $(CURDIR)/debian/tmp/ already From 3f48b8ba2a14f1a50ccc1a4d70528b6130ecba08 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 9 Apr 2017 16:39:59 +0000 Subject: [PATCH 05/70] fix dh_makeshlibs version --- debian/rules | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 68ad2456..a67ef42f 100755 --- a/debian/rules +++ b/debian/rules @@ -435,7 +435,9 @@ override_dh_auto_install: override_dh_makeshlibs: - dh_makeshlibs -V1:4.0-3~ + dh_makeshlibs + dh_makeshlibs -plibclang$(SONAME_EXT)-$(LLVM_VERSION) -V"libclang$(SONAME_EXT)-$(LLVM_VERSION) (>= 1:4.0-3~)" + dh_makeshlibs -pliblldb-$(LLVM_VERSION) -V"liblldb-$(LLVM_VERSION) (>= 1:4.0-3~)" override_dh_shlibdeps: # Ignore asan libraries. They would trigger dependencies to multiarch libraries From 86491b223db5541684e6e078bc32eca2521d92f0 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 10 Apr 2017 06:11:23 +0000 Subject: [PATCH 06/70] fix bad merge --- debian/libclang1-X.Y.symbols.in | 341 -------------------------------- 1 file changed, 341 deletions(-) diff --git a/debian/libclang1-X.Y.symbols.in b/debian/libclang1-X.Y.symbols.in index 7b05d36e..2265b843 100644 --- a/debian/libclang1-X.Y.symbols.in +++ b/debian/libclang1-X.Y.symbols.in @@ -343,344 +343,3 @@ libclang-@LLVM_VERSION@.so.1 libclang1-@LLVM_VERSION@ #MINVER# clang_tokenize@LLVM_@LLVM_VERSION@ 1:4.0-3~ clang_visitChildren@LLVM_@LLVM_VERSION@ 1:4.0-3~ clang_visitChildrenWithBlock@LLVM_@LLVM_VERSION@ 1:4.0-3~ -||||||| .merge-left.r2492 - LLVM_@LLVM_VERSION@@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_BlockCommandComment_getArgText@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_BlockCommandComment_getCommandName@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_BlockCommandComment_getNumArgs@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_BlockCommandComment_getParagraph@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXCursorSet_contains@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXCursorSet_insert@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXIndex_getGlobalOptions@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXIndex_setGlobalOptions@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXXConstructor_isConvertingConstructor@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXXConstructor_isCopyConstructor@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXXConstructor_isDefaultConstructor@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXXConstructor_isMoveConstructor@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXXField_isMutable@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXXMethod_isConst@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXXMethod_isDefaulted@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXXMethod_isPureVirtual@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXXMethod_isStatic@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CXXMethod_isVirtual@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Comment_getChild@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Comment_getKind@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Comment_getNumChildren@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Comment_isWhitespace@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CompilationDatabase_dispose@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CompilationDatabase_fromDirectory@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CompilationDatabase_getAllCompileCommands@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CompilationDatabase_getCompileCommands@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CompileCommand_getArg@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CompileCommand_getDirectory@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CompileCommand_getFilename@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CompileCommand_getMappedSourceContent@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CompileCommand_getMappedSourcePath@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CompileCommand_getNumArgs@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CompileCommands_dispose@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CompileCommands_getCommand@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_CompileCommands_getSize@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_Evaluate@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getArgument@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getBriefCommentText@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getCXXManglings@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getCommentRange@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getMangling@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getModule@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getNumArguments@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getNumTemplateArguments@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getObjCDeclQualifiers@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getObjCPropertyAttributes@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getObjCSelectorIndex@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getOffsetOfField@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getParsedComment@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getRawCommentText@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getReceiverType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getSpellingNameRange@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getStorageClass@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getTemplateArgumentKind@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getTemplateArgumentType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getTemplateArgumentUnsignedValue@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getTemplateArgumentValue@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_getTranslationUnit@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_hasAttrs@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_isAnonymous@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_isBitField@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_isDynamicCall@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_isFunctionInlined@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_isMacroBuiltin@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_isMacroFunctionLike@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_isNull@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_isObjCOptional@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Cursor_isVariadic@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_EvalResult_dispose@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_EvalResult_getAsDouble@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_EvalResult_getAsInt@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_EvalResult_getAsStr@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_EvalResult_getKind@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_File_isEqual@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_FullComment_getAsHTML@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_FullComment_getAsXML@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_HTMLStartTagComment_isSelfClosing@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_HTMLStartTag_getAttrName@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_HTMLStartTag_getAttrValue@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_HTMLStartTag_getNumAttrs@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_HTMLTagComment_getAsString@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_HTMLTagComment_getTagName@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_IndexAction_create@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_IndexAction_dispose@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_InlineCommandComment_getArgText@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_InlineCommandComment_getCommandName@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_InlineCommandComment_getNumArgs@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_InlineCommandComment_getRenderKind@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_InlineContentComment_hasTrailingNewline@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Location_isFromMainFile@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Location_isInSystemHeader@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_ModuleMapDescriptor_create@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_ModuleMapDescriptor_dispose@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_ModuleMapDescriptor_setFrameworkModuleName@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_ModuleMapDescriptor_setUmbrellaHeader@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_ModuleMapDescriptor_writeToBuffer@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Module_getASTFile@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Module_getFullName@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Module_getName@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Module_getNumTopLevelHeaders@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Module_getParent@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Module_getTopLevelHeader@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Module_isSystem@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_ParamCommandComment_getDirection@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_ParamCommandComment_getParamIndex@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_ParamCommandComment_getParamName@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_ParamCommandComment_isDirectionExplicit@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_ParamCommandComment_isParamIndexValid@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Range_isNull@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_TParamCommandComment_getDepth@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_TParamCommandComment_getIndex@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_TParamCommandComment_getParamName@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_TParamCommandComment_isParamPositionValid@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_TextComment_getText@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Type_getAlignOf@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Type_getCXXRefQualifier@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Type_getClassType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Type_getNamedType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Type_getNumTemplateArguments@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Type_getObjCEncoding@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Type_getOffsetOf@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Type_getSizeOf@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Type_getTemplateArgumentAsType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_Type_visitFields@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_VerbatimBlockLineComment_getText@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_VerbatimLineComment_getText@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_VirtualFileOverlay_addFileMapping@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_VirtualFileOverlay_create@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_VirtualFileOverlay_dispose@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_VirtualFileOverlay_setCaseSensitivity@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_VirtualFileOverlay_writeToBuffer@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_annotateTokens@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_codeCompleteAt@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_codeCompleteGetContainerKind@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_codeCompleteGetContainerUSR@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_codeCompleteGetContexts@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_codeCompleteGetDiagnostic@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_codeCompleteGetNumDiagnostics@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_codeCompleteGetObjCSelector@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_constructUSR_ObjCCategory@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_constructUSR_ObjCClass@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_constructUSR_ObjCIvar@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_constructUSR_ObjCMethod@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_constructUSR_ObjCProperty@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_constructUSR_ObjCProtocol@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_createCXCursorSet@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_createIndex@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_createTranslationUnit2@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_createTranslationUnit@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_createTranslationUnitFromSourceFile@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_defaultCodeCompleteOptions@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_defaultDiagnosticDisplayOptions@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_defaultEditingTranslationUnitOptions@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_defaultReparseOptions@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_defaultSaveOptions@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_disposeCXCursorSet@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_disposeCXPlatformAvailability@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_disposeCXTUResourceUsage@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_disposeCodeCompleteResults@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_disposeDiagnostic@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_disposeDiagnosticSet@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_disposeIndex@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_disposeOverriddenCursors@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_disposeSourceRangeList@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_disposeString@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_disposeStringSet@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_disposeTokens@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_disposeTranslationUnit@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_enableStackTraces@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_equalCursors@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_equalLocations@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_equalRanges@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_equalTypes@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_executeOnThread@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_findIncludesInFile@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_findIncludesInFileWithBlock@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_findReferencesInFile@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_findReferencesInFileWithBlock@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_formatDiagnostic@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_free@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getArgType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getArrayElementType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getArraySize@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getBuildSessionTimestamp@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCString@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCXTUResourceUsage@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCXXAccessSpecifier@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCanonicalCursor@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCanonicalType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getChildDiagnostics@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getClangVersion@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCompletionAnnotation@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCompletionAvailability@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCompletionBriefComment@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCompletionChunkCompletionString@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCompletionChunkKind@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCompletionChunkText@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCompletionNumAnnotations@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCompletionParent@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCompletionPriority@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursor@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorAvailability@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorCompletionString@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorDefinition@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorDisplayName@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorExtent@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorKind@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorKindSpelling@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorLanguage@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorLexicalParent@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorLinkage@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorLocation@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorPlatformAvailability@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorReferenceNameRange@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorReferenced@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorResultType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorSemanticParent@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorSpelling@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorUSR@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getCursorVisibility@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDeclObjCTypeEncoding@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDefinitionSpellingAndExtent@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnostic@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnosticCategory@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnosticCategoryName@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnosticCategoryText@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnosticFixIt@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnosticInSet@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnosticLocation@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnosticNumFixIts@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnosticNumRanges@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnosticOption@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnosticRange@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnosticSetFromTU@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnosticSeverity@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getDiagnosticSpelling@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getElementType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getEnumConstantDeclUnsignedValue@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getEnumConstantDeclValue@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getEnumDeclIntegerType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getExpansionLocation@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getFieldDeclBitWidth@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getFile@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getFileLocation@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getFileName@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getFileTime@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getFileUniqueID@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getFunctionTypeCallingConv@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getIBOutletCollectionType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getIncludedFile@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getInclusions@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getInstantiationLocation@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getLocation@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getLocationForOffset@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getModuleForFile@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getNullCursor@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getNullLocation@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getNullRange@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getNumArgTypes@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getNumCompletionChunks@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getNumDiagnostics@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getNumDiagnosticsInSet@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getNumElements@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getNumOverloadedDecls@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getOverloadedDecl@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getOverriddenCursors@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getPointeeType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getPresumedLocation@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getRange@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getRangeEnd@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getRangeStart@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getRemappings@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getRemappingsFromFileList@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getResultType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getSkippedRanges@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getSpecializedCursorTemplate@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getSpellingLocation@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getTUResourceUsageName@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getTemplateCursorKind@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getTokenExtent@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getTokenKind@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getTokenLocation@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getTokenSpelling@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getTranslationUnitCursor@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getTranslationUnitSpelling@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getTypeDeclaration@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getTypeKindSpelling@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getTypeSpelling@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_getTypedefDeclUnderlyingType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_hashCursor@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_indexLoc_getCXSourceLocation@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_indexLoc_getFileLocation@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_indexSourceFile@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_indexSourceFileFullArgv@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_indexTranslationUnit@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_index_getCXXClassDeclInfo@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_index_getClientContainer@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_index_getClientEntity@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_index_getIBOutletCollectionAttrInfo@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_index_getObjCCategoryDeclInfo@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_index_getObjCContainerDeclInfo@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_index_getObjCInterfaceDeclInfo@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_index_getObjCPropertyDeclInfo@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_index_getObjCProtocolRefListInfo@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_index_isEntityObjCContainerKind@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_index_setClientContainer@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_index_setClientEntity@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isAttribute@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isConstQualifiedType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isCursorDefinition@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isDeclaration@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isExpression@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isFileMultipleIncludeGuarded@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isFunctionTypeVariadic@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isInvalid@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isPODType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isPreprocessing@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isReference@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isRestrictQualifiedType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isStatement@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isTranslationUnit@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isUnexposed@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isVirtualBase@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_isVolatileQualifiedType@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_loadDiagnostics@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_parseTranslationUnit2@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_parseTranslationUnit2FullArgv@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_parseTranslationUnit@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_remap_dispose@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_remap_getFilenames@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_remap_getNumFiles@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_reparseTranslationUnit@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_saveTranslationUnit@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_sortCodeCompletionResults@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_toggleCrashRecovery@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_tokenize@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_visitChildren@LLVM_@LLVM_VERSION@ 1:4.0-3~ - clang_visitChildrenWithBlock@LLVM_@LLVM_VERSION@ 1:4.0-3~ From 3486e452b6d30f669cf6b0cdb8213cfa8cd65ba0 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 10 Apr 2017 08:59:31 +0000 Subject: [PATCH 07/70] upload --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index bf3ac8be..fece9f7d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -llvm-toolchain-4.0 (1:4.0-3) UNRELEASED; urgency=medium +llvm-toolchain-4.0 (1:4.0-3) unstable; urgency=medium * Explicit the dep of clang-tidy on same version of llvm to avoid undefined symbols From 575d1a798d9f7980e5b1a69547b29a906335d0f3 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 15 Apr 2017 15:19:21 +0000 Subject: [PATCH 08/70] Limit the archs where the ocaml binding is built Should fix the FTBFS Currently amd64 arm64 armel armhf i386 --- debian/changelog | 8 ++++++++ debian/control | 47 +++++++++++++++++++++++++---------------------- debian/rules | 41 ++++++++++++++++++++++++++--------------- 3 files changed, 59 insertions(+), 37 deletions(-) diff --git a/debian/changelog b/debian/changelog index fece9f7d..01258fbd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +llvm-toolchain-4.0 (1:4.0-4) unstable; urgency=medium + + * Limit the archs where the ocaml binding is built + Should fix the FTBFS + Currently amd64 arm64 armel armhf i386 + + -- Sylvestre Ledru Sat, 15 Apr 2017 12:03:30 +0200 + llvm-toolchain-4.0 (1:4.0-3) unstable; urgency=medium * Explicit the dep of clang-tidy on same version of llvm to avoid diff --git a/debian/control b/debian/control index 486a84ea..594ca30f 100644 --- a/debian/control +++ b/debian/control @@ -7,9 +7,12 @@ Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, cmake, perl, libtool, chrpath, texinfo, sharutils, libffi-dev (>= 3.0.9), lsb-release, patchutils, diffstat, xz-utils, python-dev, libedit-dev, swig, python-six, python-sphinx, binutils-dev, - libjsoncpp-dev, -# ocaml-nox, libctypes-ocaml, ocaml-findlib, libctypes-ocaml-dev, dh-ocaml, + libjsoncpp-dev, lcov, procps, help2man, zlib1g-dev, + ocaml-nox [amd64 arm64 armel armhf i386], + ocaml-findlib [amd64 arm64 armel armhf i386], + libctypes-ocaml-dev [amd64 arm64 armel armhf i386], + dh-ocaml [amd64 arm64 armel armhf i386], g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32] Build-Conflicts: oprofile, ocaml, libllvm-3.4-ocaml-dev, libllvm-3.5-ocaml-dev, libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev @@ -334,26 +337,26 @@ Description: Modular compiler and toolchain technologies, tools . This package provides tools for testing. -#Package: libllvm-4.0-ocaml-dev -#Section: ocaml -#Architecture: any -#Suggests: llvm-4.0-doc -#Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-4.0-dev (= ${binary:Version}) -#Provides: ${ocaml:Provides} -#Description: Modular compiler and toolchain technologies, OCaml bindings -# LLVM is a collection of libraries and tools that make it easy to build -# compilers, optimizers, just-in-time code generators, and many other -# compiler-related programs. -# . -# LLVM uses a single, language-independent virtual instruction set both -# as an offline code representation (to communicate code between -# compiler phases and to run-time systems) and as the compiler internal -# representation (to analyze and transform programs). This persistent -# code representation allows a common set of sophisticated compiler -# techniques to be applied at compile-time, link-time, install-time, -# run-time, or "idle-time" (between program runs). -# . -# This package provides the OCaml bindings to develop applications using llvm. +Package: libllvm-4.0-ocaml-dev +Section: ocaml +Architecture: amd64 arm64 armel armhf i386 +Suggests: llvm-4.0-doc +Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-4.0-dev (= ${binary:Version}) +Provides: ${ocaml:Provides} +Description: Modular compiler and toolchain technologies, OCaml bindings + LLVM is a collection of libraries and tools that make it easy to build + compilers, optimizers, just-in-time code generators, and many other + compiler-related programs. + . + LLVM uses a single, language-independent virtual instruction set both + as an offline code representation (to communicate code between + compiler phases and to run-time systems) and as the compiler internal + representation (to analyze and transform programs). This persistent + code representation allows a common set of sophisticated compiler + techniques to be applied at compile-time, link-time, install-time, + run-time, or "idle-time" (between program runs). + . + This package provides the OCaml bindings to develop applications using llvm. Package: llvm-4.0-doc Section: doc diff --git a/debian/rules b/debian/rules index a67ef42f..a949da26 100755 --- a/debian/rules +++ b/debian/rules @@ -22,8 +22,6 @@ DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_HOST_ARCH_BITS = $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS) DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) -#OCAML_STDLIB_DIR ?= $(shell ocamlc -where) - LDFLAGS_EXTRA = CXXFLAGS_EXTRA = -std=c++0x CONFIGURE_EXTRA = @@ -126,7 +124,6 @@ else COVERITY_ENABLE=0 endif - LLDB_ENABLE=yes LLDB_DISABLE_ARCHS := hurd-i386 ia64 ppc64el powerpc s390x sparc64 mips64el ppc64 # hurd has threading issues @@ -140,25 +137,34 @@ endif LLD_ENABLE=yes -%: - dh $@ -# --with ocaml +DH_OPTIONS= +OCAML_ENABLE= no +OCAML_ARCHS := amd64 arm64 armel armhf i386 +ifneq (,$(filter $(DEB_HOST_ARCH),$(OCAML_ARCHS))) +# Enable OCAML for this arch. + OCAML_ENABLE=yes + OCAML_STDLIB_DIR ?= $(shell ocamlc -where) + DH_OPTIONS=--with ocaml +endif +%: + dh $@ $(DH_OPTIONS) + preconfigure: for f in debian/*.in; do \ f2=$$(echo $$f | sed 's/\.in$$//;s/X\.Y/$(LLVM_VERSION)/'); \ echo "$$f => $$f2"; \ sed -e 's|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|g' \ + -e "s|@OCAML_STDLIB_DIR@|$(OCAML_STDLIB_DIR)|g" \ -e "s|@LLVM_VERSION_FULL@|$(LLVM_VERSION_FULL)|g" \ -e "s|@LLVM_VERSION@|$(LLVM_VERSION)|g" $$f > $$f2; \ done -# -e "s|@OCAML_STDLIB_DIR@|$(OCAML_STDLIB_DIR)|g" # Override this two targets. They are trying to manage the .in conversion for me -#override_dh_ocamlinit: -#override_dh_ocamlclean: +override_dh_ocamlinit: +override_dh_ocamlclean: override_dh_auto_configure: preconfigure echo "Using gcc: " @@ -273,7 +279,9 @@ override_dh_prep: build_doc build_doc: cd $(CURDIR)/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man cd $(CURDIR)/clang/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man -# $(PRE_PROCESS) $(MAKE) $(NJOBS) -C "$(TARGET_BUILD)/docs" ocaml_doc + if test "$(OCAML_ENABLE)" = yes; then \ + $(PRE_PROCESS) $(MAKE) $(NJOBS) -C "$(TARGET_BUILD)/docs" ocaml_doc; \ + fi # Continue if failing, Ubuntu precise cannot generate manpages as sphinx is too old -(cd $(TARGET_BUILD) && make $(NJOBS) docs-llvm-html docs-clang-html docs-clang-tools-html docs-polly-html docs-polly-man docs-clang-tools-man docs-clang-man docs-llvm-man) @@ -391,6 +399,7 @@ override_dh_auto_install: rm -rf clang/tools/scan-build-py-$(LLVM_VERSION) cp -fR $(CURDIR)/clang/tools/scan-build-py clang/tools/scan-build-py-$(LLVM_VERSION) + chmod +x clang/tools/scan-build-py-$(LLVM_VERSION)/bin/* rm -rf clang/tools/scan-view-$(LLVM_VERSION) cp -fR $(CURDIR)/clang/tools/scan-view clang/tools/scan-view-$(LLVM_VERSION) @@ -423,11 +432,13 @@ override_dh_auto_install: cp -R $(TARGET_BUILD)/tools/clang/tools/extra/docs/html $(CURDIR)/debian/usr/share/doc/clang-$(LLVM_VERSION)-doc/clang-extra # Rename OCaml bindings -# if test -d "$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml"; then \ -# mkdir -p "$(DEB_INST)$(OCAML_STDLIB_DIR)"; \ -# mv -f "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml" \ -# "$(DEB_INST)$(OCAML_STDLIB_DIR)/llvm-$(LLVM_VERSION)"; \ -# fi + if test "$(OCAML_ENABLE)" = yes; then \ + if test -d "$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml"; then \ + mkdir -p "$(DEB_INST)$(OCAML_STDLIB_DIR)"; \ + mv -f "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml" \ + "$(DEB_INST)$(OCAML_STDLIB_DIR)/llvm-$(LLVM_VERSION)"; \ + fi; \ + fi # Delete the target build directory to save some space on the build systems # All the files have been installed in $(CURDIR)/debian/tmp/ already From f5d24c59a151549940ab488a7431a2ff5f192b14 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 21 Apr 2017 20:25:03 +0000 Subject: [PATCH 09/70] Prepare version 4.0.1 --- debian/changelog | 6 ++++++ debian/rules | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 01258fbd..b937ccc2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-4.0 (1:4.0-5) unstable; urgency=medium + + * Prepare version 4.0.1 + + -- + llvm-toolchain-4.0 (1:4.0-4) unstable; urgency=medium * Limit the archs where the ocaml binding is built diff --git a/debian/rules b/debian/rules index a949da26..ca62eb9e 100755 --- a/debian/rules +++ b/debian/rules @@ -6,7 +6,7 @@ DEB_INST := $(CURDIR)/debian/tmp/ # accomodate that by hardcoding the 5 detection GCC_VERSION := $(shell dpkg-query -W -f '$${Version}' g++ | sed -rne 's,^([0-9]+:)?(5|6|[0-9]+\.[0-9]+|[0-9]+).*$$,\2,p') LLVM_VERSION := 4.0 -LLVM_VERSION_FULL := $(LLVM_VERSION).0 +LLVM_VERSION_FULL := $(LLVM_VERSION).1 SONAME_EXT := 1 # Manage the case when the version is 1:3.5~svn213052-1~exp1 or 1:3.4.2-1 From 891ca09f94bdbf57e47a1ce4807dc3b1e9570fc9 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 21 Apr 2017 20:26:39 +0000 Subject: [PATCH 10/70] Tolerate if ocaml failed --- debian/changelog | 1 + debian/rules | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index b937ccc2..3a08546d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ llvm-toolchain-4.0 (1:4.0-5) unstable; urgency=medium * Prepare version 4.0.1 + * Tolerate if ocaml failed -- diff --git a/debian/rules b/debian/rules index ca62eb9e..373be3aa 100755 --- a/debian/rules +++ b/debian/rules @@ -279,9 +279,9 @@ override_dh_prep: build_doc build_doc: cd $(CURDIR)/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man cd $(CURDIR)/clang/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man - if test "$(OCAML_ENABLE)" = yes; then \ + -(if test "$(OCAML_ENABLE)" = yes; then \ $(PRE_PROCESS) $(MAKE) $(NJOBS) -C "$(TARGET_BUILD)/docs" ocaml_doc; \ - fi + fi) # Continue if failing, Ubuntu precise cannot generate manpages as sphinx is too old -(cd $(TARGET_BUILD) && make $(NJOBS) docs-llvm-html docs-clang-html docs-clang-tools-html docs-polly-html docs-polly-man docs-clang-tools-man docs-clang-man docs-llvm-man) @@ -433,8 +433,9 @@ override_dh_auto_install: # Rename OCaml bindings if test "$(OCAML_ENABLE)" = yes; then \ + mkdir -p "$(DEB_INST)$(OCAML_STDLIB_DIR)"; \ + mkdir -p "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/share/doc/llvm/ocaml-html/"; \ if test -d "$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml"; then \ - mkdir -p "$(DEB_INST)$(OCAML_STDLIB_DIR)"; \ mv -f "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml" \ "$(DEB_INST)$(OCAML_STDLIB_DIR)/llvm-$(LLVM_VERSION)"; \ fi; \ From f656aa1dba640eab681e7d9db848b2f861e03e78 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 24 Apr 2017 12:56:33 +0000 Subject: [PATCH 11/70] workaround by creating one more dir --- debian/rules | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/rules b/debian/rules index 373be3aa..6f4aa394 100755 --- a/debian/rules +++ b/debian/rules @@ -434,6 +434,7 @@ override_dh_auto_install: # Rename OCaml bindings if test "$(OCAML_ENABLE)" = yes; then \ mkdir -p "$(DEB_INST)$(OCAML_STDLIB_DIR)"; \ + mkdir -p "$(DEB_INST)/usr/lib/ocaml/llvm-$(LLVM_VERSION)"; \ mkdir -p "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/share/doc/llvm/ocaml-html/"; \ if test -d "$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml"; then \ mv -f "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml" \ From 01da8eacbc1ce18ee5562c81dd9b4972f5c63f0b Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Apr 2017 11:32:44 +0000 Subject: [PATCH 12/70] Just like with snapshot, add libncurses in the list of build deps (Closes: #861170) --- debian/changelog | 4 +++- debian/control | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3a08546d..41b544fc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,10 @@ llvm-toolchain-4.0 (1:4.0-5) unstable; urgency=medium * Prepare version 4.0.1 * Tolerate if ocaml failed + * Just like with snapshot, add libncurses in the list of build deps + (Closes: #861170) - -- + -- Sylvestre Ledru Tue, 25 Apr 2017 13:32:25 +0200 llvm-toolchain-4.0 (1:4.0-4) unstable; urgency=medium diff --git a/debian/control b/debian/control index 594ca30f..a0976267 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Uploaders: Sylvestre Ledru Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, cmake, perl, libtool, chrpath, texinfo, sharutils, libffi-dev (>= 3.0.9), lsb-release, patchutils, diffstat, xz-utils, python-dev, - libedit-dev, swig, python-six, python-sphinx, binutils-dev, + libedit-dev, libncurses5-dev, swig, python-six, python-sphinx, binutils-dev, libjsoncpp-dev, lcov, procps, help2man, zlib1g-dev, ocaml-nox [amd64 arm64 armel armhf i386], From b403591216d36eecb038cf1780edb6f7ab10bea7 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Apr 2017 13:15:10 +0000 Subject: [PATCH 13/70] fix 4.0 --- debian/changelog | 3 +++ debian/rules | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 41b544fc..d069ec14 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,7 @@ llvm-toolchain-4.0 (1:4.0-5) unstable; urgency=medium + * Really fix "use versioned symbols" for llvm + Thanks to Julien Cristau for the patch (Closes: #849098) * Prepare version 4.0.1 * Tolerate if ocaml failed * Just like with snapshot, add libncurses in the list of build deps @@ -7,6 +9,7 @@ llvm-toolchain-4.0 (1:4.0-5) unstable; urgency=medium -- Sylvestre Ledru Tue, 25 Apr 2017 13:32:25 +0200 +>>>>>>> .r2572 llvm-toolchain-4.0 (1:4.0-4) unstable; urgency=medium * Limit the archs where the ocaml binding is built diff --git a/debian/rules b/debian/rules index 6f4aa394..cf8cdb30 100755 --- a/debian/rules +++ b/debian/rules @@ -448,9 +448,10 @@ override_dh_auto_install: override_dh_makeshlibs: - dh_makeshlibs dh_makeshlibs -plibclang$(SONAME_EXT)-$(LLVM_VERSION) -V"libclang$(SONAME_EXT)-$(LLVM_VERSION) (>= 1:4.0-3~)" dh_makeshlibs -pliblldb-$(LLVM_VERSION) -V"liblldb-$(LLVM_VERSION) (>= 1:4.0-3~)" + dh_makeshlibs -plibllvm-$(LLVM_VERSION) -V"libllvm-$(LLVM_VERSION) (>= 1:4.0-3~)" + dh_makeshlibs --remaining-packages override_dh_shlibdeps: # Ignore asan libraries. They would trigger dependencies to multiarch libraries From 168c2faa6a28b7ec8a997e639ef69fc270992f66 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Apr 2017 17:47:15 +0000 Subject: [PATCH 14/70] fix the package name --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index cf8cdb30..b263c786 100755 --- a/debian/rules +++ b/debian/rules @@ -450,7 +450,7 @@ override_dh_auto_install: override_dh_makeshlibs: dh_makeshlibs -plibclang$(SONAME_EXT)-$(LLVM_VERSION) -V"libclang$(SONAME_EXT)-$(LLVM_VERSION) (>= 1:4.0-3~)" dh_makeshlibs -pliblldb-$(LLVM_VERSION) -V"liblldb-$(LLVM_VERSION) (>= 1:4.0-3~)" - dh_makeshlibs -plibllvm-$(LLVM_VERSION) -V"libllvm-$(LLVM_VERSION) (>= 1:4.0-3~)" + dh_makeshlibs -plibllvm$(LLVM_VERSION) -V"libllvm$(LLVM_VERSION) (>= 1:4.0-3~)" dh_makeshlibs --remaining-packages override_dh_shlibdeps: From eb50971f63b660733b05564c6263d954029c3dbf Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Apr 2017 19:11:13 +0000 Subject: [PATCH 15/70] fix changelog --- debian/changelog | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d069ec14..cc7255a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,7 +9,6 @@ llvm-toolchain-4.0 (1:4.0-5) unstable; urgency=medium -- Sylvestre Ledru Tue, 25 Apr 2017 13:32:25 +0200 ->>>>>>> .r2572 llvm-toolchain-4.0 (1:4.0-4) unstable; urgency=medium * Limit the archs where the ocaml binding is built From 4e3d594ae3c6efc4344cd2c8982f632d0aaca9c6 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 27 Apr 2017 07:35:36 +0000 Subject: [PATCH 16/70] one more fake empty dir --- debian/rules | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/rules b/debian/rules index b263c786..e1e7479e 100755 --- a/debian/rules +++ b/debian/rules @@ -435,6 +435,7 @@ override_dh_auto_install: if test "$(OCAML_ENABLE)" = yes; then \ mkdir -p "$(DEB_INST)$(OCAML_STDLIB_DIR)"; \ mkdir -p "$(DEB_INST)/usr/lib/ocaml/llvm-$(LLVM_VERSION)"; \ + mkdir -p "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/docs/ocaml/html/html"; \ mkdir -p "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/share/doc/llvm/ocaml-html/"; \ if test -d "$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml"; then \ mv -f "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml" \ From 064d0062e5711283ab956e16ef973b3d8872954c Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 4 May 2017 16:11:19 +0000 Subject: [PATCH 17/70] try to fix the ocaml install dir --- debian/libllvm-X.Y-ocaml-dev.install.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/libllvm-X.Y-ocaml-dev.install.in b/debian/libllvm-X.Y-ocaml-dev.install.in index b1e302d3..d0d327cb 100644 --- a/debian/libllvm-X.Y-ocaml-dev.install.in +++ b/debian/libllvm-X.Y-ocaml-dev.install.in @@ -1,2 +1,2 @@ -@OCAML_STDLIB_DIR@/llvm-@LLVM_VERSION@ @OCAML_STDLIB_DIR@/ +@OCAML_STDLIB_DIR@ usr/lib/llvm-@LLVM_VERSION@/docs/ocaml/html/html usr/share/doc/libllvm-@LLVM_VERSION@-ocaml-dev/ From 96c6c1c882d6d1ba10baa506652c260c81e8d91b Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 6 May 2017 08:02:18 +0000 Subject: [PATCH 18/70] New snapshot release --- debian/changelog | 6 ++++++ debian/libllvm-X.Y-ocaml-dev.install.in | 1 + 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index cc7255a5..7b03d0ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-4.0 (1:4.0.1~+rc1-1) unstable; urgency=medium + + * New snapshot release + + -- Sylvestre Ledru Fri, 05 May 2017 09:44:42 +0200 + llvm-toolchain-4.0 (1:4.0-5) unstable; urgency=medium * Really fix "use versioned symbols" for llvm diff --git a/debian/libllvm-X.Y-ocaml-dev.install.in b/debian/libllvm-X.Y-ocaml-dev.install.in index d0d327cb..50370b3d 100644 --- a/debian/libllvm-X.Y-ocaml-dev.install.in +++ b/debian/libllvm-X.Y-ocaml-dev.install.in @@ -1,2 +1,3 @@ @OCAML_STDLIB_DIR@ usr/lib/llvm-@LLVM_VERSION@/docs/ocaml/html/html usr/share/doc/libllvm-@LLVM_VERSION@-ocaml-dev/ +usr/lib/llvm-@LLVM_VERSION@/share/doc/llvm/ocaml-html/ usr/share/doc/libllvm-@LLVM_VERSION@-ocaml-dev/ From 2d81a37090ff49ef30e3ed8a406241012602898b Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 6 May 2017 08:03:20 +0000 Subject: [PATCH 19/70] Only enable libfuzzer for Linux kernel. Thanks to Pino Toscano for the patch --- debian/changelog | 7 +++++++ debian/control | 2 +- debian/rules | 10 ++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7b03d0ca..1acafe22 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-4.0 (1:4.0.1~+rc1-2) unstable; urgency=medium + + * Only enable libfuzzer for Linux kernel. + Thanks to Pino Toscano for the patch + + -- Sylvestre Ledru Sat, 06 May 2017 10:03:14 +0200 + llvm-toolchain-4.0 (1:4.0.1~+rc1-1) unstable; urgency=medium * New snapshot release diff --git a/debian/control b/debian/control index a0976267..1c391756 100644 --- a/debian/control +++ b/debian/control @@ -166,7 +166,7 @@ Description: clang library - Common development package Package: libfuzzer-4.0-dev -Architecture: any +Architecture: linux-any Section: libdevel Depends: ${shlibs:Depends}, ${misc:Depends}, clang-4.0 (= ${binary:Version}) Description: Library for coverage-guided fuzz testing diff --git a/debian/rules b/debian/rules index e1e7479e..93b0abbc 100755 --- a/debian/rules +++ b/debian/rules @@ -21,6 +21,7 @@ DEB_HOST_MULTIARCH = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_HOST_ARCH_BITS = $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS) DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_ARCH_OS = $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) LDFLAGS_EXTRA = CXXFLAGS_EXTRA = -std=c++0x @@ -147,6 +148,11 @@ ifneq (,$(filter $(DEB_HOST_ARCH),$(OCAML_ARCHS))) DH_OPTIONS=--with ocaml endif +LIBFUZZER_ENABLE=yes +ifeq (,$(filter $(DEB_HOST_ARCH_OS),linux)) + LIBFUZZER_ENABLE=no +endif + %: dh $@ $(DH_OPTIONS) @@ -266,12 +272,14 @@ override_dh_auto_configure: preconfigure override_dh_auto_build: $(PRE_PROCESS) $(MAKE) $(NJOBS) -C $(TARGET_BUILD) VERBOSE=1 CLANG_VENDOR=$(VENDOR) CXXFLAGS="$(CXXFLAGS_EXTRA)" LDFLAGS="$(LDFLAGS_EXTRA)" REQUIRES_RTTI=1 DEBUGMAKE=1 +ifeq (${LIBFUZZER_ENABLE},yes) cd $(TARGET_BUILD) \ CFLAGS=`dpkg-buildflags --get CFLAGS`; \ CFLAGS="$$CFLAGS `dpkg-buildflags --get CPPFLAGS`"; \ echo $$CFLAGS; \ bin/clang++ -c $$CFLAGS -std=c++11 ../lib/Fuzzer/*.cpp -IFuzzer; \ ar ruv libFuzzer.a Fuzzer*.o +endif override_dh_prep: build_doc dh_prep @@ -340,8 +348,10 @@ override_dh_auto_install: mkdir -p $(CURDIR)/debian/clang-$(LLVM_VERSION)/usr/bin/ cp compiler-rt/lib/asan/scripts/asan_symbolize.py $(CURDIR)/debian/clang-$(LLVM_VERSION)/usr/bin/asan_symbolize-$(LLVM_VERSION) +ifeq (${LIBFUZZER_ENABLE},yes) mkdir -p $(CURDIR)/debian/libfuzzer-$(LLVM_VERSION)-dev/usr/lib/llvm-$(LLVM_VERSION)/lib/ cp -v $(TARGET_BUILD)/libFuzzer.a $(CURDIR)/debian/libfuzzer-$(LLVM_VERSION)-dev/usr/lib/llvm-$(LLVM_VERSION)/lib/ +endif # Create this fake directory to make the install libclang-common-dev happy # under the unsupported archs of compiler-rt From a1e0900c922d861356f83ec8813c6b5c5516abe5 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 7 May 2017 18:40:48 +0000 Subject: [PATCH 20/70] Fix the version --- debian/rules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index 93b0abbc..3cd1a198 100755 --- a/debian/rules +++ b/debian/rules @@ -459,9 +459,9 @@ endif override_dh_makeshlibs: - dh_makeshlibs -plibclang$(SONAME_EXT)-$(LLVM_VERSION) -V"libclang$(SONAME_EXT)-$(LLVM_VERSION) (>= 1:4.0-3~)" - dh_makeshlibs -pliblldb-$(LLVM_VERSION) -V"liblldb-$(LLVM_VERSION) (>= 1:4.0-3~)" - dh_makeshlibs -plibllvm$(LLVM_VERSION) -V"libllvm$(LLVM_VERSION) (>= 1:4.0-3~)" + dh_makeshlibs -plibclang$(SONAME_EXT)-$(LLVM_VERSION) -V"libclang$(SONAME_EXT)-$(LLVM_VERSION) (>= 1:4.0)" + dh_makeshlibs -pliblldb-$(LLVM_VERSION) -V"liblldb-$(LLVM_VERSION) (>= 1:4.0)" + dh_makeshlibs -plibllvm$(LLVM_VERSION) -V"libllvm$(LLVM_VERSION) (>= 1:4.0)" dh_makeshlibs --remaining-packages override_dh_shlibdeps: From df5376c47d3e985b527272da615baa8692c4907a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 8 May 2017 08:12:56 +0000 Subject: [PATCH 21/70] try something else for the version --- debian/rules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index 3cd1a198..b5d50f88 100755 --- a/debian/rules +++ b/debian/rules @@ -459,9 +459,9 @@ endif override_dh_makeshlibs: - dh_makeshlibs -plibclang$(SONAME_EXT)-$(LLVM_VERSION) -V"libclang$(SONAME_EXT)-$(LLVM_VERSION) (>= 1:4.0)" - dh_makeshlibs -pliblldb-$(LLVM_VERSION) -V"liblldb-$(LLVM_VERSION) (>= 1:4.0)" - dh_makeshlibs -plibllvm$(LLVM_VERSION) -V"libllvm$(LLVM_VERSION) (>= 1:4.0)" + dh_makeshlibs -plibclang$(SONAME_EXT)-$(LLVM_VERSION) -V"libclang$(SONAME_EXT)-$(LLVM_VERSION) (>= 1:4.0~)" + dh_makeshlibs -pliblldb-$(LLVM_VERSION) -V"liblldb-$(LLVM_VERSION) (>= 1:4.0~)" + dh_makeshlibs -plibllvm$(LLVM_VERSION) -V"libllvm$(LLVM_VERSION) (>= 1:4.0~)" dh_makeshlibs --remaining-packages override_dh_shlibdeps: From df8ce22b7b1df7c6fe14efb48a04a361898ec643 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 24 May 2017 07:14:16 +0000 Subject: [PATCH 22/70] Remove clang-tblgen from clang-X.Y (done by upstream) --- debian/changelog | 6 ++++++ debian/libclang-common-X.Y-dev.install.in | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1acafe22..2d5e646a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-4.0 (1:4.0.1~+rc1-3) UNRELEASED; urgency=medium + + * Remove clang-tblgen from clang-X.Y (done by upstream) + + -- Sylvestre Ledru Wed, 24 May 2017 09:13:54 +0200 + llvm-toolchain-4.0 (1:4.0.1~+rc1-2) unstable; urgency=medium * Only enable libfuzzer for Linux kernel. diff --git a/debian/libclang-common-X.Y-dev.install.in b/debian/libclang-common-X.Y-dev.install.in index 3d9d13ef..7b154f8f 100644 --- a/debian/libclang-common-X.Y-dev.install.in +++ b/debian/libclang-common-X.Y-dev.install.in @@ -6,9 +6,7 @@ usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION_FULL@/*.txt #usr/lib/clang/@LLVM_VERSION_FULL@/lib /usr/lib/clang/@LLVM_VERSION@/ #usr/lib/clang/@LLVM_VERSION_FULL@/include/ /usr/include/clang/@LLVM_VERSION@/ -usr/lib/llvm-@LLVM_VERSION@/bin/clang-tblgen usr/lib/llvm-@LLVM_VERSION@/bin/yaml-bench -usr/bin/clang-tblgen-@LLVM_VERSION@ usr/bin/yaml-bench-@LLVM_VERSION@ From 32094e8554a2517d8c6516c49022e8ebdf664859 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 24 May 2017 07:14:59 +0000 Subject: [PATCH 23/70] remove other references to tblgen --- debian/clang-X.Y.lintian-overrides.in | 1 - debian/rules | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/clang-X.Y.lintian-overrides.in b/debian/clang-X.Y.lintian-overrides.in index ab2dbaed..f7b9e876 100644 --- a/debian/clang-X.Y.lintian-overrides.in +++ b/debian/clang-X.Y.lintian-overrides.in @@ -3,7 +3,6 @@ clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang- clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/scan-view.1.gz clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-apply-replacements-@LLVM_VERSION@.1.gz clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-check-@LLVM_VERSION@.1.gz -clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-tblgen-@LLVM_VERSION@.1.gz clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/scan-view-@LLVM_VERSION@.1.gz # Does not link otherwise clang-@LLVM_VERSION@: embedded-library usr/lib/llvm-@LLVM_VERSION@/bin/clang: libjsoncpp diff --git a/debian/rules b/debian/rules index b5d50f88..d1cbc83e 100755 --- a/debian/rules +++ b/debian/rules @@ -317,7 +317,7 @@ build_doc: help2man --version-string=$(LLVM_VERSION) --no-discard-stderr clang/tools/scan-view/bin/scan-view > debian/man/scan-view-$(LLVM_VERSION).1 help2man --version-string=$(LLVM_VERSION) --no-discard-stderr clang/tools/clang-format/clang-format-diff.py > debian/man/clang-format-diff-$(LLVM_VERSION).1 - CMDS="llvm-dwarfdump llvm-mc llvm-mcmarkup llvm-objdump llvm-rtdyld llvm-size llvm-ranlib lldb lldb-mi clang-format clang clang-tblgen clang-check clang-tidy clang-apply-replacements clang-rename clang-query pp-trace sancov lli modularize clang-include-fixer find-all-symbols clang-reorder-fields"; \ + CMDS="llvm-dwarfdump llvm-mc llvm-mcmarkup llvm-objdump llvm-rtdyld llvm-size llvm-ranlib lldb lldb-mi clang-format clang clang-check clang-tidy clang-apply-replacements clang-rename clang-query pp-trace sancov lli modularize clang-include-fixer find-all-symbols clang-reorder-fields"; \ for f in $$CMDS; do \ echo "Generating manpage of $$f"; \ LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot help2man --version-string=$(LLVM_VERSION) --no-discard-stderr $(TARGET_BUILD)/bin/$$f > debian/man/$$f-$(LLVM_VERSION).1; \ From a7af3f03351b0b58a1d7209b57f9c400342ada88 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 3 Jun 2017 15:50:16 +0000 Subject: [PATCH 24/70] * Try to fix polly on hurd (missing PATH_MAX) * New snapshot release --- debian/changelog | 11 +++++++-- debian/patches/hurd-pathmax.diff | 42 ++++++++++++++++++++++---------- 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2d5e646a..9fc2ab19 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,15 @@ -llvm-toolchain-4.0 (1:4.0.1~+rc1-3) UNRELEASED; urgency=medium +llvm-toolchain-4.0 (1:4.0.1~+rc2-2) UNRELEASED; urgency=medium + * Try to fix polly on hurd (missing PATH_MAX) + + -- Sylvestre Ledru Sat, 03 Jun 2017 17:49:48 +0200 + +llvm-toolchain-4.0 (1:4.0.1~+rc2-1) unstable; urgency=medium + + * New snapshot release * Remove clang-tblgen from clang-X.Y (done by upstream) - -- Sylvestre Ledru Wed, 24 May 2017 09:13:54 +0200 + -- Sylvestre Ledru Thu, 01 Jun 2017 23:01:38 +0200 llvm-toolchain-4.0 (1:4.0.1~+rc1-2) unstable; urgency=medium diff --git a/debian/patches/hurd-pathmax.diff b/debian/patches/hurd-pathmax.diff index 8ec6b901..229c9d52 100644 --- a/debian/patches/hurd-pathmax.diff +++ b/debian/patches/hurd-pathmax.diff @@ -1,7 +1,7 @@ -Index: llvm-toolchain-snapshot_4.0~svn280802/clang/lib/Basic/FileManager.cpp +Index: llvm-toolchain-4.0-4.0.1~+rc2/clang/lib/Basic/FileManager.cpp =================================================================== ---- llvm-toolchain-snapshot_4.0~svn280802.orig/clang/lib/Basic/FileManager.cpp -+++ llvm-toolchain-snapshot_4.0~svn280802/clang/lib/Basic/FileManager.cpp +--- llvm-toolchain-4.0-4.0.1~+rc2.orig/clang/lib/Basic/FileManager.cpp ++++ llvm-toolchain-4.0-4.0.1~+rc2/clang/lib/Basic/FileManager.cpp @@ -500,6 +500,12 @@ void FileManager::invalidateCache(const UniqueRealFiles.erase(Entry->getUniqueID()); } @@ -15,10 +15,10 @@ Index: llvm-toolchain-snapshot_4.0~svn280802/clang/lib/Basic/FileManager.cpp void FileManager::GetUniqueIDMapping( SmallVectorImpl &UIDToFiles) const { UIDToFiles.clear(); -Index: llvm-toolchain-snapshot_4.0~svn280802/lldb/include/lldb/lldb-defines.h +Index: llvm-toolchain-4.0-4.0.1~+rc2/lldb/include/lldb/lldb-defines.h =================================================================== ---- llvm-toolchain-snapshot_4.0~svn280802.orig/lldb/include/lldb/lldb-defines.h -+++ llvm-toolchain-snapshot_4.0~svn280802/lldb/include/lldb/lldb-defines.h +--- llvm-toolchain-4.0-4.0.1~+rc2.orig/lldb/include/lldb/lldb-defines.h ++++ llvm-toolchain-4.0-4.0.1~+rc2/lldb/include/lldb/lldb-defines.h @@ -28,6 +28,11 @@ #define INT32_MAX 2147483647 #endif @@ -31,10 +31,10 @@ Index: llvm-toolchain-snapshot_4.0~svn280802/lldb/include/lldb/lldb-defines.h #if !defined(UINT32_MAX) #define UINT32_MAX 4294967295U #endif -Index: llvm-toolchain-snapshot_4.0~svn280802/lib/Support/Unix/Path.inc +Index: llvm-toolchain-4.0-4.0.1~+rc2/lib/Support/Unix/Path.inc =================================================================== ---- llvm-toolchain-snapshot_4.0~svn280802.orig/lib/Support/Unix/Path.inc -+++ llvm-toolchain-snapshot_4.0~svn280802/lib/Support/Unix/Path.inc +--- llvm-toolchain-4.0-4.0.1~+rc2.orig/lib/Support/Unix/Path.inc ++++ llvm-toolchain-4.0-4.0.1~+rc2/lib/Support/Unix/Path.inc @@ -62,6 +62,7 @@ // For GNU Hurd #if defined(__GNU__) && !defined(PATH_MAX) @@ -43,11 +43,11 @@ Index: llvm-toolchain-snapshot_4.0~svn280802/lib/Support/Unix/Path.inc #endif #include -Index: llvm-toolchain-snapshot_4.0~svn280802/tools/dsymutil/DwarfLinker.cpp +Index: llvm-toolchain-4.0-4.0.1~+rc2/tools/dsymutil/DwarfLinker.cpp =================================================================== ---- llvm-toolchain-snapshot_4.0~svn280802.orig/tools/dsymutil/DwarfLinker.cpp -+++ llvm-toolchain-snapshot_4.0~svn280802/tools/dsymutil/DwarfLinker.cpp -@@ -41,6 +41,11 @@ +--- llvm-toolchain-4.0-4.0.1~+rc2.orig/tools/dsymutil/DwarfLinker.cpp ++++ llvm-toolchain-4.0-4.0.1~+rc2/tools/dsymutil/DwarfLinker.cpp +@@ -42,6 +42,11 @@ #include #include @@ -59,3 +59,19 @@ Index: llvm-toolchain-snapshot_4.0~svn280802/tools/dsymutil/DwarfLinker.cpp namespace llvm { namespace dsymutil { +Index: llvm-toolchain-4.0-4.0.1~+rc2/polly/lib/External/ppcg/cuda_common.c +=================================================================== +--- llvm-toolchain-4.0-4.0.1~+rc2.orig/polly/lib/External/ppcg/cuda_common.c ++++ llvm-toolchain-4.0-4.0.1~+rc2/polly/lib/External/ppcg/cuda_common.c +@@ -15,6 +15,11 @@ + #include "cuda_common.h" + #include "ppcg.h" + ++// For GNU Hurd ++#if defined(__GNU__) && !defined(PATH_MAX) ++# define PATH_MAX 4096 ++#endif ++ + /* Open the host .cu file and the kernel .hu and .cu files for writing. + * Add the necessary includes. + */ From fe9a3483af9c720d33793f078919bc01e1a39701 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Sun, 4 Jun 2017 18:09:12 +0000 Subject: [PATCH 25/70] Re-add missign clang-doc documentation --- debian/changelog | 5 +++++ debian/clang-X.Y-doc.docs.in | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 debian/clang-X.Y-doc.docs.in diff --git a/debian/changelog b/debian/changelog index 9fc2ab19..8b1751ea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,12 @@ llvm-toolchain-4.0 (1:4.0.1~+rc2-2) UNRELEASED; urgency=medium + [ Sylvestre Ledru ] * Try to fix polly on hurd (missing PATH_MAX) + [ Gianfranco Costamagna ] + * Fix clang-doc generation + - there was a missing install file + -- Sylvestre Ledru Sat, 03 Jun 2017 17:49:48 +0200 llvm-toolchain-4.0 (1:4.0.1~+rc2-1) unstable; urgency=medium diff --git a/debian/clang-X.Y-doc.docs.in b/debian/clang-X.Y-doc.docs.in new file mode 100644 index 00000000..b3cc6a07 --- /dev/null +++ b/debian/clang-X.Y-doc.docs.in @@ -0,0 +1,2 @@ +tools/clang/docs/_build/html/ + From 8f5fabb223141d303d6d10b8a3c9b3040747b3be Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 14 Jun 2017 08:21:19 +0000 Subject: [PATCH 26/70] Improve the repack script for rc builds --- debian/orig-tar.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh index 73376f7d..23e2ebe9 100755 --- a/debian/orig-tar.sh +++ b/debian/orig-tar.sh @@ -12,7 +12,7 @@ set -e # TODO rest of the options # To create an rc1 release: -# sh 3.4/debian/orig-tar.sh RELEASE_34 rc1 +# sh 4.0/debian/orig-tar.sh RELEASE_40 rc1 SVN_BASE_URL=http://llvm.org/svn/llvm-project/ MAJOR_VERSION=4.0 @@ -20,16 +20,20 @@ CURRENT_VERSION=4.0 # Should be changed to 3.5.1 later if test -n "$1"; then # http://llvm.org/svn/llvm-project/{cfe,llvm,compiler-rt,...}/branches/google/stable/ -# For example: sh 3.4/debian/orig-tar.sh release_34 +# For example: sh 4.0/debian/orig-tar.sh release_400 BRANCH=$1 fi if test -n "$1" -a -n "$2"; then # http://llvm.org/svn/llvm-project/{cfe,llvm,compiler-rt,...}/tags/RELEASE_34/rc1/ -# For example: sh 3.4/debian/orig-tar.sh RELEASE_34 rc2 +# For example: sh 4.0/debian/orig-tar.sh RELEASE_401 rc3 4.0.1 BRANCH=$1 TAG=$2 RCRELEASE="true" + if test -z "$3"; then + echo "Please provide the exact version. Used for the tarball name Ex: 4.0.1" + fi + EXACT_VERSION=$3 fi get_svn_url() { @@ -108,9 +112,9 @@ fi if test -n "$RCRELEASE"; then if test "$TAG" = "final"; then - VERSION=$MAJOR_VERSION + VERSION=$EXACT_VERSION else - VERSION=$MAJOR_VERSION"~+"$TAG + VERSION=$EXACT_VERSION"~+"$TAG fi FULL_VERSION="llvm-toolchain-"$MAJOR_VERSION"_"$VERSION else From cf8e5b7a575a3eda23805c0436d6616c62aed391 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 14 Jun 2017 13:27:50 +0000 Subject: [PATCH 27/70] new snapshot release --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8b1751ea..301f4a80 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,13 +1,14 @@ -llvm-toolchain-4.0 (1:4.0.1~+rc2-2) UNRELEASED; urgency=medium +llvm-toolchain-4.0 (1:4.0.1~+rc3-1) unstable; urgency=medium [ Sylvestre Ledru ] * Try to fix polly on hurd (missing PATH_MAX) + * New snapshot release [ Gianfranco Costamagna ] * Fix clang-doc generation - there was a missing install file - -- Sylvestre Ledru Sat, 03 Jun 2017 17:49:48 +0200 + -- Sylvestre Ledru Wed, 14 Jun 2017 09:59:59 +0200 llvm-toolchain-4.0 (1:4.0.1~+rc2-1) unstable; urgency=medium From 163adaa3098983cb6c2317520e7b3173f85d06ef Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 14 Jun 2017 17:06:37 +0000 Subject: [PATCH 28/70] Add libomp-dev to the suggests of clang --- debian/changelog | 6 ++++++ debian/control | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 301f4a80..3a0f753a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-4.0 (1:4.0.1~+rc3-2) unstable; urgency=medium + + * Add libomp-dev to the suggests of clang + + -- Sylvestre Ledru Wed, 14 Jun 2017 19:06:20 +0200 + llvm-toolchain-4.0 (1:4.0.1~+rc3-1) unstable; urgency=medium [ Sylvestre Ledru ] diff --git a/debian/control b/debian/control index 1c391756..4ba21da1 100644 --- a/debian/control +++ b/debian/control @@ -30,7 +30,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, libclang1-4.0 (= ${binary:Version}), libc6-dev, binutils Provides: c-compiler, objc-compiler, c++-compiler Recommends: llvm-4.0-dev, python -Suggests: gnustep, gnustep-devel, clang-4.0-doc +Suggests: gnustep, gnustep-devel, clang-4.0-doc, libomp-dev Replaces: clang-3.1, clang-3.2, clang-3.3, clang-3.4 (<< 1:3.4.2-7~exp1), clang-3.5 (<< 1:3.5~+rc1-3~exp1), compiler-rt, clang-include-fixer-4.0 From 517001d21180de98306e64caa710ebf5b9e5b3d3 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 18 Jun 2017 20:21:10 +0000 Subject: [PATCH 29/70] Add the ld.lld manpage --- debian/changelog | 1 + debian/rules | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3a0f753a..d61f435f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ llvm-toolchain-4.0 (1:4.0.1~+rc3-2) unstable; urgency=medium * Add libomp-dev to the suggests of clang + * Add the ld.lld manpage -- Sylvestre Ledru Wed, 14 Jun 2017 19:06:20 +0200 diff --git a/debian/rules b/debian/rules index d1cbc83e..7916fc1a 100755 --- a/debian/rules +++ b/debian/rules @@ -317,7 +317,7 @@ build_doc: help2man --version-string=$(LLVM_VERSION) --no-discard-stderr clang/tools/scan-view/bin/scan-view > debian/man/scan-view-$(LLVM_VERSION).1 help2man --version-string=$(LLVM_VERSION) --no-discard-stderr clang/tools/clang-format/clang-format-diff.py > debian/man/clang-format-diff-$(LLVM_VERSION).1 - CMDS="llvm-dwarfdump llvm-mc llvm-mcmarkup llvm-objdump llvm-rtdyld llvm-size llvm-ranlib lldb lldb-mi clang-format clang clang-check clang-tidy clang-apply-replacements clang-rename clang-query pp-trace sancov lli modularize clang-include-fixer find-all-symbols clang-reorder-fields"; \ + CMDS="llvm-dwarfdump llvm-mc llvm-mcmarkup llvm-objdump llvm-rtdyld llvm-size llvm-ranlib lldb lldb-mi clang-format clang clang-check clang-tidy clang-apply-replacements clang-rename clang-query pp-trace sancov lli modularize clang-include-fixer find-all-symbols clang-reorder-fields ld.lld"; \ for f in $$CMDS; do \ echo "Generating manpage of $$f"; \ LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot help2man --version-string=$(LLVM_VERSION) --no-discard-stderr $(TARGET_BUILD)/bin/$$f > debian/man/$$f-$(LLVM_VERSION).1; \ From 75087aa4a6fbff930dc119926dec719a0fd522d8 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 18 Jun 2017 21:00:54 +0000 Subject: [PATCH 30/70] Add Provides on python-lldb-x.y & python-clang-x.y & libllvm-x.y-ocaml-dev to avoid the recurring problem about conflicts (Closes: #835546, #863739, #863742) --- debian/changelog | 3 +++ debian/control | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index d61f435f..6ad4111f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ llvm-toolchain-4.0 (1:4.0.1~+rc3-2) unstable; urgency=medium * Add libomp-dev to the suggests of clang * Add the ld.lld manpage + * Add Provides on python-lldb-x.y & python-clang-x.y & libllvm-x.y-ocaml-dev + to avoid the recurring problem about conflicts + (Closes: #835546, #863739, #863742) -- Sylvestre Ledru Wed, 14 Jun 2017 19:06:20 +0200 diff --git a/debian/control b/debian/control index 4ba21da1..fedf7402 100644 --- a/debian/control +++ b/debian/control @@ -190,8 +190,10 @@ Package: python-clang-4.0 Section: python Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, python -Replaces: python-clang-3.3, python-clang-3.4, python-clang-3.5, python-clang-3.6, python-clang-3.7, python-clang-3.8, python-clang-3.9 +Replaces: python-clang-3.3, python-clang-3.4, python-clang-3.5, python-clang-3.6, python-clang-3.7, python-clang-3.8, python-clang-3.9, python-clang-x.y Breaks: python-clang-3.3, python-clang-3.4, python-clang-3.5, python-clang-3.6, python-clang-3.7, python-clang-3.8, python-clang-3.9 +Conflicts: python-clang-x.y +Provides: python-clang-x.y Description: Clang Python Bindings Clang project is a C, C++, Objective C and Objective C++ front-end for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler @@ -342,7 +344,9 @@ Section: ocaml Architecture: amd64 arm64 armel armhf i386 Suggests: llvm-4.0-doc Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-4.0-dev (= ${binary:Version}) -Provides: ${ocaml:Provides} +Replaces: libllvm-x.y-ocaml-dev +Conflicts: libllvm-x.y-ocaml-dev +Provides: ${ocaml:Provides}, libllvm-x.y-ocaml-dev Description: Modular compiler and toolchain technologies, OCaml bindings LLVM is a collection of libraries and tools that make it easy to build compilers, optimizers, just-in-time code generators, and many other @@ -501,7 +505,9 @@ Section: python Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k powerpcspe sh4 x32 mips mipsel arm64 # ia64 mips mipsel hurd ppc64 ppc64el alpha s390x powerpc sparc64 have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, liblldb-4.0-dev, python, python-six -Conflicts: python-lldb-3.4, python-lldb-3.5, python-lldb-3.6, python-lldb-3.7, python-lldb-3.8, python-lldb-3.9 +Conflicts: python-lldb-3.4, python-lldb-3.5, python-lldb-3.6, python-lldb-3.7, python-lldb-3.8, python-lldb-3.9, python-lldb-x.y +Replaces: python-lldb-x.y +Provides: python-lldb-x.y Pre-Depends: ${misc:Pre-Depends} Description: Next generation, high-performance debugger, python lib LLDB is a next generation, high-performance debugger. It is built as a set of From c84be606abd11ab8c91b401a1e7c415fe6b77378 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 18 Jun 2017 21:16:39 +0000 Subject: [PATCH 31/70] * Standards-Version => 4.0.0 * Generate the llvm-tblgen manpage --- debian/changelog | 2 ++ debian/control | 2 +- debian/rules | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6ad4111f..5f5da4b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ llvm-toolchain-4.0 (1:4.0.1~+rc3-2) unstable; urgency=medium * Add Provides on python-lldb-x.y & python-clang-x.y & libllvm-x.y-ocaml-dev to avoid the recurring problem about conflicts (Closes: #835546, #863739, #863742) + * Standards-Version => 4.0.0 + * Generate the llvm-tblgen manpage -- Sylvestre Ledru Wed, 14 Jun 2017 19:06:20 +0200 diff --git a/debian/control b/debian/control index fedf7402..f894753c 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32] Build-Conflicts: oprofile, ocaml, libllvm-3.4-ocaml-dev, libllvm-3.5-ocaml-dev, libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev -Standards-Version: 3.9.8 +Standards-Version: 4.0.0 Homepage: http://www.llvm.org/ Vcs-Svn: svn://anonscm.debian.org/svn/pkg-llvm/llvm-toolchain/branches/4.0/ Vcs-Browser: https://svn.debian.org/viewsvn/pkg-llvm/llvm-toolchain/branches/4.0/ diff --git a/debian/rules b/debian/rules index 7916fc1a..080461fe 100755 --- a/debian/rules +++ b/debian/rules @@ -317,7 +317,7 @@ build_doc: help2man --version-string=$(LLVM_VERSION) --no-discard-stderr clang/tools/scan-view/bin/scan-view > debian/man/scan-view-$(LLVM_VERSION).1 help2man --version-string=$(LLVM_VERSION) --no-discard-stderr clang/tools/clang-format/clang-format-diff.py > debian/man/clang-format-diff-$(LLVM_VERSION).1 - CMDS="llvm-dwarfdump llvm-mc llvm-mcmarkup llvm-objdump llvm-rtdyld llvm-size llvm-ranlib lldb lldb-mi clang-format clang clang-check clang-tidy clang-apply-replacements clang-rename clang-query pp-trace sancov lli modularize clang-include-fixer find-all-symbols clang-reorder-fields ld.lld"; \ + CMDS="llvm-dwarfdump llvm-mc llvm-mcmarkup llvm-objdump llvm-rtdyld llvm-size llvm-ranlib lldb lldb-mi clang-format clang clang-check clang-tidy clang-apply-replacements clang-rename clang-query pp-trace sancov lli modularize clang-include-fixer find-all-symbols clang-reorder-fields ld.lld llvm-tblgen"; \ for f in $$CMDS; do \ echo "Generating manpage of $$f"; \ LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot help2man --version-string=$(LLVM_VERSION) --no-discard-stderr $(TARGET_BUILD)/bin/$$f > debian/man/$$f-$(LLVM_VERSION).1; \ From cd5079caf15b65f3af610e690640bd1563de85fa Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 18 Jun 2017 21:17:43 +0000 Subject: [PATCH 32/70] precision --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 5f5da4b4..aa65d24c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,7 +6,7 @@ llvm-toolchain-4.0 (1:4.0.1~+rc3-2) unstable; urgency=medium to avoid the recurring problem about conflicts (Closes: #835546, #863739, #863742) * Standards-Version => 4.0.0 - * Generate the llvm-tblgen manpage + * Generate the llvm-tblgen & lld manpages -- Sylvestre Ledru Wed, 14 Jun 2017 19:06:20 +0200 From 5f73df6037b9be371356e69a04879994c2414ea8 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 19 Jun 2017 06:41:09 +0000 Subject: [PATCH 33/70] Generate the llvm-tblgen, clang-change-namespace, clang-offload-bundler lld, clang++, clang-check, clang-cpp & clang-import-test manpages --- debian/changelog | 3 ++- debian/liblld-X.Y.install.in | 1 - debian/rules | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index aa65d24c..d787e3e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,7 +6,8 @@ llvm-toolchain-4.0 (1:4.0.1~+rc3-2) unstable; urgency=medium to avoid the recurring problem about conflicts (Closes: #835546, #863739, #863742) * Standards-Version => 4.0.0 - * Generate the llvm-tblgen & lld manpages + * Generate the llvm-tblgen, clang-change-namespace, clang-offload-bundler + lld, clang++, clang-check, clang-cpp & clang-import-test manpages -- Sylvestre Ledru Wed, 14 Jun 2017 19:06:20 +0200 diff --git a/debian/liblld-X.Y.install.in b/debian/liblld-X.Y.install.in index 475da624..9e815c20 100644 --- a/debian/liblld-X.Y.install.in +++ b/debian/liblld-X.Y.install.in @@ -7,4 +7,3 @@ usr/lib/llvm-@LLVM_VERSION@/lib/liblldELF.a usr/lib/llvm-@LLVM_VERSION@/lib/liblldCore.a usr/lib/llvm-@LLVM_VERSION@/lib/liblldMachO.a usr/lib/llvm-@LLVM_VERSION@/lib/liblldCOFF.a - diff --git a/debian/rules b/debian/rules index 080461fe..9b9abd1b 100755 --- a/debian/rules +++ b/debian/rules @@ -317,7 +317,7 @@ build_doc: help2man --version-string=$(LLVM_VERSION) --no-discard-stderr clang/tools/scan-view/bin/scan-view > debian/man/scan-view-$(LLVM_VERSION).1 help2man --version-string=$(LLVM_VERSION) --no-discard-stderr clang/tools/clang-format/clang-format-diff.py > debian/man/clang-format-diff-$(LLVM_VERSION).1 - CMDS="llvm-dwarfdump llvm-mc llvm-mcmarkup llvm-objdump llvm-rtdyld llvm-size llvm-ranlib lldb lldb-mi clang-format clang clang-check clang-tidy clang-apply-replacements clang-rename clang-query pp-trace sancov lli modularize clang-include-fixer find-all-symbols clang-reorder-fields ld.lld llvm-tblgen"; \ + CMDS="llvm-dwarfdump llvm-mc llvm-mcmarkup llvm-objdump llvm-rtdyld llvm-size llvm-ranlib lldb lldb-mi clang-format clang clang++ clang-check clang-cpp clang-import-test clang-tidy clang-apply-replacements clang-rename clang-query pp-trace sancov lli modularize clang-include-fixer find-all-symbols clang-reorder-fields ld.lld llvm-tblgen clang-change-namespace clang-offload-bundler"; \ for f in $$CMDS; do \ echo "Generating manpage of $$f"; \ LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot help2man --version-string=$(LLVM_VERSION) --no-discard-stderr $(TARGET_BUILD)/bin/$$f > debian/man/$$f-$(LLVM_VERSION).1; \ From ca23c679f631c49e182560e905d2e33c8173869d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 19 Jun 2017 12:27:12 +0000 Subject: [PATCH 34/70] Remove the --no-discard-stderr option from help2man calls --- debian/changelog | 1 + debian/rules | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index d787e3e0..0254f5f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ llvm-toolchain-4.0 (1:4.0.1~+rc3-2) unstable; urgency=medium * Standards-Version => 4.0.0 * Generate the llvm-tblgen, clang-change-namespace, clang-offload-bundler lld, clang++, clang-check, clang-cpp & clang-import-test manpages + * Remove the --no-discard-stderr option from help2man calls -- Sylvestre Ledru Wed, 14 Jun 2017 19:06:20 +0200 diff --git a/debian/rules b/debian/rules index 9b9abd1b..8f944cf6 100755 --- a/debian/rules +++ b/debian/rules @@ -314,13 +314,13 @@ build_doc: cd $$d && rm -f underscore.js && ln -s /usr/share/javascript/underscore/underscore.js && cd -; \ done - help2man --version-string=$(LLVM_VERSION) --no-discard-stderr clang/tools/scan-view/bin/scan-view > debian/man/scan-view-$(LLVM_VERSION).1 - help2man --version-string=$(LLVM_VERSION) --no-discard-stderr clang/tools/clang-format/clang-format-diff.py > debian/man/clang-format-diff-$(LLVM_VERSION).1 + help2man --version-string=$(LLVM_VERSION) clang/tools/scan-view/bin/scan-view > debian/man/scan-view-$(LLVM_VERSION).1 + help2man --version-string=$(LLVM_VERSION) clang/tools/clang-format/clang-format-diff.py > debian/man/clang-format-diff-$(LLVM_VERSION).1 CMDS="llvm-dwarfdump llvm-mc llvm-mcmarkup llvm-objdump llvm-rtdyld llvm-size llvm-ranlib lldb lldb-mi clang-format clang clang++ clang-check clang-cpp clang-import-test clang-tidy clang-apply-replacements clang-rename clang-query pp-trace sancov lli modularize clang-include-fixer find-all-symbols clang-reorder-fields ld.lld llvm-tblgen clang-change-namespace clang-offload-bundler"; \ for f in $$CMDS; do \ echo "Generating manpage of $$f"; \ - LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot help2man --version-string=$(LLVM_VERSION) --no-discard-stderr $(TARGET_BUILD)/bin/$$f > debian/man/$$f-$(LLVM_VERSION).1; \ + LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot help2man --version-string=$(LLVM_VERSION) $(TARGET_BUILD)/bin/$$f > debian/man/$$f-$(LLVM_VERSION).1; \ done override_dh_auto_install: From 0f6a0f5cc8a4f5266ab140c1656fb72b20c5d70a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 21 Jun 2017 21:19:46 +0000 Subject: [PATCH 35/70] New stable release --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 0254f5f5..0c5501e1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ -llvm-toolchain-4.0 (1:4.0.1~+rc3-2) unstable; urgency=medium +llvm-toolchain-4.0 (1:4.0.1-1) unstable; urgency=medium + * New stable release * Add libomp-dev to the suggests of clang * Add the ld.lld manpage * Add Provides on python-lldb-x.y & python-clang-x.y & libllvm-x.y-ocaml-dev From dd677fef6077905d757f4fe787b569c1da006c8c Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 26 Jul 2017 05:20:11 +0000 Subject: [PATCH 36/70] ld.lld manpage wasn't installed --- debian/changelog | 6 ++++++ debian/lld-X.Y.manpages.in | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 debian/lld-X.Y.manpages.in diff --git a/debian/changelog b/debian/changelog index 0c5501e1..74bc1f0d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-4.0 (1:4.0.1-2) unstable; urgency=medium + + * ld.lld manpage wasn't installed + + -- + llvm-toolchain-4.0 (1:4.0.1-1) unstable; urgency=medium * New stable release diff --git a/debian/lld-X.Y.manpages.in b/debian/lld-X.Y.manpages.in new file mode 100644 index 00000000..49a3f66c --- /dev/null +++ b/debian/lld-X.Y.manpages.in @@ -0,0 +1,2 @@ +debian/man/ld.lld-@LLVM_VERSION@.1 + From e80a4868fda26b2b0cb8b3b7326efb25a217cf8d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 26 Jul 2017 07:18:55 +0000 Subject: [PATCH 37/70] Rebuild with gcc 7 to fix a relocation error (Closes: #866354) --- debian/changelog | 3 ++- debian/control | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 74bc1f0d..f0ec6480 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ llvm-toolchain-4.0 (1:4.0.1-2) unstable; urgency=medium + * Rebuild with gcc 7 to fix a relocation error (Closes: #866354) * ld.lld manpage wasn't installed - -- + -- Sylvestre Ledru Wed, 26 Jul 2017 09:06:29 +0200 llvm-toolchain-4.0 (1:4.0.1-1) unstable; urgency=medium diff --git a/debian/control b/debian/control index f894753c..36da61eb 100644 --- a/debian/control +++ b/debian/control @@ -134,7 +134,7 @@ Package: libclang-4.0-dev Architecture: any Section: libdevel Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, - ${dep:devlibs-objc}, libclang1-4.0 (= ${binary:Version}), + ${dep:devlibs-objc}, libclang1-4.0 (= ${binary:Version}), libclang-common-4.0-dev (= ${binary:Version}) Description: clang library - Development package Clang project is a C, C++, Objective C and Objective C++ front-end From be6493db62a4d342e3335097abd5e6e2de605745 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 28 Jul 2017 06:29:03 +0000 Subject: [PATCH 38/70] use clang replacement 4.0 instead of 3.8 --- debian/patches/clang-apply-replacements.diff | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/patches/clang-apply-replacements.diff b/debian/patches/clang-apply-replacements.diff index 38490b52..6feb58e3 100644 --- a/debian/patches/clang-apply-replacements.diff +++ b/debian/patches/clang-apply-replacements.diff @@ -7,7 +7,7 @@ Index: llvm-toolchain-3.7-3.7/clang-tools-extra/clang-modernize/Core/Replacement bool ReplacementHandling::findClangApplyReplacements(const char *Argv0) { ErrorOr CARPathOrErr = - findProgramByName("clang-apply-replacements"); -+ findProgramByName("clang-apply-replacements-3.8"); ++ findProgramByName("clang-apply-replacements-4.0"); if (!CARPathOrErr) return true; @@ -16,7 +16,7 @@ Index: llvm-toolchain-3.7-3.7/clang-tools-extra/clang-modernize/Core/Replacement std::string ClangModernizePath = fs::getMainExecutable(Argv0, &StaticSymbol); SmallString<128> TestPath = path::parent_path(ClangModernizePath); - path::append(TestPath, "clang-apply-replacements"); -+ path::append(TestPath, "clang-apply-replacements-3.8"); ++ path::append(TestPath, "clang-apply-replacements-4.0"); if (fs::can_execute(Twine(TestPath))) CARPath = TestPath.str(); @@ -29,7 +29,7 @@ Index: llvm-toolchain-3.7-3.7/clang-tools-extra/clang-tidy/tool/run-clang-tidy.p help='path to clang-tidy binary') parser.add_argument('-clang-apply-replacements-binary', metavar='PATH', - default='clang-apply-replacements', -+ default='clang-apply-replacements-3.8', ++ default='clang-apply-replacements-4.0', help='path to clang-apply-replacements binary') parser.add_argument('-checks', default=None, help='checks filter, when not specified, use clang-tidy ' From 6395fd3a3b9910603e5baedaf99d52a50a6ef216 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 10 Aug 2017 06:27:01 +0000 Subject: [PATCH 39/70] Ensure /usr/bin/g++-$(GCC_VERSION) exists (Closes: #871591) --- debian/changelog | 5 ++++- debian/rules | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index f0ec6480..4f0895b5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,10 @@ llvm-toolchain-4.0 (1:4.0.1-2) unstable; urgency=medium * Rebuild with gcc 7 to fix a relocation error (Closes: #866354) * ld.lld manpage wasn't installed - -- Sylvestre Ledru Wed, 26 Jul 2017 09:06:29 +0200 + [ Katsuhiko Nishimra ] + * Ensure /usr/bin/g++-$(GCC_VERSION) exists (Closes: #871591) + + -- Sylvestre Ledru Thu, 10 Aug 2017 08:26:26 +0200 llvm-toolchain-4.0 (1:4.0.1-1) unstable; urgency=medium diff --git a/debian/rules b/debian/rules index 8f944cf6..b2edeebc 100755 --- a/debian/rules +++ b/debian/rules @@ -4,8 +4,11 @@ TARGET_BUILD := build-llvm DEB_INST := $(CURDIR)/debian/tmp/ # The 5|6| in the regexp is a crappy workaround. g++ 5.2 in Debian is not providing a g++-5.2 binary (only g++-5) # accomodate that by hardcoding the 5 detection -GCC_VERSION := $(shell dpkg-query -W -f '$${Version}' g++ | sed -rne 's,^([0-9]+:)?(5|6|[0-9]+\.[0-9]+|[0-9]+).*$$,\2,p') -LLVM_VERSION := 4.0 +GXX_VERSIONED_PACKAGE := $(shell dpkg-query -W -f '$${Depends}' g++ | grep -o 'g++-[0-9][0-9.]*' | tail -n1 ) +GXX_VERSIONED_EXECUTABLE := $(shell dpkg -L $(GXX_VERSIONED_PACKAGE) | grep '/usr/bin/g++-[0-9][0-9.]*' | xargs ls -d | tail -n1 ) +GCC_VERSION := $(subst /usr/bin/g++-,,$(GXX_VERSIONED_EXECUTABLE)) + +LLVM_VERSION := 4.0 LLVM_VERSION_FULL := $(LLVM_VERSION).1 SONAME_EXT := 1 From aee6ae513eb3355ea71eda4fff4666fef31cddda Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 16 Aug 2017 07:58:11 +0000 Subject: [PATCH 40/70] Link LLDB with -latomic on powerpcspe (Closes: #872267) --- debian/changelog | 1 + debian/patches/lldb-link-atomic-cmake.patch | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4f0895b5..09fbb066 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ llvm-toolchain-4.0 (1:4.0.1-2) unstable; urgency=medium * Rebuild with gcc 7 to fix a relocation error (Closes: #866354) * ld.lld manpage wasn't installed + * Link LLDB with -latomic on powerpcspe (Closes: #872267) [ Katsuhiko Nishimra ] * Ensure /usr/bin/g++-$(GCC_VERSION) exists (Closes: #871591) diff --git a/debian/patches/lldb-link-atomic-cmake.patch b/debian/patches/lldb-link-atomic-cmake.patch index 4950df32..846e4bcc 100644 --- a/debian/patches/lldb-link-atomic-cmake.patch +++ b/debian/patches/lldb-link-atomic-cmake.patch @@ -8,13 +8,14 @@ Last-Update: 2016-07-27 --- a/lldb/cmake/LLDBDependencies.cmake +++ b/lldb/cmake/LLDBDependencies.cmake -@@ -185,6 +185,12 @@ if (LLVM_BUILD_STATIC) +@@ -185,6 +185,13 @@ if (LLVM_BUILD_STATIC) endif() endif() +if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips" OR + CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mipsel" OR -+ CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64el") ++ CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64el" OR ++ CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "powerpcspe") + list(APPEND LLDB_SYSTEM_LIBS atomic) +endif() + From 33117215ffedabf74bf70b045409e667c0ab07ca Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 16 Aug 2017 08:22:02 +0000 Subject: [PATCH 41/70] remove old patches --- debian/patches/lldb-link-atomic.diff | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 debian/patches/lldb-link-atomic.diff diff --git a/debian/patches/lldb-link-atomic.diff b/debian/patches/lldb-link-atomic.diff deleted file mode 100644 index 30976127..00000000 --- a/debian/patches/lldb-link-atomic.diff +++ /dev/null @@ -1,15 +0,0 @@ -Index: llvm-toolchain-snapshot_3.7~svn241915/lldb/lib/Makefile -=================================================================== ---- llvm-toolchain-snapshot_3.7~svn241915.orig/lldb/lib/Makefile -+++ llvm-toolchain-snapshot_3.7~svn241915/lldb/lib/Makefile -@@ -191,6 +191,10 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), L - # Link in python - LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -ledit -lncurses -lpanel -lpthread - LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT) -+ ifneq (,$(filter $(shell dpkg-architecture -qDEB_HOST_ARCH), mips mipsel powerpc powerpcspe)) -+ # Link GCC atomic helper library -+ LLVMLibsOptions += -latomic -+ endif - endif - - ifeq ($(HOST_OS),FreeBSD) From 296be108bd0b39c719f500a5b58615a12edb41e1 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 26 Aug 2017 15:07:46 +0000 Subject: [PATCH 42/70] Disable -gsplit-dwarf when using gcc 7 for causing a linking issue See https://bugs.llvm.org/show_bug.cgi?id=34140 (Closes: #853526) --- debian/changelog | 3 +++ debian/rules | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 09fbb066..d3223ca5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ llvm-toolchain-4.0 (1:4.0.1-2) unstable; urgency=medium * Rebuild with gcc 7 to fix a relocation error (Closes: #866354) * ld.lld manpage wasn't installed * Link LLDB with -latomic on powerpcspe (Closes: #872267) + * Disable -gsplit-dwarf when using gcc 7 for causing a linking issue + See https://bugs.llvm.org/show_bug.cgi?id=34140 + (Closes: #853526) [ Katsuhiko Nishimra ] * Ensure /usr/bin/g++-$(GCC_VERSION) exists (Closes: #871591) diff --git a/debian/rules b/debian/rules index b2edeebc..d4539f27 100755 --- a/debian/rules +++ b/debian/rules @@ -38,8 +38,12 @@ endif ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.22.52.0.4 ; echo $$?),0) # when using -gsplit-dwarf, it will requires extract-dwo which doesn't exist on precise: # More: https://llvm.org/bugs/show_bug.cgi?id=28841 +ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 7.1.0-7~ ; echo $$?),0) +# Do not pass -gsplit-dwarf with gcc 7. This is causing some linking issues +# More: https://bugs.llvm.org/show_bug.cgi?id=34140 CXXFLAGS_EXTRA += -gsplit-dwarf endif +endif ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 4.7.2-10~ ; echo $$?),0) From 47122608614cca53fa9a207db3485088606f2e60 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 26 Aug 2017 15:24:42 +0000 Subject: [PATCH 43/70] clang was producing unusable binaries on armv5tel (Closes #873305) Thanks to Adrian Bunk for the patch --- debian/changelog | 2 ++ debian/rules | 3 +++ 2 files changed, 5 insertions(+) diff --git a/debian/changelog b/debian/changelog index d3223ca5..bef4e5fa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ llvm-toolchain-4.0 (1:4.0.1-2) unstable; urgency=medium * Disable -gsplit-dwarf when using gcc 7 for causing a linking issue See https://bugs.llvm.org/show_bug.cgi?id=34140 (Closes: #853526) + * clang was producing unusable binaries on armv5tel (Closes #873305) + Thanks to Adrian Bunk for the patch [ Katsuhiko Nishimra ] * Ensure /usr/bin/g++-$(GCC_VERSION) exists (Closes: #871591) diff --git a/debian/rules b/debian/rules index d4539f27..5d31deb1 100755 --- a/debian/rules +++ b/debian/rules @@ -60,6 +60,9 @@ ifneq (,$(findstring $(DEB_HOST_ARCH),armel)) # 3.8 fails to build, disable the compiler_rt builtins # See http://lists.llvm.org/pipermail/llvm-dev/2016-May/099761.html CMAKE_EXTRA += -DCOMPILER_RT_BUILD_BUILTINS=OFF + # Prevent clang from getting a > v4t default + # See bug #868779 + CMAKE_EXTRA += -DLLVM_HOST_TRIPLE=arm-linux-gnueabi endif ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) ge 4.8-20121128-1~ ; echo $$?),0) From bbe3de4b6a81f031bb6d1796921e143198e11594 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 26 Aug 2017 15:36:34 +0000 Subject: [PATCH 44/70] fix the date --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index bef4e5fa..42fde0f0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,7 +12,7 @@ llvm-toolchain-4.0 (1:4.0.1-2) unstable; urgency=medium [ Katsuhiko Nishimra ] * Ensure /usr/bin/g++-$(GCC_VERSION) exists (Closes: #871591) - -- Sylvestre Ledru Thu, 10 Aug 2017 08:26:26 +0200 + -- Sylvestre Ledru Sat, 26 Aug 2017 17:36:26 +0200 llvm-toolchain-4.0 (1:4.0.1-1) unstable; urgency=medium From 1f6eee27a5c24f38db03ed40ea74773a2cf27831 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 26 Aug 2017 18:24:40 +0000 Subject: [PATCH 45/70] Also add a missing include in ftfbs-gcc.diff to fix a ftbfs with gcc 7 --- debian/changelog | 2 ++ debian/patches/ftfbs-gcc.diff | 12 ++++++++++++ debian/patches/series | 1 + 3 files changed, 15 insertions(+) create mode 100644 debian/patches/ftfbs-gcc.diff diff --git a/debian/changelog b/debian/changelog index 42fde0f0..41197542 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ llvm-toolchain-4.0 (1:4.0.1-2) unstable; urgency=medium * Rebuild with gcc 7 to fix a relocation error (Closes: #866354) + * Also add a missing include in ftfbs-gcc.diff to fix a ftbfs + with gcc 7 * ld.lld manpage wasn't installed * Link LLDB with -latomic on powerpcspe (Closes: #872267) * Disable -gsplit-dwarf when using gcc 7 for causing a linking issue diff --git a/debian/patches/ftfbs-gcc.diff b/debian/patches/ftfbs-gcc.diff new file mode 100644 index 00000000..f89ce4f9 --- /dev/null +++ b/debian/patches/ftfbs-gcc.diff @@ -0,0 +1,12 @@ +Index: llvm-toolchain-4.0-4.0.1~+rc3/lldb/include/lldb/Utility/TaskPool.h +=================================================================== +--- llvm-toolchain-4.0-4.0.1~+rc3.orig/lldb/include/lldb/Utility/TaskPool.h ++++ llvm-toolchain-4.0-4.0.1~+rc3/lldb/include/lldb/Utility/TaskPool.h +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + // Global TaskPool class for running tasks in parallel on a set of worker thread + // created the first diff --git a/debian/patches/series b/debian/patches/series index 0af13e9e..6fdb4a3f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -46,3 +46,4 @@ silent-test-failing-codeverage.diff silent-amdgpu-test-failing.diff pthread-link.diff add_symbols_versioning.patch +ftfbs-gcc.diff From 799d338af9bc4f239b2a01a1115f6c522f4d0495 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 31 Aug 2017 17:15:31 +0000 Subject: [PATCH 46/70] * Fix the FTBFS because of -gsplit-dwarf: - Only enable it on archs which needs it - Only enable it when gcc supports it correctly --- debian/changelog | 8 ++++++++ debian/rules | 14 ++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 41197542..3cef2ee3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +llvm-toolchain-4.0 (1:4.0.1-3) UNRELEASED; urgency=medium + + * Fix the FTBFS because of -gsplit-dwarf: + - Only enable it on archs which needs it + - Only enable it when gcc supports it correctly + + -- Sylvestre Ledru Thu, 31 Aug 2017 19:14:39 +0200 + llvm-toolchain-4.0 (1:4.0.1-2) unstable; urgency=medium * Rebuild with gcc 7 to fix a relocation error (Closes: #866354) diff --git a/debian/rules b/debian/rules index 5d31deb1..6d9cdca0 100755 --- a/debian/rules +++ b/debian/rules @@ -35,15 +35,21 @@ ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe)) LDFLAGS_EXTRA += -latomic endif +ENABLE_SPLIT_DWARF_ARCHS := armel armhf i386 mips powerpc +# Only enable gsplit dwarf on archs which needs it +ifneq (,$(filter $(DEB_HOST_ARCH),$(ENABLE_SPLIT_DWARF_ARCHS))) ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.22.52.0.4 ; echo $$?),0) # when using -gsplit-dwarf, it will requires extract-dwo which doesn't exist on precise: # More: https://llvm.org/bugs/show_bug.cgi?id=28841 ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 7.1.0-7~ ; echo $$?),0) -# Do not pass -gsplit-dwarf with gcc 7. This is causing some linking issues -# More: https://bugs.llvm.org/show_bug.cgi?id=34140 +ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) ge 7.2.0-2 ; echo $$?),0) +# Only pass -gsplit-dwarf with working version of gcc 7 +# More: https://bugs.llvm.org/show_bug.cgi?id=34140 & https://bugs.debian.org/873609 CXXFLAGS_EXTRA += -gsplit-dwarf -endif -endif +endif # > 7.2.0-2 +endif # < gcc 7 +endif # binutils +endif # archs ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 4.7.2-10~ ; echo $$?),0) From 8139ce2552ce214bcdc77bf141e9bdd69625076d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 1 Sep 2017 07:02:29 +0000 Subject: [PATCH 47/70] fix the gcc comparison --- debian/rules | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/debian/rules b/debian/rules index 6d9cdca0..fa88e547 100755 --- a/debian/rules +++ b/debian/rules @@ -41,13 +41,12 @@ ifneq (,$(filter $(DEB_HOST_ARCH),$(ENABLE_SPLIT_DWARF_ARCHS))) ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.22.52.0.4 ; echo $$?),0) # when using -gsplit-dwarf, it will requires extract-dwo which doesn't exist on precise: # More: https://llvm.org/bugs/show_bug.cgi?id=28841 -ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 7.1.0-7~ ; echo $$?),0) -ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) ge 7.2.0-2 ; echo $$?),0) +ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 7.1.0-7~ || \ + dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) ge 7.2.0-2; echo $$?),0) # Only pass -gsplit-dwarf with working version of gcc 7 # More: https://bugs.llvm.org/show_bug.cgi?id=34140 & https://bugs.debian.org/873609 CXXFLAGS_EXTRA += -gsplit-dwarf -endif # > 7.2.0-2 -endif # < gcc 7 +endif # < gcc 7 or > 7.2.0-2 endif # binutils endif # archs From 6998e06eae3733b2d0df6c1ec1bea2d2698930a7 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 1 Sep 2017 18:35:50 +0000 Subject: [PATCH 48/70] prepare for release --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3cef2ee3..f9c9d4aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -llvm-toolchain-4.0 (1:4.0.1-3) UNRELEASED; urgency=medium +llvm-toolchain-4.0 (1:4.0.1-3) unstable; urgency=medium * Fix the FTBFS because of -gsplit-dwarf: - Only enable it on archs which needs it From 4ce48823b9b44aaf168272e4079d55e5bf5ee773 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 3 Sep 2017 13:15:24 +0000 Subject: [PATCH 49/70] Fail the build if the arch + gcc has a broken gsplit-dwarf support --- debian/changelog | 6 ++++++ debian/rules | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f9c9d4aa..19e3ca30 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-4.0 (1:4.0.1-4) unstable; urgency=medium + + * Fail the build if the arch + gcc has a broken gsplit-dwarf support + + -- Sylvestre Ledru Sun, 03 Sep 2017 15:13:14 +0200 + llvm-toolchain-4.0 (1:4.0.1-3) unstable; urgency=medium * Fix the FTBFS because of -gsplit-dwarf: diff --git a/debian/rules b/debian/rules index fa88e547..b6d9f448 100755 --- a/debian/rules +++ b/debian/rules @@ -35,7 +35,7 @@ ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe)) LDFLAGS_EXTRA += -latomic endif -ENABLE_SPLIT_DWARF_ARCHS := armel armhf i386 mips powerpc +ENABLE_SPLIT_DWARF_ARCHS := armel armhf i386 mips powerpc amd64 # Only enable gsplit dwarf on archs which needs it ifneq (,$(filter $(DEB_HOST_ARCH),$(ENABLE_SPLIT_DWARF_ARCHS))) ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.22.52.0.4 ; echo $$?),0) @@ -46,6 +46,8 @@ ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++ # Only pass -gsplit-dwarf with working version of gcc 7 # More: https://bugs.llvm.org/show_bug.cgi?id=34140 & https://bugs.debian.org/873609 CXXFLAGS_EXTRA += -gsplit-dwarf +else +$(error "Broken gcc version for -gsplit-dwarf support. Please use < gcc 7 or > 7.2.0-2") endif # < gcc 7 or > 7.2.0-2 endif # binutils endif # archs From 7ca45311b1dc539d46aeb89ac21b89fb6ec887e2 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 3 Sep 2017 13:22:25 +0000 Subject: [PATCH 50/70] fix the declarations --- debian/rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index b6d9f448..f4feb3ef 100755 --- a/debian/rules +++ b/debian/rules @@ -47,8 +47,8 @@ ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++ # More: https://bugs.llvm.org/show_bug.cgi?id=34140 & https://bugs.debian.org/873609 CXXFLAGS_EXTRA += -gsplit-dwarf else -$(error "Broken gcc version for -gsplit-dwarf support. Please use < gcc 7 or > 7.2.0-2") -endif # < gcc 7 or > 7.2.0-2 +$(error "Broken gcc version for -gsplit-dwarf support. Please use < gcc 7 or >= 7.2.0-2") +endif # < gcc 7 or >= 7.2.0-2 endif # binutils endif # archs From c2179a304d29a983a34d3eaf323262e644fd7ffd Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 6 Sep 2017 11:36:25 +0000 Subject: [PATCH 51/70] amd64 doesn't need gsplit dwarf --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index f4feb3ef..7a85ef18 100755 --- a/debian/rules +++ b/debian/rules @@ -35,7 +35,7 @@ ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe)) LDFLAGS_EXTRA += -latomic endif -ENABLE_SPLIT_DWARF_ARCHS := armel armhf i386 mips powerpc amd64 +ENABLE_SPLIT_DWARF_ARCHS := armel armhf i386 mips powerpc # Only enable gsplit dwarf on archs which needs it ifneq (,$(filter $(DEB_HOST_ARCH),$(ENABLE_SPLIT_DWARF_ARCHS))) ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.22.52.0.4 ; echo $$?),0) From 7e366d9354759fb32ccaabe3a14b230e7b2c3e3c Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 8 Sep 2017 10:01:11 +0000 Subject: [PATCH 52/70] Link with --no-keep-files-mapped --no-map-whole-files when using gold. --- debian/changelog | 7 +++++++ debian/rules | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 19e3ca30..3f377274 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-4.0 (1:5.0-1~exp2) UNRELEASED; urgency=medium + + [ Matthias Klose ] + * Link with --no-keep-files-mapped --no-map-whole-files when using gold. + + -- Sylvestre Ledru Fri, 08 Sep 2017 11:59:03 +0200 + llvm-toolchain-4.0 (1:4.0.1-4) unstable; urgency=medium * Fail the build if the arch + gcc has a broken gsplit-dwarf support diff --git a/debian/rules b/debian/rules index 7a85ef18..a737dc98 100755 --- a/debian/rules +++ b/debian/rules @@ -86,8 +86,8 @@ BINUTILS_GOLD_ARCHS := amd64 armhf i386 powerpcspe ppc64 ppc64el sparc sparc64 x ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.23.1-1~exp3 ; echo $$?),0) ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS))) # -fused-ld=gold enables the gold linker (but is not supported by all archs / distro) - LDFLAGS_EXTRA += -fuse-ld=gold - CXXFLAGS_EXTRA += -Wl,-fuse-ld=gold + LDFLAGS_EXTRA += -fuse-ld=gold --no-keep-files-mapped --no-map-whole-files + CXXFLAGS_EXTRA += -Wl,-fuse-ld=gold -Wl,--no-keep-files-mapped -Wl,--no-map-whole-files CMAKE_EXTRA += -DLLVM_BINUTILS_INCDIR=/usr/include/ endif endif From 78982e2b845ed0a4e1c3d6dac738e0ed69b0cdbc Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 18 Sep 2017 19:53:51 +0000 Subject: [PATCH 53/70] * Backport of an arm patch for rust. https://bugs.llvm.org/show_bug.cgi?id=32379 (Closes: #876072) * Fix sanitizer build failure with glibc-2.26. * build using gold on arm64 and s390x. For backports, arm64 might still need the BFD linker, and building with only one or two processes in parallel. * On amd64, s390x, arm64 and ppc64el, build with -g1 instead of -g. * Set CMAKE_CXX_FLAGS_RELWITHDEBINFO and pass opt_flags. --- debian/changelog | 12 +++- debian/control | 4 ++ debian/patches/armhf-bitfield.diff | 39 +++++++++++ debian/patches/pr81066.diff | 102 +++++++++++++++++++++++++++++ debian/patches/series | 2 + debian/rules | 6 +- 6 files changed, 163 insertions(+), 2 deletions(-) create mode 100644 debian/patches/armhf-bitfield.diff create mode 100644 debian/patches/pr81066.diff diff --git a/debian/changelog b/debian/changelog index 3f377274..a99826df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,17 @@ -llvm-toolchain-4.0 (1:5.0-1~exp2) UNRELEASED; urgency=medium +llvm-toolchain-4.0 (1:4.0.1-5) unstable; urgency=medium + + * Backport of an arm patch for rust. + https://bugs.llvm.org/show_bug.cgi?id=32379 + (Closes: #876072) [ Matthias Klose ] * Link with --no-keep-files-mapped --no-map-whole-files when using gold. + * Fix sanitizer build failure with glibc-2.26. + * build using gold on arm64 and s390x. For backports, arm64 might still + need the BFD linker, and building with only one or two processes in + parallel. + * On amd64, s390x, arm64 and ppc64el, build with -g1 instead of -g. + * Set CMAKE_CXX_FLAGS_RELWITHDEBINFO and pass opt_flags. -- Sylvestre Ledru Fri, 08 Sep 2017 11:59:03 +0200 diff --git a/debian/control b/debian/control index 36da61eb..c451ebe4 100644 --- a/debian/control +++ b/debian/control @@ -229,6 +229,8 @@ Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same +Breaks: libllvm3.9v4 +Replaces: libllvm3.9v4 Description: Modular compiler and toolchain technologies, runtime library LLVM is a collection of libraries and tools that make it easy to build compilers, optimizers, just-in-time code generators, and many other @@ -243,6 +245,8 @@ Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm4.0 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same +Breaks: libllvm3.9v4-dbg +Replaces: libllvm3.9v4-dbg Description: Modular compiler and toolchain technologies, debugging libraries LLVM is a collection of libraries and tools that make it easy to build compilers, optimizers, just-in-time code generators, and many other diff --git a/debian/patches/armhf-bitfield.diff b/debian/patches/armhf-bitfield.diff new file mode 100644 index 00000000..0b3a661b --- /dev/null +++ b/debian/patches/armhf-bitfield.diff @@ -0,0 +1,39 @@ +Index: llvm-toolchain-3.9-3.9.1/lib/Target/ARM/ARMISelLowering.cpp +=================================================================== +--- llvm-toolchain-3.9-3.9.1.orig/lib/Target/ARM/ARMISelLowering.cpp ++++ llvm-toolchain-3.9-3.9.1/lib/Target/ARM/ARMISelLowering.cpp +@@ -10805,8 +10805,8 @@ static void computeKnownBits(SelectionDA + if (Op.getOpcode() == ARMISD::CMOV) { + APInt KZ2(KnownZero.getBitWidth(), 0); + APInt KO2(KnownOne.getBitWidth(), 0); +- computeKnownBits(DAG, Op.getOperand(1), KnownZero, KnownOne); +- computeKnownBits(DAG, Op.getOperand(2), KZ2, KO2); ++ computeKnownBits(DAG, Op.getOperand(0), KnownZero, KnownOne); ++ computeKnownBits(DAG, Op.getOperand(1), KZ2, KO2); + + KnownZero &= KZ2; + KnownOne &= KO2; +Index: llvm-toolchain-3.9-3.9.1/test/CodeGen/ARM/no-cmov2bfi.ll +=================================================================== +--- /dev/null ++++ llvm-toolchain-3.9-3.9.1/test/CodeGen/ARM/no-cmov2bfi.ll +@@ -0,0 +1,19 @@ ++; RUN: llc < %s -mtriple=thumbv7 | FileCheck --check-prefix=CHECK-NOBFI %s ++ ++declare zeroext i1 @dummy() ++ ++define i8 @test(i8 %a1, i1 %c) { ++; CHECK-NOBFI-NOT: bfi ++; CHECK-NOBFI: bl dummy ++; CHECK-NOBFI: cmp r0, #0 ++; CHECK-NOBFI: it ne ++; CHECK-NOBFI: orrne [[REG:r[0-9]+]], [[REG]], #8 ++; CHECK-NOBFI: mov r0, [[REG]] ++ ++ %1 = and i8 %a1, -9 ++ %2 = select i1 %c, i8 %1, i8 %a1 ++ %3 = tail call zeroext i1 @dummy() ++ %4 = or i8 %2, 8 ++ %ret = select i1 %3, i8 %4, i8 %2 ++ ret i8 %ret ++} diff --git a/debian/patches/pr81066.diff b/debian/patches/pr81066.diff new file mode 100644 index 00000000..e3e39cf3 --- /dev/null +++ b/debian/patches/pr81066.diff @@ -0,0 +1,102 @@ +# DP; Fix PR sanitizer/81066, taken from the gcc-7-branch. + +libsanitizer/ + +2017-07-17 Jakub Jelinek + + Backported from mainline + 2017-07-14 Jakub Jelinek + + PR sanitizer/81066 + * sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969. + * sanitizer_common/sanitizer_linux.cc: Likewise. + * sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise. + * tsan/tsan_platform_linux.cc: Likewise. + +Index: b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc +=================================================================== +--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc +@@ -607,8 +607,7 @@ uptr internal_prctl(int option, uptr arg + } + #endif + +-uptr internal_sigaltstack(const struct sigaltstack *ss, +- struct sigaltstack *oss) { ++uptr internal_sigaltstack(const void *ss, void *oss) { + return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss); + } + +Index: b/compiler-rt/lib/sanitizer_common/sanitizer_linux.h +=================================================================== +--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.h ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.h +@@ -21,7 +21,6 @@ + #include "sanitizer_platform_limits_posix.h" + + struct link_map; // Opaque type returned by dlopen(). +-struct sigaltstack; + + namespace __sanitizer { + // Dirent structure for getdents(). Note that this structure is different from +@@ -30,8 +29,7 @@ struct linux_dirent; + + // Syscall wrappers. + uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count); +-uptr internal_sigaltstack(const struct sigaltstack* ss, +- struct sigaltstack* oss); ++uptr internal_sigaltstack(const void* ss, void* oss); + uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set, + __sanitizer_sigset_t *oldset); + +Index: b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc +=================================================================== +--- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc +@@ -273,7 +273,7 @@ static int TracerThread(void* argument) + + // Alternate stack for signal handling. + InternalScopedBuffer handler_stack_memory(kHandlerStackSize); +- struct sigaltstack handler_stack; ++ stack_t handler_stack; + internal_memset(&handler_stack, 0, sizeof(handler_stack)); + handler_stack.ss_sp = handler_stack_memory.data(); + handler_stack.ss_size = kHandlerStackSize; +Index: b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc +=================================================================== +--- a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc ++++ b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc +@@ -282,7 +282,7 @@ void InitializePlatform() { + int ExtractResolvFDs(void *state, int *fds, int nfd) { + #if SANITIZER_LINUX && !SANITIZER_ANDROID + int cnt = 0; +- __res_state *statp = (__res_state*)state; ++ struct __res_state *statp = (struct __res_state*)state; + for (int i = 0; i < MAXNS && cnt < nfd; i++) { + if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1) + fds[cnt++] = statp->_u._ext.nssocks[i]; +Index: b/compiler-rt/lib/asan/asan_linux.cc +=================================================================== +--- a/compiler-rt/lib/asan/asan_linux.cc ++++ b/compiler-rt/lib/asan/asan_linux.cc +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + #include + #include + #include +Index: b/compiler-rt/lib/esan/esan_sideline_linux.cpp +=================================================================== +--- a/compiler-rt/lib/esan/esan_sideline_linux.cpp ++++ b/compiler-rt/lib/esan/esan_sideline_linux.cpp +@@ -70,7 +70,7 @@ int SidelineThread::runSideline(void *Ar + + // Set up a signal handler on an alternate stack for safety. + InternalScopedBuffer StackMap(SigAltStackSize); +- struct sigaltstack SigAltStack; ++ stack_t SigAltStack; + SigAltStack.ss_sp = StackMap.data(); + SigAltStack.ss_size = SigAltStackSize; + SigAltStack.ss_flags = 0; diff --git a/debian/patches/series b/debian/patches/series index 6fdb4a3f..afc43743 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -47,3 +47,5 @@ silent-amdgpu-test-failing.diff pthread-link.diff add_symbols_versioning.patch ftfbs-gcc.diff +pr81066.diff +armhf-bitfield.diff diff --git a/debian/rules b/debian/rules index a737dc98..2ed54831 100755 --- a/debian/rules +++ b/debian/rules @@ -62,6 +62,9 @@ export CC=gcc-$(GCC_VERSION) export CXX=g++-$(GCC_VERSION) opt_flags = -g -O2 +ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 ppc64el s390x)) + opt_flags = -g1 -O2 +endif ifneq (,$(findstring $(DEB_HOST_ARCH),armel)) opt_flags += -marm # 3.8 fails to build, disable the compiler_rt builtins @@ -82,7 +85,7 @@ else control_vars = '-Vdep:devlibs=libstdc++6-$(GCC_VERSION)-dev' endif -BINUTILS_GOLD_ARCHS := amd64 armhf i386 powerpcspe ppc64 ppc64el sparc sparc64 x32 +BINUTILS_GOLD_ARCHS := amd64 arm64 armhf i386 powerpcspe ppc64 ppc64el sparc sparc64 x32 s390x ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.23.1-1~exp3 ; echo $$?),0) ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS))) # -fused-ld=gold enables the gold linker (but is not supported by all archs / distro) @@ -275,6 +278,7 @@ override_dh_auto_configure: preconfigure -DCMAKE_INSTALL_PREFIX=/usr/lib/llvm-$(LLVM_VERSION) \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(opt_flags)" \ -DCMAKE_CXX_FLAGS='$(CXXFLAGS_EXTRA)' \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DLLVM_INSTALL_UTILS=ON \ From ab59a1516ce75ba1f1f15fa52124fc284c5774a0 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Mon, 25 Sep 2017 08:35:01 +0000 Subject: [PATCH 54/70] Add NDEBUG flag, removed in the -g -g1 switch --- debian/changelog | 6 ++++++ debian/rules | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a99826df..d148c3db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-4.0 (1:4.0.1-6) UNRELEASED; urgency=medium + + * Add NDEBUG macro, lost in the -g -> -g1 change. + + -- Gianfranco Costamagna Mon, 25 Sep 2017 10:26:11 +0200 + llvm-toolchain-4.0 (1:4.0.1-5) unstable; urgency=medium * Backport of an arm patch for rust. diff --git a/debian/rules b/debian/rules index 2ed54831..a5d4a653 100755 --- a/debian/rules +++ b/debian/rules @@ -61,10 +61,13 @@ endif export CC=gcc-$(GCC_VERSION) export CXX=g++-$(GCC_VERSION) -opt_flags = -g -O2 +opt_flags = -O2 -DNDEBUG ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 ppc64el s390x)) - opt_flags = -g1 -O2 + opt_flags += -g1 +else + opt_flags += -g endif + ifneq (,$(findstring $(DEB_HOST_ARCH),armel)) opt_flags += -marm # 3.8 fails to build, disable the compiler_rt builtins From c720a61b91d2988a03493e180fe4af114c9203ea Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 1 Oct 2017 13:32:54 +0000 Subject: [PATCH 55/70] * Remove the -Wl option to call gold instead of the normal linker (Closes: #876787) * Fixup previous upload, adding -NDEBUG to build flags, lost in the -g -> -g1 switch * clang was producing unusable binaries on armv5tel (Closes: #873305) --- debian/changelog | 13 +++++++++---- debian/rules | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index d148c3db..61057898 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,13 @@ -llvm-toolchain-4.0 (1:4.0.1-6) UNRELEASED; urgency=medium +llvm-toolchain-4.0 (1:4.0.1-6) unstable; urgency=medium - * Add NDEBUG macro, lost in the -g -> -g1 change. + * Remove the -Wl option to call gold instead of the normal linker + (Closes: #876787) - -- Gianfranco Costamagna Mon, 25 Sep 2017 10:26:11 +0200 + [ Gianfranco Costamagna ] + * Fixup previous upload, adding -NDEBUG to build flags, + lost in the -g -> -g1 switch + + -- Sylvestre Ledru Sun, 01 Oct 2017 15:24:14 +0200 llvm-toolchain-4.0 (1:4.0.1-5) unstable; urgency=medium @@ -45,7 +50,7 @@ llvm-toolchain-4.0 (1:4.0.1-2) unstable; urgency=medium * Disable -gsplit-dwarf when using gcc 7 for causing a linking issue See https://bugs.llvm.org/show_bug.cgi?id=34140 (Closes: #853526) - * clang was producing unusable binaries on armv5tel (Closes #873305) + * clang was producing unusable binaries on armv5tel (Closes: #873305) Thanks to Adrian Bunk for the patch [ Katsuhiko Nishimra ] diff --git a/debian/rules b/debian/rules index a5d4a653..a435accf 100755 --- a/debian/rules +++ b/debian/rules @@ -93,7 +93,7 @@ ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' bin ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS))) # -fused-ld=gold enables the gold linker (but is not supported by all archs / distro) LDFLAGS_EXTRA += -fuse-ld=gold --no-keep-files-mapped --no-map-whole-files - CXXFLAGS_EXTRA += -Wl,-fuse-ld=gold -Wl,--no-keep-files-mapped -Wl,--no-map-whole-files + CXXFLAGS_EXTRA += -fuse-ld=gold -Wl,--no-keep-files-mapped -Wl,--no-map-whole-files CMAKE_EXTRA += -DLLVM_BINUTILS_INCDIR=/usr/include/ endif endif From 29a4af8174010830e29b4a0301715bb9703ab636 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 1 Oct 2017 16:31:05 +0000 Subject: [PATCH 56/70] For now, lld doesn't generate shared libs. Removing the files (Closes: #857653) --- debian/changelog | 2 ++ debian/liblld-X.Y.links.in | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 61057898..a79a1527 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ llvm-toolchain-4.0 (1:4.0.1-6) unstable; urgency=medium * Remove the -Wl option to call gold instead of the normal linker (Closes: #876787) + * For now, lld doesn't generate shared libs. Removing the files + (Closes: #857653) [ Gianfranco Costamagna ] * Fixup previous upload, adding -NDEBUG to build flags, diff --git a/debian/liblld-X.Y.links.in b/debian/liblld-X.Y.links.in index b9b629f8..0005e496 100644 --- a/debian/liblld-X.Y.links.in +++ b/debian/liblld-X.Y.links.in @@ -1,3 +1,4 @@ -usr/lib/@DEB_HOST_MULTIARCH@/liblld-@LLVM_VERSION@.so.1 usr/lib/@DEB_HOST_MULTIARCH@/liblld-@LLVM_VERSION@.so -usr/lib/@DEB_HOST_MULTIARCH@/liblld-@LLVM_VERSION@.so usr/lib/python2.7/dist-packages/lld-@LLVM_VERSION@/_lld.so -usr/lib/@DEB_HOST_MULTIARCH@/liblld-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/liblld.so.1 +#usr/lib/@DEB_HOST_MULTIARCH@/liblld-@LLVM_VERSION@.so.1 usr/lib/@DEB_HOST_MULTIARCH@/liblld-@LLVM_VERSION@.so +#usr/lib/@DEB_HOST_MULTIARCH@/liblld-@LLVM_VERSION@.so usr/lib/python2.7/dist-packages/lld-@LLVM_VERSION@/_lld.so +#usr/lib/@DEB_HOST_MULTIARCH@/liblld-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/liblld.so.1 + From ef584250487fdb45bbe18c564065d31e74af0953 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 1 Oct 2017 17:05:13 +0000 Subject: [PATCH 57/70] Add the missing lldb symlinks (Closes: #872237) --- debian/changelog | 1 + debian/liblldb-X.Y-dev.links.in | 3 ++- debian/liblldb-X.Y.links.in | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a79a1527..d8770879 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ llvm-toolchain-4.0 (1:4.0.1-6) unstable; urgency=medium (Closes: #876787) * For now, lld doesn't generate shared libs. Removing the files (Closes: #857653) + * Add the missing lldb symlinks (Closes: #872237) [ Gianfranco Costamagna ] * Fixup previous upload, adding -NDEBUG to build flags, diff --git a/debian/liblldb-X.Y-dev.links.in b/debian/liblldb-X.Y-dev.links.in index 18e13a51..3c6aef90 100644 --- a/debian/liblldb-X.Y-dev.links.in +++ b/debian/liblldb-X.Y-dev.links.in @@ -1,2 +1,3 @@ usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/liblldb.so - +usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/liblldb-@LLVM_VERSION@.so +usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/liblldb-@LLVM_VERSION@.so.1 diff --git a/debian/liblldb-X.Y.links.in b/debian/liblldb-X.Y.links.in index a222fbc6..ae73a199 100644 --- a/debian/liblldb-X.Y.links.in +++ b/debian/liblldb-X.Y.links.in @@ -1,3 +1,2 @@ usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so.1 usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/liblldb.so.1 - From 8ea018b3ba3ce3ef6d7799a55b8600530995ef89 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 13 Oct 2017 19:26:15 +0000 Subject: [PATCH 58/70] * Force the deactivation of ocaml until the transition is done * Standards-Version: 4.1.0 --- debian/changelog | 7 +++++++ debian/control | 48 ++++++++++++++++++++++++------------------------ debian/rules | 2 ++ 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/debian/changelog b/debian/changelog index d8770879..c72bc370 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-4.0 (1:4.0.1-7) unstable; urgency=medium + + * Force the deactivation of ocaml until the transition is done + * Standards-Version: 4.1.0 + + -- Sylvestre Ledru Fri, 13 Oct 2017 21:22:54 +0200 + llvm-toolchain-4.0 (1:4.0.1-6) unstable; urgency=medium * Remove the -Wl option to call gold instead of the normal linker diff --git a/debian/control b/debian/control index c451ebe4..7d2a8970 100644 --- a/debian/control +++ b/debian/control @@ -9,14 +9,14 @@ Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, libedit-dev, libncurses5-dev, swig, python-six, python-sphinx, binutils-dev, libjsoncpp-dev, lcov, procps, help2man, zlib1g-dev, + g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32], ocaml-nox [amd64 arm64 armel armhf i386], ocaml-findlib [amd64 arm64 armel armhf i386], libctypes-ocaml-dev [amd64 arm64 armel armhf i386], dh-ocaml [amd64 arm64 armel armhf i386], - g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32] Build-Conflicts: oprofile, ocaml, libllvm-3.4-ocaml-dev, libllvm-3.5-ocaml-dev, libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev -Standards-Version: 4.0.0 +Standards-Version: 4.1.0 Homepage: http://www.llvm.org/ Vcs-Svn: svn://anonscm.debian.org/svn/pkg-llvm/llvm-toolchain/branches/4.0/ Vcs-Browser: https://svn.debian.org/viewsvn/pkg-llvm/llvm-toolchain/branches/4.0/ @@ -343,28 +343,28 @@ Description: Modular compiler and toolchain technologies, tools . This package provides tools for testing. -Package: libllvm-4.0-ocaml-dev -Section: ocaml -Architecture: amd64 arm64 armel armhf i386 -Suggests: llvm-4.0-doc -Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-4.0-dev (= ${binary:Version}) -Replaces: libllvm-x.y-ocaml-dev -Conflicts: libllvm-x.y-ocaml-dev -Provides: ${ocaml:Provides}, libllvm-x.y-ocaml-dev -Description: Modular compiler and toolchain technologies, OCaml bindings - LLVM is a collection of libraries and tools that make it easy to build - compilers, optimizers, just-in-time code generators, and many other - compiler-related programs. - . - LLVM uses a single, language-independent virtual instruction set both - as an offline code representation (to communicate code between - compiler phases and to run-time systems) and as the compiler internal - representation (to analyze and transform programs). This persistent - code representation allows a common set of sophisticated compiler - techniques to be applied at compile-time, link-time, install-time, - run-time, or "idle-time" (between program runs). - . - This package provides the OCaml bindings to develop applications using llvm. +# Package: libllvm-4.0-ocaml-dev +# Section: ocaml +# Architecture: amd64 arm64 armel armhf i386 +# Suggests: llvm-4.0-doc +# Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-4.0-dev (= ${binary:Version}) +# Replaces: libllvm-x.y-ocaml-dev +# Conflicts: libllvm-x.y-ocaml-dev +# Provides: ${ocaml:Provides}, libllvm-x.y-ocaml-dev +# Description: Modular compiler and toolchain technologies, OCaml bindings +# LLVM is a collection of libraries and tools that make it easy to build +# compilers, optimizers, just-in-time code generators, and many other +# compiler-related programs. +# . +# LLVM uses a single, language-independent virtual instruction set both +# as an offline code representation (to communicate code between +# compiler phases and to run-time systems) and as the compiler internal +# representation (to analyze and transform programs). This persistent +# code representation allows a common set of sophisticated compiler +# techniques to be applied at compile-time, link-time, install-time, +# run-time, or "idle-time" (between program runs). +# . +# This package provides the OCaml bindings to develop applications using llvm. Package: llvm-4.0-doc Section: doc diff --git a/debian/rules b/debian/rules index a435accf..eebaf11a 100755 --- a/debian/rules +++ b/debian/rules @@ -170,6 +170,8 @@ ifneq (,$(filter $(DEB_HOST_ARCH),$(OCAML_ARCHS))) OCAML_STDLIB_DIR ?= $(shell ocamlc -where) DH_OPTIONS=--with ocaml endif +# Force the deactivation of ocaml until the transition is done +OCAML_ENABLE=no LIBFUZZER_ENABLE=yes ifeq (,$(filter $(DEB_HOST_ARCH_OS),linux)) From bb01588c4fac3d46f2c1631b21e566aab5b9d885 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 13 Oct 2017 19:27:42 +0000 Subject: [PATCH 59/70] fix the declarations --- debian/rules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index eebaf11a..11a0987d 100755 --- a/debian/rules +++ b/debian/rules @@ -166,9 +166,9 @@ OCAML_ENABLE= no OCAML_ARCHS := amd64 arm64 armel armhf i386 ifneq (,$(filter $(DEB_HOST_ARCH),$(OCAML_ARCHS))) # Enable OCAML for this arch. - OCAML_ENABLE=yes - OCAML_STDLIB_DIR ?= $(shell ocamlc -where) - DH_OPTIONS=--with ocaml + # OCAML_ENABLE=yes + # OCAML_STDLIB_DIR ?= $(shell ocamlc -where) + # DH_OPTIONS=--with ocaml endif # Force the deactivation of ocaml until the transition is done OCAML_ENABLE=no From e784e58e948e1a7ca206b1552f63853cfda37cac Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 13 Oct 2017 19:38:09 +0000 Subject: [PATCH 60/70] comment the ocaml deps --- debian/control | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index 7d2a8970..b6cc0b9d 100644 --- a/debian/control +++ b/debian/control @@ -10,10 +10,10 @@ Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, libjsoncpp-dev, lcov, procps, help2man, zlib1g-dev, g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32], - ocaml-nox [amd64 arm64 armel armhf i386], - ocaml-findlib [amd64 arm64 armel armhf i386], - libctypes-ocaml-dev [amd64 arm64 armel armhf i386], - dh-ocaml [amd64 arm64 armel armhf i386], +# ocaml-nox [amd64 arm64 armel armhf i386], +# ocaml-findlib [amd64 arm64 armel armhf i386], +# libctypes-ocaml-dev [amd64 arm64 armel armhf i386], +# dh-ocaml [amd64 arm64 armel armhf i386], Build-Conflicts: oprofile, ocaml, libllvm-3.4-ocaml-dev, libllvm-3.5-ocaml-dev, libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev Standards-Version: 4.1.0 From be94a5a691f1d669f5d7280b6afeba57f4801aab Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 18 Oct 2017 14:13:52 +0000 Subject: [PATCH 61/70] * Non-maintainer upload. * Backport some patches (originally from rust, and upstreamed) to fix two failing tests in rustc. --- debian/changelog | 8 + ...ifyCFG-Hoisting-invalidates-metadata.patch | 84 ---- debian/patches/rL298540.diff | 292 ++++++++++++ debian/patches/rL305193-backport.diff | 442 ++++++++++++++++++ debian/patches/rL306267.diff | 187 ++++++++ debian/patches/rL306353.diff | 47 ++ debian/patches/rL306358.diff | 52 +++ debian/patches/rL306379.diff | 147 ++++++ debian/patches/series | 11 +- 9 files changed, 1185 insertions(+), 85 deletions(-) delete mode 100644 debian/patches/0011-SimplifyCFG-Hoisting-invalidates-metadata.patch create mode 100644 debian/patches/rL298540.diff create mode 100644 debian/patches/rL305193-backport.diff create mode 100644 debian/patches/rL306267.diff create mode 100644 debian/patches/rL306353.diff create mode 100644 debian/patches/rL306358.diff create mode 100644 debian/patches/rL306379.diff diff --git a/debian/changelog b/debian/changelog index c72bc370..0589323f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +llvm-toolchain-4.0 (1:4.0.1-7.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Backport some patches (originally from rust, and upstreamed) to fix two + failing tests in rustc. + + -- Ximin Luo Wed, 18 Oct 2017 15:28:20 +0200 + llvm-toolchain-4.0 (1:4.0.1-7) unstable; urgency=medium * Force the deactivation of ocaml until the transition is done diff --git a/debian/patches/0011-SimplifyCFG-Hoisting-invalidates-metadata.patch b/debian/patches/0011-SimplifyCFG-Hoisting-invalidates-metadata.patch deleted file mode 100644 index b184a402..00000000 --- a/debian/patches/0011-SimplifyCFG-Hoisting-invalidates-metadata.patch +++ /dev/null @@ -1,84 +0,0 @@ -From eee68eafa7e8e4ce996b49f5551636639a6c331a Mon Sep 17 00:00:00 2001 -From: David Majnemer -Date: Mon, 29 Aug 2016 17:14:08 +0000 -Subject: [PATCH 11/17] [SimplifyCFG] Hoisting invalidates metadata - -We forgot to remove optimization metadata when performing hosting during -FoldTwoEntryPHINode. - -This fixes PR29163. - -git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279980 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - lib/Transforms/Utils/SimplifyCFG.cpp | 10 ++++++++-- - test/Transforms/SimplifyCFG/PR29163.ll | 31 +++++++++++++++++++++++++++++++ - 2 files changed, 39 insertions(+), 2 deletions(-) - create mode 100644 test/Transforms/SimplifyCFG/PR29163.ll - -diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp -index 0504646..c197317 100644 ---- a/lib/Transforms/Utils/SimplifyCFG.cpp -+++ b/lib/Transforms/Utils/SimplifyCFG.cpp -@@ -2024,14 +2024,20 @@ static bool FoldTwoEntryPHINode(PHINode *PN, const TargetTransformInfo &TTI, - - // Move all 'aggressive' instructions, which are defined in the - // conditional parts of the if's up to the dominating block. -- if (IfBlock1) -+ if (IfBlock1) { -+ for (auto &I : *IfBlock1) -+ I.dropUnknownNonDebugMetadata(); - DomBlock->getInstList().splice(InsertPt->getIterator(), - IfBlock1->getInstList(), IfBlock1->begin(), - IfBlock1->getTerminator()->getIterator()); -- if (IfBlock2) -+ } -+ if (IfBlock2) { -+ for (auto &I : *IfBlock2) -+ I.dropUnknownNonDebugMetadata(); - DomBlock->getInstList().splice(InsertPt->getIterator(), - IfBlock2->getInstList(), IfBlock2->begin(), - IfBlock2->getTerminator()->getIterator()); -+ } - - while (PHINode *PN = dyn_cast(BB->begin())) { - // Change the PHI node into a select instruction. -diff --git a/test/Transforms/SimplifyCFG/PR29163.ll b/test/Transforms/SimplifyCFG/PR29163.ll -new file mode 100644 -index 0000000..65f9090 ---- /dev/null -+++ b/test/Transforms/SimplifyCFG/PR29163.ll -@@ -0,0 +1,31 @@ -+; RUN: opt -S -simplifycfg < %s | FileCheck %s -+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -+target triple = "x86_64-unknown-linux-gnu" -+ -+@GV = external constant i64* -+ -+define i64* @test1(i1 %cond, i8* %P) { -+entry: -+ br i1 %cond, label %if, label %then -+ -+then: -+ %bc = bitcast i8* %P to i64* -+ br label %join -+ -+if: -+ %load = load i64*, i64** @GV, align 8, !dereferenceable !0 -+ br label %join -+ -+join: -+ %phi = phi i64* [ %bc, %then ], [ %load, %if ] -+ ret i64* %phi -+} -+ -+; CHECK-LABEL: define i64* @test1( -+; CHECK: %[[bc:.*]] = bitcast i8* %P to i64* -+; CHECK: %[[load:.*]] = load i64*, i64** @GV, align 8{{$}} -+; CHECK: %[[phi:.*]] = select i1 %cond, i64* %[[load]], i64* %[[bc]] -+; CHECK: ret i64* %[[phi]] -+ -+ -+!0 = !{i64 8} --- -2.10.1 - diff --git a/debian/patches/rL298540.diff b/debian/patches/rL298540.diff new file mode 100644 index 00000000..23f328f6 --- /dev/null +++ b/debian/patches/rL298540.diff @@ -0,0 +1,292 @@ +commit 2b66aeed20b61d42cd2782b94d5419c6faca49a1 +Author: Luqman Aden +Date: Wed Mar 22 19:16:39 2017 +0000 + + Preserve nonnull metadata on Loads through SROA & mem2reg. + + Summary: + https://llvm.org/bugs/show_bug.cgi?id=31142 : + + SROA was dropping the nonnull metadata on loads from allocas that got optimized out. This patch simply preserves nonnull metadata on loads through SROA and mem2reg. + + Reviewers: chandlerc, efriedma + + Reviewed By: efriedma + + Subscribers: hfinkel, spatel, efriedma, arielb1, davide, llvm-commits + + Differential Revision: https://reviews.llvm.org/D27114 + + git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298540 91177308-0d34-0410-b5e6-96231b3b80d8 + +--- a/lib/Transforms/Scalar/SROA.cpp ++++ b/lib/Transforms/Scalar/SROA.cpp +@@ -2387,6 +2387,10 @@ + LI.isVolatile(), LI.getName()); + if (LI.isVolatile()) + NewLI->setAtomic(LI.getOrdering(), LI.getSynchScope()); ++ ++ // Try to preserve nonnull metadata ++ if (TargetTy->isPointerTy()) ++ NewLI->copyMetadata(LI, LLVMContext::MD_nonnull); + V = NewLI; + + // If this is an integer load past the end of the slice (which means the +--- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp ++++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +@@ -15,7 +15,6 @@ + // + //===----------------------------------------------------------------------===// + +-#include "llvm/Transforms/Utils/PromoteMemToReg.h" + #include "llvm/ADT/ArrayRef.h" + #include "llvm/ADT/DenseMap.h" + #include "llvm/ADT/STLExtras.h" +@@ -23,6 +22,7 @@ + #include "llvm/ADT/SmallVector.h" + #include "llvm/ADT/Statistic.h" + #include "llvm/Analysis/AliasSetTracker.h" ++#include "llvm/Analysis/AssumptionCache.h" + #include "llvm/Analysis/InstructionSimplify.h" + #include "llvm/Analysis/IteratedDominanceFrontier.h" + #include "llvm/Analysis/ValueTracking.h" +@@ -38,6 +38,7 @@ + #include "llvm/IR/Metadata.h" + #include "llvm/IR/Module.h" + #include "llvm/Transforms/Utils/Local.h" ++#include "llvm/Transforms/Utils/PromoteMemToReg.h" + #include + using namespace llvm; + +@@ -301,6 +302,18 @@ + + } // end of anonymous namespace + ++/// Given a LoadInst LI this adds assume(LI != null) after it. ++static void addAssumeNonNull(AssumptionCache *AC, LoadInst *LI) { ++ Function *AssumeIntrinsic = ++ Intrinsic::getDeclaration(LI->getModule(), Intrinsic::assume); ++ ICmpInst *LoadNotNull = new ICmpInst(ICmpInst::ICMP_NE, LI, ++ Constant::getNullValue(LI->getType())); ++ LoadNotNull->insertAfter(LI); ++ CallInst *CI = CallInst::Create(AssumeIntrinsic, {LoadNotNull}); ++ CI->insertAfter(LoadNotNull); ++ AC->registerAssumption(CI); ++} ++ + static void removeLifetimeIntrinsicUsers(AllocaInst *AI) { + // Knowing that this alloca is promotable, we know that it's safe to kill all + // instructions except for load and store. +@@ -334,9 +347,9 @@ + /// and thus must be phi-ed with undef. We fall back to the standard alloca + /// promotion algorithm in that case. + static bool rewriteSingleStoreAlloca(AllocaInst *AI, AllocaInfo &Info, +- LargeBlockInfo &LBI, +- DominatorTree &DT, +- AliasSetTracker *AST) { ++ LargeBlockInfo &LBI, DominatorTree &DT, ++ AliasSetTracker *AST, ++ AssumptionCache *AC) { + StoreInst *OnlyStore = Info.OnlyStore; + bool StoringGlobalVal = !isa(OnlyStore->getOperand(0)); + BasicBlock *StoreBB = OnlyStore->getParent(); +@@ -387,6 +400,14 @@ + // code. + if (ReplVal == LI) + ReplVal = UndefValue::get(LI->getType()); ++ ++ // If the load was marked as nonnull we don't want to lose ++ // that information when we erase this Load. So we preserve ++ // it with an assume. ++ if (AC && LI->getMetadata(LLVMContext::MD_nonnull) && ++ !llvm::isKnownNonNullAt(ReplVal, LI, &DT)) ++ addAssumeNonNull(AC, LI); ++ + LI->replaceAllUsesWith(ReplVal); + if (AST && LI->getType()->isPointerTy()) + AST->deleteValue(LI); +@@ -435,7 +456,9 @@ + /// } + static bool promoteSingleBlockAlloca(AllocaInst *AI, const AllocaInfo &Info, + LargeBlockInfo &LBI, +- AliasSetTracker *AST) { ++ AliasSetTracker *AST, ++ DominatorTree &DT, ++ AssumptionCache *AC) { + // The trickiest case to handle is when we have large blocks. Because of this, + // this code is optimized assuming that large blocks happen. This does not + // significantly pessimize the small block case. This uses LargeBlockInfo to +@@ -476,10 +499,17 @@ + // There is no store before this load, bail out (load may be affected + // by the following stores - see main comment). + return false; +- } +- else ++ } else { + // Otherwise, there was a store before this load, the load takes its value. +- LI->replaceAllUsesWith(std::prev(I)->second->getOperand(0)); ++ // Note, if the load was marked as nonnull we don't want to lose that ++ // information when we erase it. So we preserve it with an assume. ++ Value *ReplVal = std::prev(I)->second->getOperand(0); ++ if (AC && LI->getMetadata(LLVMContext::MD_nonnull) && ++ !llvm::isKnownNonNullAt(ReplVal, LI, &DT)) ++ addAssumeNonNull(AC, LI); ++ ++ LI->replaceAllUsesWith(ReplVal); ++ } + + if (AST && LI->getType()->isPointerTy()) + AST->deleteValue(LI); +@@ -553,7 +583,7 @@ + // If there is only a single store to this value, replace any loads of + // it that are directly dominated by the definition with the value stored. + if (Info.DefiningBlocks.size() == 1) { +- if (rewriteSingleStoreAlloca(AI, Info, LBI, DT, AST)) { ++ if (rewriteSingleStoreAlloca(AI, Info, LBI, DT, AST, AC)) { + // The alloca has been processed, move on. + RemoveFromAllocasList(AllocaNum); + ++NumSingleStore; +@@ -564,7 +594,7 @@ + // If the alloca is only read and written in one basic block, just perform a + // linear sweep over the block to eliminate it. + if (Info.OnlyUsedInOneBlock && +- promoteSingleBlockAlloca(AI, Info, LBI, AST)) { ++ promoteSingleBlockAlloca(AI, Info, LBI, AST, DT, AC)) { + // The alloca has been processed, move on. + RemoveFromAllocasList(AllocaNum); + continue; +@@ -940,6 +970,13 @@ + + Value *V = IncomingVals[AI->second]; + ++ // If the load was marked as nonnull we don't want to lose ++ // that information when we erase this Load. So we preserve ++ // it with an assume. ++ if (AC && LI->getMetadata(LLVMContext::MD_nonnull) && ++ !llvm::isKnownNonNullAt(V, LI, &DT)) ++ addAssumeNonNull(AC, LI); ++ + // Anything using the load now uses the current value. + LI->replaceAllUsesWith(V); + if (AST && LI->getType()->isPointerTy()) +--- /dev/null ++++ b/test/Transforms/Mem2Reg/preserve-nonnull-load-metadata.ll +@@ -0,0 +1,89 @@ ++; RUN: opt < %s -mem2reg -S | FileCheck %s ++ ++; This tests that mem2reg preserves the !nonnull metadata on loads ++; from allocas that get optimized out. ++ ++; Check the case where the alloca in question has a single store. ++define float* @single_store(float** %arg) { ++; CHECK-LABEL: define float* @single_store ++; CHECK: %arg.load = load float*, float** %arg, align 8 ++; CHECK: [[ASSUME:%(.*)]] = icmp ne float* %arg.load, null ++; CHECK: call void @llvm.assume(i1 {{.*}}[[ASSUME]]) ++; CHECK: ret float* %arg.load ++entry: ++ %buf = alloca float* ++ %arg.load = load float*, float** %arg, align 8 ++ store float* %arg.load, float** %buf, align 8 ++ %buf.load = load float*, float **%buf, !nonnull !0 ++ ret float* %buf.load ++} ++ ++; Check the case where the alloca in question has more than one ++; store but still within one basic block. ++define float* @single_block(float** %arg) { ++; CHECK-LABEL: define float* @single_block ++; CHECK: %arg.load = load float*, float** %arg, align 8 ++; CHECK: [[ASSUME:%(.*)]] = icmp ne float* %arg.load, null ++; CHECK: call void @llvm.assume(i1 {{.*}}[[ASSUME]]) ++; CHECK: ret float* %arg.load ++entry: ++ %buf = alloca float* ++ %arg.load = load float*, float** %arg, align 8 ++ store float* null, float** %buf, align 8 ++ store float* %arg.load, float** %buf, align 8 ++ %buf.load = load float*, float **%buf, !nonnull !0 ++ ret float* %buf.load ++} ++ ++; Check the case where the alloca in question has more than one ++; store and also reads ands writes in multiple blocks. ++define float* @multi_block(float** %arg) { ++; CHECK-LABEL: define float* @multi_block ++; CHECK-LABEL: entry: ++; CHECK: %arg.load = load float*, float** %arg, align 8 ++; CHECK: br label %next ++; CHECK-LABEL: next: ++; CHECK: [[ASSUME:%(.*)]] = icmp ne float* %arg.load, null ++; CHECK: call void @llvm.assume(i1 {{.*}}[[ASSUME]]) ++; CHECK: ret float* %arg.load ++entry: ++ %buf = alloca float* ++ %arg.load = load float*, float** %arg, align 8 ++ store float* null, float** %buf, align 8 ++ br label %next ++next: ++ store float* %arg.load, float** %buf, align 8 ++ %buf.load = load float*, float** %buf, !nonnull !0 ++ ret float* %buf.load ++} ++ ++; Check that we don't add an assume if it's not ++; necessary i.e. the value is already implied to be nonnull ++define float* @no_assume(float** %arg) { ++; CHECK-LABEL: define float* @no_assume ++; CHECK-LABEL: entry: ++; CHECK: %arg.load = load float*, float** %arg, align 8 ++; CHECK: %cn = icmp ne float* %arg.load, null ++; CHECK: br i1 %cn, label %next, label %fin ++; CHECK-LABEL: next: ++; CHECK-NOT: call void @llvm.assume ++; CHECK: ret float* %arg.load ++; CHECK-LABEL: fin: ++; CHECK: ret float* null ++entry: ++ %buf = alloca float* ++ %arg.load = load float*, float** %arg, align 8 ++ %cn = icmp ne float* %arg.load, null ++ br i1 %cn, label %next, label %fin ++next: ++; At this point the above nonnull check ensures that ++; the value %arg.load is nonnull in this block and thus ++; we need not add the assume. ++ store float* %arg.load, float** %buf, align 8 ++ %buf.load = load float*, float** %buf, !nonnull !0 ++ ret float* %buf.load ++fin: ++ ret float* null ++} ++ ++!0 = !{} +--- /dev/null ++++ b/test/Transforms/SROA/preserve-nonnull.ll +@@ -0,0 +1,26 @@ ++; RUN: opt < %s -sroa -S | FileCheck %s ++; ++; Make sure that SROA doesn't lose nonnull metadata ++; on loads from allocas that get optimized out. ++ ++; CHECK-LABEL: define float* @yummy_nonnull ++; CHECK: [[RETURN:%(.*)]] = load float*, float** %arg, align 8 ++; CHECK: [[ASSUME:%(.*)]] = icmp ne float* {{.*}}[[RETURN]], null ++; CHECK: call void @llvm.assume(i1 {{.*}}[[ASSUME]]) ++; CHECK: ret float* {{.*}}[[RETURN]] ++ ++define float* @yummy_nonnull(float** %arg) { ++entry-block: ++ %buf = alloca float* ++ ++ %_arg_i8 = bitcast float** %arg to i8* ++ %_buf_i8 = bitcast float** %buf to i8* ++ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %_buf_i8, i8* %_arg_i8, i64 8, i32 8, i1 false) ++ ++ %ret = load float*, float** %buf, align 8, !nonnull !0 ++ ret float* %ret ++} ++ ++declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32, i1) ++ ++!0 = !{} diff --git a/debian/patches/rL305193-backport.diff b/debian/patches/rL305193-backport.diff new file mode 100644 index 00000000..0f6d9ff0 --- /dev/null +++ b/debian/patches/rL305193-backport.diff @@ -0,0 +1,442 @@ +commit 2b622a393ce80c6157d32a50bf67d6b830729469 +Author: Than McIntosh +Date: Mon Jun 12 14:56:02 2017 +0000 + + StackColoring: smarter check for slot overlap + + Summary: + The old check for slot overlap treated 2 slots `S` and `T` as + overlapping if there existed a CFG node in which both of the slots could + possibly be active. That is overly conservative and caused stack blowups + in Rust programs. Instead, check whether there is a single CFG node in + which both of the slots are possibly active *together*. + + Fixes PR32488. + + Patch by Ariel Ben-Yehuda + + Reviewers: thanm, nagisa, llvm-commits, efriedma, rnk + + Reviewed By: thanm + + Subscribers: dotdash + + Differential Revision: https://reviews.llvm.org/D31583 + + git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305193 91177308-0d34-0410-b5e6-96231b3b80d8 + +--- a/lib/CodeGen/StackColoring.cpp ++++ b/lib/CodeGen/StackColoring.cpp +@@ -87,10 +87,134 @@ + STATISTIC(StackSlotMerged, "Number of stack slot merged."); + STATISTIC(EscapedAllocas, "Number of allocas that escaped the lifetime region"); + ++//===----------------------------------------------------------------------===// ++// StackColoring Pass ++//===----------------------------------------------------------------------===// ++// ++// Stack Coloring reduces stack usage by merging stack slots when they ++// can't be used together. For example, consider the following C program: ++// ++// void bar(char *, int); ++// void foo(bool var) { ++// A: { ++// char z[4096]; ++// bar(z, 0); ++// } ++// ++// char *p; ++// char x[4096]; ++// char y[4096]; ++// if (var) { ++// p = x; ++// } else { ++// bar(y, 1); ++// p = y + 1024; ++// } ++// B: ++// bar(p, 2); ++// } ++// ++// Naively-compiled, this program would use 12k of stack space. However, the ++// stack slot corresponding to `z` is always destroyed before either of the ++// stack slots for `x` or `y` are used, and then `x` is only used if `var` ++// is true, while `y` is only used if `var` is false. So in no time are 2 ++// of the stack slots used together, and therefore we can merge them, ++// compiling the function using only a single 4k alloca: ++// ++// void foo(bool var) { // equivalent ++// char x[4096]; ++// char *p; ++// bar(x, 0); ++// if (var) { ++// p = x; ++// } else { ++// bar(x, 1); ++// p = x + 1024; ++// } ++// bar(p, 2); ++// } ++// ++// This is an important optimization if we want stack space to be under ++// control in large functions, both open-coded ones and ones created by ++// inlining. + // + // Implementation Notes: + // --------------------- + // ++// An important part of the above reasoning is that `z` can't be accessed ++// while the latter 2 calls to `bar` are running. This is justified because ++// `z`'s lifetime is over after we exit from block `A:`, so any further ++// accesses to it would be UB. The way we represent this information ++// in LLVM is by having frontends delimit blocks with `lifetime.start` ++// and `lifetime.end` intrinsics. ++// ++// The effect of these intrinsics seems to be as follows (maybe I should ++// specify this in the reference?): ++// ++// L1) at start, each stack-slot is marked as *out-of-scope*, unless no ++// lifetime intrinsic refers to that stack slot, in which case ++// it is marked as *in-scope*. ++// L2) on a `lifetime.start`, a stack slot is marked as *in-scope* and ++// the stack slot is overwritten with `undef`. ++// L3) on a `lifetime.end`, a stack slot is marked as *out-of-scope*. ++// L4) on function exit, all stack slots are marked as *out-of-scope*. ++// L5) `lifetime.end` is a no-op when called on a slot that is already ++// *out-of-scope*. ++// L6) memory accesses to *out-of-scope* stack slots are UB. ++// L7) when a stack-slot is marked as *out-of-scope*, all pointers to it ++// are invalidated, unless the slot is "degenerate". This is used to ++// justify not marking slots as in-use until the pointer to them is ++// used, but feels a bit hacky in the presence of things like LICM. See ++// the "Degenerate Slots" section for more details. ++// ++// Now, let's ground stack coloring on these rules. We'll define a slot ++// as *in-use* at a (dynamic) point in execution if it either can be ++// written to at that point, or if it has a live and non-undef content ++// at that point. ++// ++// Obviously, slots that are never *in-use* together can be merged, and ++// in our example `foo`, the slots for `x`, `y` and `z` are never ++// in-use together (of course, sometimes slots that *are* in-use together ++// might still be mergable, but we don't care about that here). ++// ++// In this implementation, we successively merge pairs of slots that are ++// not *in-use* together. We could be smarter - for example, we could merge ++// a single large slot with 2 small slots, or we could construct the ++// interference graph and run a "smart" graph coloring algorithm, but with ++// that aside, how do we find out whether a pair of slots might be *in-use* ++// together? ++// ++// From our rules, we see that *out-of-scope* slots are never *in-use*, ++// and from (L7) we see that "non-degenerate" slots remain non-*in-use* ++// until their address is taken. Therefore, we can approximate slot activity ++// using dataflow. ++// ++// A subtle point: naively, we might try to figure out which pairs of ++// stack-slots interfere by propagating `S in-use` through the CFG for every ++// stack-slot `S`, and having `S` and `T` interfere if there is a CFG point in ++// which they are both *in-use*. ++// ++// That is sound, but overly conservative in some cases: in our (artificial) ++// example `foo`, either `x` or `y` might be in use at the label `B:`, but ++// as `x` is only in use if we came in from the `var` edge and `y` only ++// if we came from the `!var` edge, they still can't be in use together. ++// See PR32488 for an important real-life case. ++// ++// If we wanted to find all points of interference precisely, we could ++// propagate `S in-use` and `S&T in-use` predicates through the CFG. That ++// would be precise, but requires propagating `O(n^2)` dataflow facts. ++// ++// However, we aren't interested in the *set* of points of interference ++// between 2 stack slots, only *whether* there *is* such a point. So we ++// can rely on a little trick: for `S` and `T` to be in-use together, ++// one of them needs to become in-use while the other is in-use (or ++// they might both become in use simultaneously). We can check this ++// by also keeping track of the points at which a stack slot might *start* ++// being in-use. ++// ++// Exact first use: ++// ---------------- ++// + // Consider the following motivating example: + // + // int foo() { +@@ -159,6 +283,9 @@ + // lifetime, we can additionally overlap b1 and b5, giving us a 3*1024 + // byte stack (better). + // ++// Degenerate Slots: ++// ----------------- ++// + // Relying entirely on first-use of stack slots is problematic, + // however, due to the fact that optimizations can sometimes migrate + // uses of a variable outside of its lifetime start/end region. Here +@@ -238,10 +365,6 @@ + // for "b" then it will appear that 'b' has a degenerate lifetime. + // + +-//===----------------------------------------------------------------------===// +-// StackColoring Pass +-//===----------------------------------------------------------------------===// +- + namespace { + /// StackColoring - A machine pass for merging disjoint stack allocations, + /// marked by the LIFETIME_START and LIFETIME_END pseudo instructions. +@@ -272,8 +395,11 @@ + /// Maps basic blocks to a serial number. + SmallVector BasicBlockNumbering; + +- /// Maps liveness intervals for each slot. ++ /// Maps slots to their use interval. Outside of this interval, slots ++ /// values are either dead or `undef` and they will not be written to. + SmallVector, 16> Intervals; ++ /// Maps slots to the points where they can become in-use. ++ SmallVector, 16> LiveStarts; + /// VNInfo is used for the construction of LiveIntervals. + VNInfo::Allocator VNInfoAllocator; + /// SlotIndex analysis object. +@@ -676,15 +802,22 @@ + + void StackColoring::calculateLiveIntervals(unsigned NumSlots) { + SmallVector Starts; +- SmallVector Finishes; ++ SmallVector DefinitelyInUse; + + // For each block, find which slots are active within this block + // and update the live intervals. + for (const MachineBasicBlock &MBB : *MF) { + Starts.clear(); + Starts.resize(NumSlots); +- Finishes.clear(); +- Finishes.resize(NumSlots); ++ DefinitelyInUse.clear(); ++ DefinitelyInUse.resize(NumSlots); ++ ++ // Start the interval of the slots that we previously found to be 'in-use'. ++ BlockLifetimeInfo &MBBLiveness = BlockLiveness[&MBB]; ++ for (int pos = MBBLiveness.LiveIn.find_first(); pos != -1; ++ pos = MBBLiveness.LiveIn.find_next(pos)) { ++ Starts[pos] = Indexes->getMBBStartIdx(&MBB); ++ } + + // Create the interval for the basic blocks containing lifetime begin/end. + for (const MachineInstr &MI : MBB) { +@@ -696,68 +829,35 @@ + SlotIndex ThisIndex = Indexes->getInstructionIndex(MI); + for (auto Slot : slots) { + if (IsStart) { +- if (!Starts[Slot].isValid() || Starts[Slot] > ThisIndex) ++ // If a slot is already definitely in use, we don't have to emit ++ // a new start marker because there is already a pre-existing ++ // one. ++ if (!DefinitelyInUse[Slot]) { ++ LiveStarts[Slot].push_back(ThisIndex); ++ DefinitelyInUse[Slot] = true; ++ } ++ if (!Starts[Slot].isValid()) + Starts[Slot] = ThisIndex; + } else { +- if (!Finishes[Slot].isValid() || Finishes[Slot] < ThisIndex) +- Finishes[Slot] = ThisIndex; ++ if (Starts[Slot].isValid()) { ++ VNInfo *VNI = Intervals[Slot]->getValNumInfo(0); ++ Intervals[Slot]->addSegment( ++ LiveInterval::Segment(Starts[Slot], ThisIndex, VNI)); ++ Starts[Slot] = SlotIndex(); // Invalidate the start index ++ DefinitelyInUse[Slot] = false; ++ } + } + } + } + +- // Create the interval of the blocks that we previously found to be 'alive'. +- BlockLifetimeInfo &MBBLiveness = BlockLiveness[&MBB]; +- for (int pos = MBBLiveness.LiveIn.find_first(); pos != -1; +- pos = MBBLiveness.LiveIn.find_next(pos)) { +- Starts[pos] = Indexes->getMBBStartIdx(&MBB); +- } +- for (int pos = MBBLiveness.LiveOut.find_first(); pos != -1; +- pos = MBBLiveness.LiveOut.find_next(pos)) { +- Finishes[pos] = Indexes->getMBBEndIdx(&MBB); +- } +- ++ // Finish up started segments + for (unsigned i = 0; i < NumSlots; ++i) { +- // +- // When LifetimeStartOnFirstUse is turned on, data flow analysis +- // is forward (from starts to ends), not bidirectional. A +- // consequence of this is that we can wind up in situations +- // where Starts[i] is invalid but Finishes[i] is valid and vice +- // versa. Example: +- // +- // LIFETIME_START x +- // if (...) { +- // +- // throw ...; +- // } +- // LIFETIME_END x +- // return 2; +- // +- // +- // Here the slot for "x" will not be live into the block +- // containing the "return 2" (since lifetimes start with first +- // use, not at the dominating LIFETIME_START marker). +- // +- if (Starts[i].isValid() && !Finishes[i].isValid()) { +- Finishes[i] = Indexes->getMBBEndIdx(&MBB); +- } + if (!Starts[i].isValid()) + continue; + +- assert(Starts[i] && Finishes[i] && "Invalid interval"); +- VNInfo *ValNum = Intervals[i]->getValNumInfo(0); +- SlotIndex S = Starts[i]; +- SlotIndex F = Finishes[i]; +- if (S < F) { +- // We have a single consecutive region. +- Intervals[i]->addSegment(LiveInterval::Segment(S, F, ValNum)); +- } else { +- // We have two non-consecutive regions. This happens when +- // LIFETIME_START appears after the LIFETIME_END marker. +- SlotIndex NewStart = Indexes->getMBBStartIdx(&MBB); +- SlotIndex NewFin = Indexes->getMBBEndIdx(&MBB); +- Intervals[i]->addSegment(LiveInterval::Segment(NewStart, F, ValNum)); +- Intervals[i]->addSegment(LiveInterval::Segment(S, NewFin, ValNum)); +- } ++ SlotIndex EndIdx = Indexes->getMBBEndIdx(&MBB); ++ VNInfo *VNI = Intervals[i]->getValNumInfo(0); ++ Intervals[i]->addSegment(LiveInterval::Segment(Starts[i], EndIdx, VNI)); + } + } + } +@@ -987,6 +1087,7 @@ + BasicBlockNumbering.clear(); + Markers.clear(); + Intervals.clear(); ++ LiveStarts.clear(); + VNInfoAllocator.Reset(); + + unsigned NumSlots = MFI->getObjectIndexEnd(); +@@ -998,6 +1099,7 @@ + SmallVector SortedSlots; + SortedSlots.reserve(NumSlots); + Intervals.reserve(NumSlots); ++ LiveStarts.resize(NumSlots); + + unsigned NumMarkers = collectMarkers(NumSlots); + +@@ -1069,6 +1171,9 @@ + return MFI->getObjectSize(LHS) > MFI->getObjectSize(RHS); + }); + ++ for (auto &s : LiveStarts) ++ std::sort(s.begin(), s.end()); ++ + bool Changed = true; + while (Changed) { + Changed = false; +@@ -1084,12 +1189,22 @@ + int SecondSlot = SortedSlots[J]; + LiveInterval *First = &*Intervals[FirstSlot]; + LiveInterval *Second = &*Intervals[SecondSlot]; ++ auto &FirstS = LiveStarts[FirstSlot]; ++ auto &SecondS = LiveStarts[SecondSlot]; + assert (!First->empty() && !Second->empty() && "Found an empty range"); + +- // Merge disjoint slots. +- if (!First->overlaps(*Second)) { ++ // Merge disjoint slots. This is a little bit tricky - see the ++ // Implementation Notes section for an explanation. ++ if (!First->isLiveAtIndexes(SecondS) && ++ !Second->isLiveAtIndexes(FirstS)) { + Changed = true; + First->MergeSegmentsInAsValue(*Second, First->getValNumInfo(0)); ++ ++ int OldSize = FirstS.size(); ++ FirstS.append(SecondS.begin(), SecondS.end()); ++ auto Mid = FirstS.begin() + OldSize; ++ std::inplace_merge(FirstS.begin(), Mid, FirstS.end()); ++ + SlotRemap[SecondSlot] = FirstSlot; + SortedSlots[J] = -1; + DEBUG(dbgs()<<"Merging #"< +Date: Mon Jun 26 03:31:31 2017 +0000 + + [InstCombine] Factor the logic for propagating !nonnull and !range + metadata out of InstCombine and into helpers. + + NFC, this just exposes the logic used by InstCombine when propagating + metadata from one load instruction to another. The plan is to use this + in SROA to address PR32902. + + If anyone has better ideas about how to factor this or name variables, + I'm all ears, but this seemed like a pretty good start and lets us make + progress on the PR. + + This is based on a patch by Ariel Ben-Yehuda (D34285). + + git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306267 91177308-0d34-0410-b5e6-96231b3b80d8 + +--- a/include/llvm/Transforms/Utils/Local.h ++++ b/include/llvm/Transforms/Utils/Local.h +@@ -366,6 +366,19 @@ + /// during lowering by the GC infrastructure. + bool callsGCLeafFunction(ImmutableCallSite CS); + ++/// Copy a nonnull metadata node to a new load instruction. ++/// ++/// This handles mapping it to range metadata if the new load is an integer ++/// load instead of a pointer load. ++void copyNonnullMetadata(const LoadInst &OldLI, MDNode *N, LoadInst &NewLI); ++ ++/// Copy a range metadata node to a new load instruction. ++/// ++/// This handles mapping it to nonnull metadata if the new load is a pointer ++/// load instead of an integer load and the range doesn't cover null. ++void copyRangeMetadata(const DataLayout &DL, const LoadInst &OldLI, MDNode *N, ++ LoadInst &NewLI); ++ + //===----------------------------------------------------------------------===// + // Intrinsic pattern matching + // +--- a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp ++++ b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +@@ -471,21 +471,7 @@ + break; + + case LLVMContext::MD_nonnull: +- // This only directly applies if the new type is also a pointer. +- if (NewTy->isPointerTy()) { +- NewLoad->setMetadata(ID, N); +- break; +- } +- // If it's integral now, translate it to !range metadata. +- if (NewTy->isIntegerTy()) { +- auto *ITy = cast(NewTy); +- auto *NullInt = ConstantExpr::getPtrToInt( +- ConstantPointerNull::get(cast(Ptr->getType())), ITy); +- auto *NonNullInt = +- ConstantExpr::getAdd(NullInt, ConstantInt::get(ITy, 1)); +- NewLoad->setMetadata(LLVMContext::MD_range, +- MDB.createRange(NonNullInt, NullInt)); +- } ++ copyNonnullMetadata(LI, N, *NewLoad); + break; + case LLVMContext::MD_align: + case LLVMContext::MD_dereferenceable: +@@ -495,17 +481,7 @@ + NewLoad->setMetadata(ID, N); + break; + case LLVMContext::MD_range: +- // FIXME: It would be nice to propagate this in some way, but the type +- // conversions make it hard. +- +- // If it's a pointer now and the range does not contain 0, make it !nonnull. +- if (NewTy->isPointerTy()) { +- unsigned BitWidth = IC.getDataLayout().getTypeSizeInBits(NewTy); +- if (!getConstantRangeFromMetadata(*N).contains(APInt(BitWidth, 0))) { +- MDNode *NN = MDNode::get(LI.getContext(), None); +- NewLoad->setMetadata(LLVMContext::MD_nonnull, NN); +- } +- } ++ copyRangeMetadata(IC.getDataLayout(), LI, N, *NewLoad); + break; + } + } +--- a/lib/Transforms/Utils/Local.cpp ++++ b/lib/Transforms/Utils/Local.cpp +@@ -26,6 +26,7 @@ + #include "llvm/Analysis/LazyValueInfo.h" + #include "llvm/Analysis/ValueTracking.h" + #include "llvm/IR/CFG.h" ++#include "llvm/IR/ConstantRange.h" + #include "llvm/IR/Constants.h" + #include "llvm/IR/DIBuilder.h" + #include "llvm/IR/DataLayout.h" +@@ -1069,7 +1070,7 @@ + } + + /// See if there is a dbg.value intrinsic for DIVar for the PHI node. +-static bool PhiHasDebugValue(DILocalVariable *DIVar, ++static bool PhiHasDebugValue(DILocalVariable *DIVar, + DIExpression *DIExpr, + PHINode *APN) { + // Since we can't guarantee that the original dbg.declare instrinsic +@@ -1152,7 +1153,7 @@ + DbgValue->insertAfter(LI); + } + +-/// Inserts a llvm.dbg.value intrinsic after a phi ++/// Inserts a llvm.dbg.value intrinsic after a phi + /// that has an associated llvm.dbg.decl intrinsic. + void llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI, + PHINode *APN, DIBuilder &Builder) { +@@ -1723,12 +1724,12 @@ + // Preserve !invariant.group in K. + break; + case LLVMContext::MD_align: +- K->setMetadata(Kind, ++ K->setMetadata(Kind, + MDNode::getMostGenericAlignmentOrDereferenceable(JMD, KMD)); + break; + case LLVMContext::MD_dereferenceable: + case LLVMContext::MD_dereferenceable_or_null: +- K->setMetadata(Kind, ++ K->setMetadata(Kind, + MDNode::getMostGenericAlignmentOrDereferenceable(JMD, KMD)); + break; + } +@@ -1812,6 +1813,49 @@ + return false; + } + ++void llvm::copyNonnullMetadata(const LoadInst &OldLI, MDNode *N, ++ LoadInst &NewLI) { ++ auto *NewTy = NewLI.getType(); ++ ++ // This only directly applies if the new type is also a pointer. ++ if (NewTy->isPointerTy()) { ++ NewLI.setMetadata(LLVMContext::MD_nonnull, N); ++ return; ++ } ++ ++ // The only other translation we can do is to integral loads with !range ++ // metadata. ++ if (!NewTy->isIntegerTy()) ++ return; ++ ++ MDBuilder MDB(NewLI.getContext()); ++ const Value *Ptr = OldLI.getPointerOperand(); ++ auto *ITy = cast(NewTy); ++ auto *NullInt = ConstantExpr::getPtrToInt( ++ ConstantPointerNull::get(cast(Ptr->getType())), ITy); ++ auto *NonNullInt = ConstantExpr::getAdd(NullInt, ConstantInt::get(ITy, 1)); ++ NewLI.setMetadata(LLVMContext::MD_range, ++ MDB.createRange(NonNullInt, NullInt)); ++} ++ ++void llvm::copyRangeMetadata(const DataLayout &DL, const LoadInst &OldLI, ++ MDNode *N, LoadInst &NewLI) { ++ auto *NewTy = NewLI.getType(); ++ ++ // Give up unless it is converted to a pointer where there is a single very ++ // valuable mapping we can do reliably. ++ // FIXME: It would be nice to propagate this in more ways, but the type ++ // conversions make it hard. ++ if (!NewTy->isPointerTy()) ++ return; ++ ++ unsigned BitWidth = DL.getTypeSizeInBits(NewTy); ++ if (!getConstantRangeFromMetadata(*N).contains(APInt(BitWidth, 0))) { ++ MDNode *NN = MDNode::get(OldLI.getContext(), None); ++ NewLI.setMetadata(LLVMContext::MD_nonnull, NN); ++ } ++} ++ + namespace { + /// A potential constituent of a bitreverse or bswap expression. See + /// collectBitParts for a fuller explanation. +@@ -1933,7 +1977,7 @@ + unsigned NumMaskedBits = AndMask.countPopulation(); + if (!MatchBitReversals && NumMaskedBits % 8 != 0) + return Result; +- ++ + auto &Res = collectBitParts(I->getOperand(0), MatchBSwaps, + MatchBitReversals, BPS); + if (!Res) diff --git a/debian/patches/rL306353.diff b/debian/patches/rL306353.diff new file mode 100644 index 00000000..fafe3235 --- /dev/null +++ b/debian/patches/rL306353.diff @@ -0,0 +1,47 @@ +commit 477bd758b48cb96477d3dd4cf3b36bf2706e8c1d +Author: Chandler Carruth +Date: Tue Jun 27 02:23:15 2017 +0000 + + [SROA] Clean up a test case a bit prior to adding more testing for + nonnull as part of fixing PR32902. + + git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306353 91177308-0d34-0410-b5e6-96231b3b80d8 + +--- a/test/Transforms/SROA/preserve-nonnull.ll ++++ b/test/Transforms/SROA/preserve-nonnull.ll +@@ -3,22 +3,20 @@ + ; Make sure that SROA doesn't lose nonnull metadata + ; on loads from allocas that get optimized out. + +-; CHECK-LABEL: define float* @yummy_nonnull +-; CHECK: [[RETURN:%(.*)]] = load float*, float** %arg, align 8 +-; CHECK: [[ASSUME:%(.*)]] = icmp ne float* {{.*}}[[RETURN]], null +-; CHECK: call void @llvm.assume(i1 {{.*}}[[ASSUME]]) +-; CHECK: ret float* {{.*}}[[RETURN]] +- + define float* @yummy_nonnull(float** %arg) { +-entry-block: +- %buf = alloca float* +- +- %_arg_i8 = bitcast float** %arg to i8* +- %_buf_i8 = bitcast float** %buf to i8* +- call void @llvm.memcpy.p0i8.p0i8.i64(i8* %_buf_i8, i8* %_arg_i8, i64 8, i32 8, i1 false) +- +- %ret = load float*, float** %buf, align 8, !nonnull !0 +- ret float* %ret ++; CHECK-LABEL: define float* @yummy_nonnull( ++; CHECK-NEXT: entry: ++; CHECK-NEXT: %[[RETURN:.*]] = load float*, float** %arg, align 8 ++; CHECK-NEXT: %[[ASSUME:.*]] = icmp ne float* %[[RETURN]], null ++; CHECK-NEXT: call void @llvm.assume(i1 %[[ASSUME]]) ++; CHECK-NEXT: ret float* %[[RETURN]] ++entry: ++ %buf = alloca float* ++ %_arg_i8 = bitcast float** %arg to i8* ++ %_buf_i8 = bitcast float** %buf to i8* ++ call void @llvm.memcpy.p0i8.p0i8.i64(i8* %_buf_i8, i8* %_arg_i8, i64 8, i32 8, i1 false) ++ %ret = load float*, float** %buf, align 8, !nonnull !0 ++ ret float* %ret + } + + declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32, i1) diff --git a/debian/patches/rL306358.diff b/debian/patches/rL306358.diff new file mode 100644 index 00000000..6f9f05f5 --- /dev/null +++ b/debian/patches/rL306358.diff @@ -0,0 +1,52 @@ +commit 156cc49e505986a1659adaa3a0b5a070372377c8 +Author: Chandler Carruth +Date: Tue Jun 27 03:08:45 2017 +0000 + + [SROA] Further test cleanup and add a test for the actual propagation of + the nonnull attribute distinct from rewriting it into an assume. + + git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306358 91177308-0d34-0410-b5e6-96231b3b80d8 + +--- a/test/Transforms/SROA/preserve-nonnull.ll ++++ b/test/Transforms/SROA/preserve-nonnull.ll +@@ -3,8 +3,31 @@ + ; Make sure that SROA doesn't lose nonnull metadata + ; on loads from allocas that get optimized out. + +-define float* @yummy_nonnull(float** %arg) { +-; CHECK-LABEL: define float* @yummy_nonnull( ++declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32, i1) ++ ++; Check that we do basic propagation of nonnull when rewriting. ++define i8* @propagate_nonnull(i32* %v) { ++; CHECK-LABEL: define i8* @propagate_nonnull( ++; CHECK-NEXT: entry: ++; CHECK-NEXT: %[[A:.*]] = alloca i8* ++; CHECK-NEXT: %[[V_CAST:.*]] = bitcast i32* %v to i8* ++; CHECK-NEXT: store i8* %[[V_CAST]], i8** %[[A]] ++; CHECK-NEXT: %[[LOAD:.*]] = load volatile i8*, i8** %[[A]], !nonnull !0 ++; CHECK-NEXT: ret i8* %[[LOAD]] ++entry: ++ %a = alloca [2 x i8*] ++ %a.gep0 = getelementptr [2 x i8*], [2 x i8*]* %a, i32 0, i32 0 ++ %a.gep1 = getelementptr [2 x i8*], [2 x i8*]* %a, i32 0, i32 1 ++ %a.gep0.cast = bitcast i8** %a.gep0 to i32** ++ %a.gep1.cast = bitcast i8** %a.gep1 to i32** ++ store i32* %v, i32** %a.gep1.cast ++ store i32* null, i32** %a.gep0.cast ++ %load = load volatile i8*, i8** %a.gep1, !nonnull !0 ++ ret i8* %load ++} ++ ++define float* @turn_nonnull_into_assume(float** %arg) { ++; CHECK-LABEL: define float* @turn_nonnull_into_assume( + ; CHECK-NEXT: entry: + ; CHECK-NEXT: %[[RETURN:.*]] = load float*, float** %arg, align 8 + ; CHECK-NEXT: %[[ASSUME:.*]] = icmp ne float* %[[RETURN]], null +@@ -19,6 +42,4 @@ + ret float* %ret + } + +-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32, i1) +- + !0 = !{} diff --git a/debian/patches/rL306379.diff b/debian/patches/rL306379.diff new file mode 100644 index 00000000..58a901b3 --- /dev/null +++ b/debian/patches/rL306379.diff @@ -0,0 +1,147 @@ +commit 7df06519765b14e1b08d7034c82c45a0a653eb25 +Author: Chandler Carruth +Date: Tue Jun 27 08:32:03 2017 +0000 + + [SROA] Fix PR32902 by more carefully propagating !nonnull metadata. + + This is based heavily on the work done ni D34285. I mostly wanted to do + test cleanup for the author to save them some time, but I had a really + hard time understanding why it was so hard to write better test cases + for these issues. + + The problem is that because SROA does a second rewrite of the loads and + because we *don't* propagate !nonnull for non-pointer loads, we first + introduced invalid !nonnull metadata and then stripped it back off just + in time to avoid most ways of this PR manifesting. Moving to the more + careful utility only fixes this by changing the predicate to look at the + new load's type rather than the target type. However, that *does* fix + the bug, and the utility is much nicer including adding range metadata + to model the nonnull property after a conversion to an integer. + + However, we have bigger problems because we don't actually propagate + *range* metadata, and the utility to do this extracted from instcombine + isn't really in good shape to do this currently. It *only* handles the + case of copying range metadata from an integer load to a pointer load. + It doesn't even handle the trivial cases of propagating from one integer + load to another when they are the same width! This utility will need to + be beefed up prior to using in this location to get the metadata to + fully survive. + + And even then, we need to go and teach things to turn the range metadata + into an assume the way we do with nonnull so that when we *promote* an + integer we don't lose the information. + + All of this will require a new test case that looks kind-of like + `preserve-nonnull.ll` does here but focuses on range metadata. It will + also likely require more testing because it needs to correctly handle + changes to the integer width, especially as SROA actively tries to + change the integer width! + + Last but not least, I'm a little worried about hooking the range + metadata up here because the instcombine logic for converting from + a range metadata *to* a nonnull metadata node seems broken in the face + of non-zero address spaces where null is not mapped to the integer `0`. + So that probably needs to get fixed with test cases both in SROA and in + instcombine to cover it. + + But this *does* extract the core PR fix from D34285 of preventing the + !nonnull metadata from being propagated in a broken state just long + enough to feed into promotion and crash value tracking. + + On D34285 there is some discussion of zero-extend handling because it + isn't necessary. First, the new load size covers all of the non-undef + (ie, possibly initialized) bits. This may even extend past the original + alloca if loading those bits could produce valid data. The only way its + valid for us to zero-extend an integer load in SROA is if the original + code had a zero extend or those bits were undef. And we get to assume + things like undef *never* satifies nonnull, so non undef bits can + participate here. No need to special case the zero-extend handling, it + just falls out correctly. + + The original credit goes to Ariel Ben-Yehuda! I'm mostly landing this to + save a few rounds of trivial edits fixing style issues and test case + formulation. + + Differental Revision: D34285 + + git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306379 91177308-0d34-0410-b5e6-96231b3b80d8 + +--- a/lib/Transforms/Scalar/SROA.cpp ++++ b/lib/Transforms/Scalar/SROA.cpp +@@ -2388,9 +2388,20 @@ + if (LI.isVolatile()) + NewLI->setAtomic(LI.getOrdering(), LI.getSynchScope()); + ++ // Any !nonnull metadata or !range metadata on the old load is also valid ++ // on the new load. This is even true in some cases even when the loads ++ // are different types, for example by mapping !nonnull metadata to ++ // !range metadata by modeling the null pointer constant converted to the ++ // integer type. ++ // FIXME: Add support for range metadata here. Currently the utilities ++ // for this don't propagate range metadata in trivial cases from one ++ // integer load to another, don't handle non-addrspace-0 null pointers ++ // correctly, and don't have any support for mapping ranges as the ++ // integer type becomes winder or narrower. ++ if (MDNode *N = LI.getMetadata(LLVMContext::MD_nonnull)) ++ copyNonnullMetadata(LI, N, *NewLI); ++ + // Try to preserve nonnull metadata +- if (TargetTy->isPointerTy()) +- NewLI->copyMetadata(LI, LLVMContext::MD_nonnull); + V = NewLI; + + // If this is an integer load past the end of the slice (which means the +--- a/test/Transforms/SROA/preserve-nonnull.ll ++++ b/test/Transforms/SROA/preserve-nonnull.ll +@@ -42,4 +42,51 @@ + ret float* %ret + } + ++; Make sure we properly handle the !nonnull attribute when we convert ++; a pointer load to an integer load. ++; FIXME: While this doesn't do anythnig actively harmful today, it really ++; should propagate the !nonnull metadata to range metadata. The irony is, it ++; *does* initially, but then we lose that !range metadata before we finish ++; SROA. ++define i8* @propagate_nonnull_to_int() { ++; CHECK-LABEL: define i8* @propagate_nonnull_to_int( ++; CHECK-NEXT: entry: ++; CHECK-NEXT: %[[A:.*]] = alloca i64 ++; CHECK-NEXT: store i64 42, i64* %[[A]] ++; CHECK-NEXT: %[[LOAD:.*]] = load volatile i64, i64* %[[A]] ++; CHECK-NEXT: %[[CAST:.*]] = inttoptr i64 %[[LOAD]] to i8* ++; CHECK-NEXT: ret i8* %[[CAST]] ++entry: ++ %a = alloca [2 x i8*] ++ %a.gep0 = getelementptr [2 x i8*], [2 x i8*]* %a, i32 0, i32 0 ++ %a.gep1 = getelementptr [2 x i8*], [2 x i8*]* %a, i32 0, i32 1 ++ %a.gep0.cast = bitcast i8** %a.gep0 to i64* ++ %a.gep1.cast = bitcast i8** %a.gep1 to i64* ++ store i64 42, i64* %a.gep1.cast ++ store i64 0, i64* %a.gep0.cast ++ %load = load volatile i8*, i8** %a.gep1, !nonnull !0 ++ ret i8* %load ++} ++ ++; Make sure we properly handle the !nonnull attribute when we convert ++; a pointer load to an integer load and immediately promote it to an SSA ++; register. This can fail in interesting ways due to the rewrite iteration of ++; SROA, resulting in PR32902. ++define i8* @propagate_nonnull_to_int_and_promote() { ++; CHECK-LABEL: define i8* @propagate_nonnull_to_int_and_promote( ++; CHECK-NEXT: entry: ++; CHECK-NEXT: %[[PROMOTED_VALUE:.*]] = inttoptr i64 42 to i8* ++; CHECK-NEXT: ret i8* %[[PROMOTED_VALUE]] ++entry: ++ %a = alloca [2 x i8*], align 8 ++ %a.gep0 = getelementptr [2 x i8*], [2 x i8*]* %a, i32 0, i32 0 ++ %a.gep1 = getelementptr [2 x i8*], [2 x i8*]* %a, i32 0, i32 1 ++ %a.gep0.cast = bitcast i8** %a.gep0 to i64* ++ %a.gep1.cast = bitcast i8** %a.gep1 to i64* ++ store i64 42, i64* %a.gep1.cast ++ store i64 0, i64* %a.gep0.cast ++ %load = load i8*, i8** %a.gep1, align 8, !nonnull !0 ++ ret i8* %load ++} ++ + !0 = !{} diff --git a/debian/patches/series b/debian/patches/series index afc43743..b3a3aa51 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -38,7 +38,6 @@ disable-llvm-symbolizer-test.diff clang-tidy-run-bin.diff #bug-30342.diff fix-scan-view-path.diff -#0011-SimplifyCFG-Hoisting-invalidates-metadata.patch clang-fix-cmpxchg8-detection-on-i386.patch lldb-addversion-suffix-to-llvm-server-exec.patch lldb-missing-install.diff @@ -49,3 +48,13 @@ add_symbols_versioning.patch ftfbs-gcc.diff pr81066.diff armhf-bitfield.diff +# rust LLVM PR84, LLVM PR32488 +# This is actually Rust's backport of upstream RL305193 (which doesn't apply cleanly to LLVM 4) +# https://github.com/rust-lang/llvm/commit/2b622a393ce +rL305193-backport.diff +# rust LLVM PR90, LLVM PR32902, PR31142 +rL298540.diff +rL306267.diff +rL306353.diff +rL306358.diff +rL306379.diff From 5e4558a84172a81ec893860060e5ab42396da248 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 19 Oct 2017 07:06:58 +0000 Subject: [PATCH 62/70] * Try to fix the mipsel FTBFS (Closes: #877567) I am trying the first option from the bug: - gsplit-dward on 32 bits archs - -g everywhere Many thanks to Adrian Bunk for that --- debian/changelog | 13 ++++++++++--- debian/patches/rL305193-backport.diff | 24 ++++++++++++------------ debian/rules | 12 +++--------- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0589323f..57189402 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,17 @@ -llvm-toolchain-4.0 (1:4.0.1-7.1) UNRELEASED; urgency=medium +llvm-toolchain-4.0 (1:4.0.1-8) unstable; urgency=medium - * Non-maintainer upload. + [ Ximin Luo ] * Backport some patches (originally from rust, and upstreamed) to fix two failing tests in rustc. - -- Ximin Luo Wed, 18 Oct 2017 15:28:20 +0200 + [ Sylvestre Ledru ] + * Try to fix the mipsel FTBFS (Closes: #877567) + I am trying the first option from the bug: + - gsplit-dward on 32 bits archs + - -g everywhere + Many thanks to Adrian Bunk for that + + -- Sylvestre Ledru Wed, 18 Oct 2017 16:37:25 +0200 llvm-toolchain-4.0 (1:4.0.1-7) unstable; urgency=medium diff --git a/debian/patches/rL305193-backport.diff b/debian/patches/rL305193-backport.diff index 0f6d9ff0..563bc65e 100644 --- a/debian/patches/rL305193-backport.diff +++ b/debian/patches/rL305193-backport.diff @@ -378,15 +378,15 @@ Date: Mon Jun 12 14:56:02 2017 +0000 + %bar = alloca [32 x i64] + %foo_i8 = bitcast [32 x i64]* %foo to i8* + %bar_i8 = bitcast [32 x i64]* %bar to i8* -+ call void @llvm.lifetime.start.p0i8(i64 256, i8* %bar_i8) ++ call void @llvm.lifetime.start(i64 256, i8* %bar_i8) + call void @baz([32 x i64]* %bar, i32 1) -+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %bar_i8) -+ call void @llvm.lifetime.start.p0i8(i64 256, i8* %foo_i8) ++ call void @llvm.lifetime.end(i64 256, i8* %bar_i8) ++ call void @llvm.lifetime.start(i64 256, i8* %foo_i8) + call void @baz([32 x i64]* %foo, i32 1) -+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %foo_i8) -+ call void @llvm.lifetime.start.p0i8(i64 256, i8* %bar_i8) ++ call void @llvm.lifetime.end(i64 256, i8* %foo_i8) ++ call void @llvm.lifetime.start(i64 256, i8* %bar_i8) + call void @baz([32 x i64]* %bar, i32 1) -+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %bar_i8) ++ call void @llvm.lifetime.end(i64 256, i8* %bar_i8) + ret i1 true +} + @@ -403,24 +403,24 @@ Date: Mon Jun 12 14:56:02 2017 +0000 + %bar_i8 = bitcast [32 x i64]* %bar to i8* + br i1 %0, label %if_false, label %if_true +if_false: -+ call void @llvm.lifetime.start.p0i8(i64 256, i8* %bar_i8) ++ call void @llvm.lifetime.start(i64 256, i8* %bar_i8) + call void @baz([32 x i64]* %bar, i32 0) + br i1 %1, label %if_false.1, label %onerr +if_false.1: -+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %bar_i8) ++ call void @llvm.lifetime.end(i64 256, i8* %bar_i8) + br label %merge +if_true: -+ call void @llvm.lifetime.start.p0i8(i64 256, i8* %foo_i8) ++ call void @llvm.lifetime.start(i64 256, i8* %foo_i8) + call void @baz([32 x i64]* %foo, i32 1) + br i1 %1, label %if_true.1, label %onerr +if_true.1: -+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %foo_i8) ++ call void @llvm.lifetime.end(i64 256, i8* %foo_i8) + br label %merge +merge: + ret i1 false +onerr: -+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %foo_i8) -+ call void @llvm.lifetime.end.p0i8(i64 256, i8* %bar_i8) ++ call void @llvm.lifetime.end(i64 256, i8* %foo_i8) ++ call void @llvm.lifetime.end(i64 256, i8* %bar_i8) + call void @destructor() + ret i1 true +} diff --git a/debian/rules b/debian/rules index 11a0987d..c666ccfe 100755 --- a/debian/rules +++ b/debian/rules @@ -35,9 +35,8 @@ ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe)) LDFLAGS_EXTRA += -latomic endif -ENABLE_SPLIT_DWARF_ARCHS := armel armhf i386 mips powerpc -# Only enable gsplit dwarf on archs which needs it -ifneq (,$(filter $(DEB_HOST_ARCH),$(ENABLE_SPLIT_DWARF_ARCHS))) +# Only enable gsplit dwarf on archs which needs it (32 bits) +ifeq ($(DEB_HOST_ARCH_BITS),32) ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.22.52.0.4 ; echo $$?),0) # when using -gsplit-dwarf, it will requires extract-dwo which doesn't exist on precise: # More: https://llvm.org/bugs/show_bug.cgi?id=28841 @@ -46,7 +45,7 @@ ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++ # Only pass -gsplit-dwarf with working version of gcc 7 # More: https://bugs.llvm.org/show_bug.cgi?id=34140 & https://bugs.debian.org/873609 CXXFLAGS_EXTRA += -gsplit-dwarf -else +else $(error "Broken gcc version for -gsplit-dwarf support. Please use < gcc 7 or >= 7.2.0-2") endif # < gcc 7 or >= 7.2.0-2 endif # binutils @@ -62,11 +61,6 @@ export CC=gcc-$(GCC_VERSION) export CXX=g++-$(GCC_VERSION) opt_flags = -O2 -DNDEBUG -ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 ppc64el s390x)) - opt_flags += -g1 -else - opt_flags += -g -endif ifneq (,$(findstring $(DEB_HOST_ARCH),armel)) opt_flags += -marm From 0b6f59ecfb374a7d0a2a5cdecb57ce97290a9f68 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 19 Oct 2017 07:33:27 +0000 Subject: [PATCH 63/70] Update of the copyright file (Closes: #878502) Thanks to Nicholas D Steeves for the work --- debian/changelog | 7 +++++++ debian/copyright | 19 +++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 57189402..8787ae31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-4.0 (1:4.0.1-9) unstable; urgency=medium + + * Update of the copyright file (Closes: #878502) + Thanks to Nicholas D Steeves for the work + + -- Sylvestre Ledru Thu, 19 Oct 2017 09:33:23 +0200 + llvm-toolchain-4.0 (1:4.0.1-8) unstable; urgency=medium [ Ximin Luo ] diff --git a/debian/copyright b/debian/copyright index a50dd550..f5b3185d 100644 --- a/debian/copyright +++ b/debian/copyright @@ -3,7 +3,7 @@ Upstream-Name: LLVM/Clang Source: http://llvm.org/releases/download.html Files: * -Copyright: 2003-2007 University of Illinois at Urbana-Champaign. +Copyright: 2003-2017 University of Illinois at Urbana-Champaign. License: U-OF-I-BSD-LIKE Files: */install-sh @@ -132,6 +132,21 @@ Copyright: 1992, 1993, 1994 Henry Spencer 1992, 1993, 1994 The Regents of the University of California License: BSD-3-clause +Files: lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h +Copyright: 2001 Alexander Peslyak aka Solar Designer +License: solar-public-domain + This software was written by Alexander Peslyak in 2001. No copyright is + claimed, and the software is hereby placed in the public domain. + In case this attempt to disclaim copyright and place the software in the + public domain is deemed null and void, then the software is + Copyright (c) 2001 Alexander Peslyak and it is hereby released to the + general public under the following terms: + . + Redistribution and use in source and binary forms, with or without + modification, are permitted. + . + * There's ABSOLUTELY NO WARRANTY, express or implied. + Files: lib/Target/ARM/* Copyright: ARM Limited License: ARM @@ -370,7 +385,7 @@ License: U-OF-I-BSD-LIKE University of Illinois/NCSA Open Source License . - Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign. + Copyright (c) 2003-2017 University of Illinois at Urbana-Champaign. All rights reserved. . Developed by: From dc60527c264dd29947536dd789644d86a55804b6 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 30 Oct 2017 18:42:15 +0000 Subject: [PATCH 64/70] Take a patch for a stack alignment on sparc64 for rust Thanks to John Paul Adrian Glaubitz for the work (Closes: #880221) --- debian/changelog | 4 +- debian/patches/series | 1 + .../patches/sparc64-fix-stack-alignment.diff | 84 +++++++++++++++++++ 3 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 debian/patches/sparc64-fix-stack-alignment.diff diff --git a/debian/changelog b/debian/changelog index 8787ae31..0a576b7c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,10 @@ llvm-toolchain-4.0 (1:4.0.1-9) unstable; urgency=medium * Update of the copyright file (Closes: #878502) Thanks to Nicholas D Steeves for the work + * Take a patch for a stack alignment on sparc64 for rust + Thanks to John Paul Adrian Glaubitz for the work (Closes: #880221) - -- Sylvestre Ledru Thu, 19 Oct 2017 09:33:23 +0200 + -- Sylvestre Ledru Mon, 30 Oct 2017 19:41:20 +0100 llvm-toolchain-4.0 (1:4.0.1-8) unstable; urgency=medium diff --git a/debian/patches/series b/debian/patches/series index b3a3aa51..a7fbcd5f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -58,3 +58,4 @@ rL306267.diff rL306353.diff rL306358.diff rL306379.diff +sparc64-fix-stack-alignment.diff diff --git a/debian/patches/sparc64-fix-stack-alignment.diff b/debian/patches/sparc64-fix-stack-alignment.diff new file mode 100644 index 00000000..2d63770a --- /dev/null +++ b/debian/patches/sparc64-fix-stack-alignment.diff @@ -0,0 +1,84 @@ +Description: Account for bias in stack readjustment + While trying to get rust running on Sparc64, I encountered an issue inside + llvm. For some reason I did not try to hunt down, rustc decides to do + strict (over-)alignment of some stack frames. At a certain point, it is + requesting an alignment of 64 bytes. This creates the following sparc + assembly code in the output from SparcFrameLowering.cpp: + + andn %sp,63,%sp + + This ensures (as intended) that the stack pointer has its low 6 bits + cleared and is perfectly aligned on 64 bytes. Alas, this does not take + Sparc64's stack pointer bias into account: The real register value is 2047 + (0x7ff) lower than the effective stack pointer address. As the stack an + Sparc64 is always 8-byte aligned, the stack pointer register modulo 8 has + to be 1. + + A crude fix to this is to not mask the lowest bit of the stack pointer + (which will keep it 0 on Sparc32 and 1 on Sparc64), which I have verified + to fix a Bus Error in rustc on Sparc64/Linux. + . + See: http://lists.llvm.org/pipermail/llvm-dev/2017-October/118620.html +Reported-By: Michael Karcher +Author: James Clarke + +--- +Origin: upstream +Bug: https://reviews.llvm.org/D39425 +Last-Update: 2017-10-30 + +--- llvm-toolchain-4.0-4.0.1.orig/lib/Target/Sparc/SparcFrameLowering.cpp ++++ llvm-toolchain-4.0-4.0.1/lib/Target/Sparc/SparcFrameLowering.cpp +@@ -88,10 +88,11 @@ void SparcFrameLowering::emitPrologue(Ma + + assert(&MF.front() == &MBB && "Shrink-wrapping not yet supported"); + MachineFrameInfo &MFI = MF.getFrameInfo(); ++ const SparcSubtarget &Subtarget = MF.getSubtarget(); + const SparcInstrInfo &TII = +- *static_cast(MF.getSubtarget().getInstrInfo()); ++ *static_cast(Subtarget.getInstrInfo()); + const SparcRegisterInfo &RegInfo = +- *static_cast(MF.getSubtarget().getRegisterInfo()); ++ *static_cast(Subtarget.getRegisterInfo()); + MachineBasicBlock::iterator MBBI = MBB.begin(); + // Debug location must be unknown since the first debug location is used + // to determine the end of the prologue. +@@ -141,7 +142,7 @@ void SparcFrameLowering::emitPrologue(Ma + + // Adds the SPARC subtarget-specific spill area to the stack + // size. Also ensures target-required alignment. +- NumBytes = MF.getSubtarget().getAdjustedFrameSize(NumBytes); ++ NumBytes = Subtarget.getAdjustedFrameSize(NumBytes); + + // Finally, ensure that the size is sufficiently aligned for the + // data on the stack. +@@ -176,9 +177,27 @@ void SparcFrameLowering::emitPrologue(Ma + .addCFIIndex(CFIIndex); + + if (NeedsStackRealignment) { +- // andn %o6, MaxAlign-1, %o6 ++ int64_t Bias = Subtarget.getStackPointerBias(); ++ unsigned regUnbiased; ++ if (Bias) { ++ // This clobbers G1 which we always know is available here. ++ regUnbiased = SP::G1; ++ // add %o6, BIAS, %g1 ++ BuildMI(MBB, MBBI, dl, TII.get(SP::ADDri), regUnbiased) ++ .addReg(SP::O6).addImm(Bias); ++ } else ++ regUnbiased = SP::O6; ++ ++ // andn %regUnbiased, MaxAlign-1, %regUnbiased + int MaxAlign = MFI.getMaxAlignment(); +- BuildMI(MBB, MBBI, dl, TII.get(SP::ANDNri), SP::O6).addReg(SP::O6).addImm(MaxAlign - 1); ++ BuildMI(MBB, MBBI, dl, TII.get(SP::ANDNri), regUnbiased) ++ .addReg(regUnbiased).addImm(MaxAlign - 1); ++ ++ if (Bias) { ++ // add %o6, -BIAS, %g1 ++ BuildMI(MBB, MBBI, dl, TII.get(SP::ADDri), SP::O6) ++ .addReg(regUnbiased).addImm(-Bias); ++ } + } + } + From 61e8519ba83a2079b8e4f5ae99bc78a53ba55282 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 20 Nov 2017 10:10:48 +0000 Subject: [PATCH 65/70] Update of the clang description --- debian/changelog | 1 + debian/control | 79 ++++++++++++++++++++++-------------------------- 2 files changed, 37 insertions(+), 43 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0a576b7c..c4297941 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ llvm-toolchain-4.0 (1:4.0.1-9) unstable; urgency=medium Thanks to Nicholas D Steeves for the work * Take a patch for a stack alignment on sparc64 for rust Thanks to John Paul Adrian Glaubitz for the work (Closes: #880221) + * Update of the clang description -- Sylvestre Ledru Mon, 30 Oct 2017 19:41:20 +0100 diff --git a/debian/control b/debian/control index b6cc0b9d..839d2811 100644 --- a/debian/control +++ b/debian/control @@ -37,14 +37,14 @@ Replaces: clang-3.1, clang-3.2, clang-3.3, Breaks: clang-3.1, clang-3.2, clang-3.3, clang-3.4 (<< 1:3.4.2-7~exp1), clang-3.5 (<< 1:3.5~+rc1-3~exp1), compiler-rt, clang-include-fixer-4.0 -Description: C, C++ and Objective-C compiler (LLVM based) +Description: C, C++ and Objective-C compiler Clang project is a C, C++, Objective C and Objective C++ front-end - for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler - Collection (GCC). + based on the LLVM compiler. Its goal is to offer a replacement to the + GNU Compiler Collection (GCC). . - Clang fully implements all published ISO C++ standards including C++11, as - well as the upcoming C++14 standard, and some parts of the fledgling C++1z - standard, and is considered a production-quality C++ compiler. + Clang implements all of the ISO C++ 1998, 11 and 14 standards and also + provides most of the support of C++17. + Package: clang-format-4.0 Architecture: any @@ -80,14 +80,13 @@ Package: clang-4.0-doc Architecture: all Section: doc Depends: ${shlibs:Depends}, ${misc:Depends} -Description: C, C++ and Objective-C compiler (LLVM based) - Documentation +Description: C, C++ and Objective-C compiler - Documentation Clang project is a C, C++, Objective C and Objective C++ front-end - for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler - Collection (GCC). + based on the LLVM compiler. Its goal is to offer a replacement to the + GNU Compiler Collection (GCC). . - Clang fully implements all published ISO C++ standards including C++11, as - well as the upcoming C++14 standard, and some parts of the fledgling C++1z - standard, and is considered a production-quality C++ compiler. + Clang implements all of the ISO C++ 1998, 11 and 14 standards and also + provides most of the support of C++17. . This package contains the documentation. @@ -98,12 +97,11 @@ Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same Description: C interface to the clang library Clang project is a C, C++, Objective C and Objective C++ front-end - for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler - Collection (GCC). + based on the LLVM compiler. Its goal is to offer a replacement to the + GNU Compiler Collection (GCC). . - Clang fully implements all published ISO C++ standards including C++11, as - well as the upcoming C++14 standard, and some parts of the fledgling C++1z - standard, and is considered a production-quality C++ compiler. + Clang implements all of the ISO C++ 1998, 11 and 14 standards and also + provides most of the support of C++17. . This package contains the clang library. . @@ -119,14 +117,13 @@ Multi-Arch: same Section: debug Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, libclang1-4.0 (= ${binary:Version}) -Description: clang library +Description: clang library (debug) Clang project is a C, C++, Objective C and Objective C++ front-end - for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler - Collection (GCC). + based on the LLVM compiler. Its goal is to offer a replacement to the + GNU Compiler Collection (GCC). . - Clang fully implements all published ISO C++ standards including C++11, as - well as the upcoming C++14 standard, and some parts of the fledgling C++1z - standard, and is considered a production-quality C++ compiler. + Clang implements all of the ISO C++ 1998, 11 and 14 standards and also + provides most of the support of C++17. . This package contains the debugging symbols. @@ -138,12 +135,11 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, libclang-common-4.0-dev (= ${binary:Version}) Description: clang library - Development package Clang project is a C, C++, Objective C and Objective C++ front-end - for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler - Collection (GCC). + based on the LLVM compiler. Its goal is to offer a replacement to the + GNU Compiler Collection (GCC). . - Clang fully implements all published ISO C++ standards including C++11, as - well as the upcoming C++14 standard, and some parts of the fledgling C++1z - standard, and is considered a production-quality C++ compiler. + Clang implements all of the ISO C++ 1998, 11 and 14 standards and also + provides most of the support of C++17. . This package contains the clang headers to develop extensions over libclang1-4.0. @@ -154,12 +150,11 @@ Section: libdevel Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm4.0 (= ${binary:Version}) Description: clang library - Common development package Clang project is a C, C++, Objective C and Objective C++ front-end - for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler - Collection (GCC). + based on the LLVM compiler. Its goal is to offer a replacement to the + GNU Compiler Collection (GCC). . - Clang fully implements all published ISO C++ standards including C++11, as - well as the upcoming C++14 standard, and some parts of the fledgling C++1z - standard, and is considered a production-quality C++ compiler. + Clang implements all of the ISO C++ 1998, 11 and 14 standards and also + provides most of the support of C++17. . This package contains the clang generic headers and some libraries (profiling, etc). @@ -196,12 +191,11 @@ Conflicts: python-clang-x.y Provides: python-clang-x.y Description: Clang Python Bindings Clang project is a C, C++, Objective C and Objective C++ front-end - for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler - Collection (GCC). + based on the LLVM compiler. Its goal is to offer a replacement to the + GNU Compiler Collection (GCC). . - Clang fully implements all published ISO C++ standards including C++11, as - well as the upcoming C++14 standard, and some parts of the fledgling C++1z - standard, and is considered a production-quality C++ compiler. + Clang implements all of the ISO C++ 1998, 11 and 14 standards and also + provides most of the support of C++17. . This binding package provides access to the Clang compiler and libraries. @@ -212,12 +206,11 @@ Section: doc Depends: ${shlibs:Depends}, ${misc:Depends} Description: Clang examples Clang project is a C, C++, Objective C and Objective C++ front-end - for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler - Collection (GCC). + based on the LLVM compiler. Its goal is to offer a replacement to the + GNU Compiler Collection (GCC). . - Clang fully implements all published ISO C++ standards including C++11, as - well as the upcoming C++14 standard, and some parts of the fledgling C++1z - standard, and is considered a production-quality C++ compiler. + Clang implements all of the ISO C++ 1998, 11 and 14 standards and also + provides most of the support of C++17. . This package contains the clang examples. From 559d21092021a6b5cb7b76797ab70aa1ff11b38b Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 20 Nov 2017 10:11:16 +0000 Subject: [PATCH 66/70] Standards-Version updated to 4.1.1 --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c4297941..d6ef3216 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ llvm-toolchain-4.0 (1:4.0.1-9) unstable; urgency=medium * Take a patch for a stack alignment on sparc64 for rust Thanks to John Paul Adrian Glaubitz for the work (Closes: #880221) * Update of the clang description + * Standards-Version updated to 4.1.1 -- Sylvestre Ledru Mon, 30 Oct 2017 19:41:20 +0100 diff --git a/debian/control b/debian/control index 839d2811..b2c87367 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, # dh-ocaml [amd64 arm64 armel armhf i386], Build-Conflicts: oprofile, ocaml, libllvm-3.4-ocaml-dev, libllvm-3.5-ocaml-dev, libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev -Standards-Version: 4.1.0 +Standards-Version: 4.1.1 Homepage: http://www.llvm.org/ Vcs-Svn: svn://anonscm.debian.org/svn/pkg-llvm/llvm-toolchain/branches/4.0/ Vcs-Browser: https://svn.debian.org/viewsvn/pkg-llvm/llvm-toolchain/branches/4.0/ From 4482962a73c3f3217808718ce7a412f0c7251e6a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 20 Nov 2017 10:13:20 +0000 Subject: [PATCH 67/70] Remove some old breaks/replaces/conflicts (<3.8) --- debian/changelog | 1 + debian/control | 20 ++++++-------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/debian/changelog b/debian/changelog index d6ef3216..63ff51e2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ llvm-toolchain-4.0 (1:4.0.1-9) unstable; urgency=medium Thanks to John Paul Adrian Glaubitz for the work (Closes: #880221) * Update of the clang description * Standards-Version updated to 4.1.1 + * Remove some old breaks/replaces/conflicts (<3.8) -- Sylvestre Ledru Mon, 30 Oct 2017 19:41:20 +0100 diff --git a/debian/control b/debian/control index b2c87367..205e2be2 100644 --- a/debian/control +++ b/debian/control @@ -14,8 +14,7 @@ Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, # ocaml-findlib [amd64 arm64 armel armhf i386], # libctypes-ocaml-dev [amd64 arm64 armel armhf i386], # dh-ocaml [amd64 arm64 armel armhf i386], -Build-Conflicts: oprofile, ocaml, libllvm-3.4-ocaml-dev, libllvm-3.5-ocaml-dev, - libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev +Build-Conflicts: oprofile, ocaml, libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev Standards-Version: 4.1.1 Homepage: http://www.llvm.org/ Vcs-Svn: svn://anonscm.debian.org/svn/pkg-llvm/llvm-toolchain/branches/4.0/ @@ -31,12 +30,8 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, Provides: c-compiler, objc-compiler, c++-compiler Recommends: llvm-4.0-dev, python Suggests: gnustep, gnustep-devel, clang-4.0-doc, libomp-dev -Replaces: clang-3.1, clang-3.2, clang-3.3, - clang-3.4 (<< 1:3.4.2-7~exp1), clang-3.5 (<< 1:3.5~+rc1-3~exp1), compiler-rt, - clang-include-fixer-4.0 -Breaks: clang-3.1, clang-3.2, clang-3.3, - clang-3.4 (<< 1:3.4.2-7~exp1), clang-3.5 (<< 1:3.5~+rc1-3~exp1), compiler-rt, - clang-include-fixer-4.0 +Replaces: clang-include-fixer-4.0 +Breaks: clang-include-fixer-4.0 Description: C, C++ and Objective-C compiler Clang project is a C, C++, Objective C and Objective C++ front-end based on the LLVM compiler. Its goal is to offer a replacement to the @@ -50,8 +45,6 @@ Package: clang-format-4.0 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, python, libllvm4.0 (= ${binary:Version}) -Replaces: clang-format-3.3 -Breaks: clang-format-3.3 Description: Tool to format C/C++/Obj-C code Clang-format is both a library and a stand-alone tool with the goal of automatically reformatting C++ sources files according to configurable @@ -185,8 +178,8 @@ Package: python-clang-4.0 Section: python Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, python -Replaces: python-clang-3.3, python-clang-3.4, python-clang-3.5, python-clang-3.6, python-clang-3.7, python-clang-3.8, python-clang-3.9, python-clang-x.y -Breaks: python-clang-3.3, python-clang-3.4, python-clang-3.5, python-clang-3.6, python-clang-3.7, python-clang-3.8, python-clang-3.9 +Replaces: python-clang-3.8, python-clang-3.9, python-clang-x.y +Breaks: python-clang-3.8, python-clang-3.9 Conflicts: python-clang-x.y Provides: python-clang-x.y Description: Clang Python Bindings @@ -460,7 +453,6 @@ Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc al # ia64 mips mipsel hurd powerpc ppc64 ppc64el sparc64 have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm4.0 (= ${binary:Version}), llvm-4.0-dev, python-lldb-4.0 -Conflicts: lldb-3.4, lldb-3.5 Pre-Depends: ${misc:Pre-Depends} Description: Next generation, high-performance debugger LLDB is a next generation, high-performance debugger. It is built as a set of @@ -502,7 +494,7 @@ Section: python Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k powerpcspe sh4 x32 mips mipsel arm64 # ia64 mips mipsel hurd ppc64 ppc64el alpha s390x powerpc sparc64 have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, liblldb-4.0-dev, python, python-six -Conflicts: python-lldb-3.4, python-lldb-3.5, python-lldb-3.6, python-lldb-3.7, python-lldb-3.8, python-lldb-3.9, python-lldb-x.y +Conflicts: python-lldb-3.8, python-lldb-3.9, python-lldb-x.y Replaces: python-lldb-x.y Provides: python-lldb-x.y Pre-Depends: ${misc:Pre-Depends} From 080a1c010cd0a014fff6eeea226bc44280bf5b15 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 20 Nov 2017 11:07:53 +0000 Subject: [PATCH 68/70] Create clang-tools-4.0 and move the various clang tools into it clang-tools-4.0 depends on clang-4.0. This might affect some packages. (Closes: #836397) --- debian/changelog | 3 ++ debian/clang-X.Y.install.in | 46 ------------------- debian/clang-X.Y.lintian-overrides.in | 6 --- debian/clang-X.Y.manpages.in | 11 ----- ...-X.Y.links.in => clang-tools-X.Y.links.in} | 0 debian/clang-tools-X.Y.lintian-overrides.in | 6 +++ debian/clang-tools-X.Y.manpages.in | 11 +++++ debian/control | 12 +++++ 8 files changed, 32 insertions(+), 63 deletions(-) rename debian/{clang-X.Y.links.in => clang-tools-X.Y.links.in} (100%) create mode 100644 debian/clang-tools-X.Y.lintian-overrides.in create mode 100644 debian/clang-tools-X.Y.manpages.in diff --git a/debian/changelog b/debian/changelog index 63ff51e2..7f2d6a5d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ llvm-toolchain-4.0 (1:4.0.1-9) unstable; urgency=medium + * Create clang-tools-4.0 and move the various clang tools into it + clang-tools-4.0 depends on clang-4.0. This might affect some packages. + (Closes: #836397) * Update of the copyright file (Closes: #878502) Thanks to Nicholas D Steeves for the work * Take a patch for a stack alignment on sparc64 for rust diff --git a/debian/clang-X.Y.install.in b/debian/clang-X.Y.install.in index 86876462..dc145ec3 100644 --- a/debian/clang-X.Y.install.in +++ b/debian/clang-X.Y.install.in @@ -1,56 +1,10 @@ usr/lib/llvm-@LLVM_VERSION@/bin/clang usr/lib/llvm-@LLVM_VERSION@/bin/clang++ usr/lib/llvm-@LLVM_VERSION@/bin/clang-cpp -usr/lib/llvm-@LLVM_VERSION@/bin/clang-check -usr/lib/llvm-@LLVM_VERSION@/bin/clang-apply-replacements -usr/lib/llvm-@LLVM_VERSION@/bin/clang-query -usr/lib/llvm-@LLVM_VERSION@/bin/clang-rename -usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-rename.el -usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-rename.py -usr/lib/llvm-@LLVM_VERSION@/bin/scan-view -usr/lib/llvm-@LLVM_VERSION@/bin/scan-build -usr/lib/llvm-@LLVM_VERSION@/bin/clang-cl -usr/lib/llvm-@LLVM_VERSION@/bin/sancov -usr/lib/llvm-@LLVM_VERSION@/share/scan-view/ -usr/lib/llvm-@LLVM_VERSION@/share/scan-build/ -usr/lib/llvm-@LLVM_VERSION@/share/man/man1/scan-build.1 -usr/lib/llvm-@LLVM_VERSION@/libexec/ccc-analyzer -usr/lib/llvm-@LLVM_VERSION@/libexec/c++-analyzer -usr/lib/llvm-@LLVM_VERSION@/bin/clang-offload-bundler -usr/lib/llvm-@LLVM_VERSION@/bin/clang-reorder-fields -usr/lib/llvm-@LLVM_VERSION@/bin/clang-change-namespace -usr/lib/llvm-@LLVM_VERSION@/bin/clang-import-test -usr/lib/llvm-@LLVM_VERSION@/bin/modularize -usr/lib/llvm-@LLVM_VERSION@/bin/c-index-test -usr/lib/llvm-@LLVM_VERSION@/bin/clang-include-fixer -usr/lib/llvm-@LLVM_VERSION@/bin/find-all-symbols - -tools/clang/tools/scan-build-@LLVM_VERSION@ usr/share/clang/ -tools/clang/tools/scan-build-py-@LLVM_VERSION@ usr/share/clang/ -tools/clang/tools/scan-view-@LLVM_VERSION@ usr/share/clang/ #usr/share/man/man1/clang.1 usr/share/man/man1/ usr/lib/llvm-@LLVM_VERSION@/lib/cmake/clang/*.cmake usr/share/llvm-@LLVM_VERSION@/cmake/ -usr/lib/llvm-@LLVM_VERSION@/share/clang/run-find-all-symbols.py -usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-include-fixer.py -usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-include-fixer.el usr/bin/clang-@LLVM_VERSION@ usr/bin/clang++-@LLVM_VERSION@ usr/bin/clang-cpp-@LLVM_VERSION@ -usr/bin/clang-check-@LLVM_VERSION@ -usr/bin/clang-apply-replacements-@LLVM_VERSION@ -usr/bin/clang-query-@LLVM_VERSION@ -usr/bin/clang-rename-@LLVM_VERSION@ -usr/bin/sancov-@LLVM_VERSION@ -usr/bin/clang-cl-@LLVM_VERSION@ -usr/bin/modularize-@LLVM_VERSION@ -usr/bin/scan-build-@LLVM_VERSION@ -usr/bin/scan-view-@LLVM_VERSION@ -usr/bin/c-index-test-@LLVM_VERSION@ -usr/bin/clang-offload-bundler-@LLVM_VERSION@ -usr/bin/clang-reorder-fields-@LLVM_VERSION@ -usr/bin/find-all-symbols-@LLVM_VERSION@ -usr/bin/clang-include-fixer-@LLVM_VERSION@ -usr/bin/clang-change-namespace-@LLVM_VERSION@ -usr/bin/clang-import-test-@LLVM_VERSION@ diff --git a/debian/clang-X.Y.lintian-overrides.in b/debian/clang-X.Y.lintian-overrides.in index f7b9e876..a389e011 100644 --- a/debian/clang-X.Y.lintian-overrides.in +++ b/debian/clang-X.Y.lintian-overrides.in @@ -1,8 +1,2 @@ -# I know but well... -clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-check.1.gz -clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/scan-view.1.gz -clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-apply-replacements-@LLVM_VERSION@.1.gz -clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-check-@LLVM_VERSION@.1.gz -clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/scan-view-@LLVM_VERSION@.1.gz # Does not link otherwise clang-@LLVM_VERSION@: embedded-library usr/lib/llvm-@LLVM_VERSION@/bin/clang: libjsoncpp diff --git a/debian/clang-X.Y.manpages.in b/debian/clang-X.Y.manpages.in index 07c26616..b19400af 100644 --- a/debian/clang-X.Y.manpages.in +++ b/debian/clang-X.Y.manpages.in @@ -1,12 +1 @@ clang/docs/_build/man/clang-@LLVM_VERSION@.1 -clang/tools/scan-build/man/scan-build-@LLVM_VERSION@.1 -debian/man/clang-check-@LLVM_VERSION@.1 -debian/man/clang-rename-@LLVM_VERSION@.1 -debian/man/clang-query-@LLVM_VERSION@.1 -debian/man/clang-apply-replacements-@LLVM_VERSION@.1 -debian/man/sancov-@LLVM_VERSION@.1 -debian/man/scan-view-@LLVM_VERSION@.1 -debian/man/modularize-@LLVM_VERSION@.1 -debian/man/find-all-symbols-@LLVM_VERSION@.1 -debian/man/clang-include-fixer-@LLVM_VERSION@.1 -debian/man/clang-reorder-fields-@LLVM_VERSION@.1 diff --git a/debian/clang-X.Y.links.in b/debian/clang-tools-X.Y.links.in similarity index 100% rename from debian/clang-X.Y.links.in rename to debian/clang-tools-X.Y.links.in diff --git a/debian/clang-tools-X.Y.lintian-overrides.in b/debian/clang-tools-X.Y.lintian-overrides.in new file mode 100644 index 00000000..eb04eb71 --- /dev/null +++ b/debian/clang-tools-X.Y.lintian-overrides.in @@ -0,0 +1,6 @@ +# I know but well... +clang-tools-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-check.1.gz +clang-tools-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/scan-view.1.gz +clang-tools-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-apply-replacements-@LLVM_VERSION@.1.gz +clang-tools-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-check-@LLVM_VERSION@.1.gz +clang-tools-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/scan-view-@LLVM_VERSION@.1.gz diff --git a/debian/clang-tools-X.Y.manpages.in b/debian/clang-tools-X.Y.manpages.in new file mode 100644 index 00000000..5cb7dbd0 --- /dev/null +++ b/debian/clang-tools-X.Y.manpages.in @@ -0,0 +1,11 @@ +clang/tools/scan-build/man/scan-build-@LLVM_VERSION@.1 +debian/man/clang-check-@LLVM_VERSION@.1 +debian/man/clang-rename-@LLVM_VERSION@.1 +debian/man/clang-query-@LLVM_VERSION@.1 +debian/man/clang-apply-replacements-@LLVM_VERSION@.1 +debian/man/sancov-@LLVM_VERSION@.1 +debian/man/scan-view-@LLVM_VERSION@.1 +debian/man/modularize-@LLVM_VERSION@.1 +debian/man/find-all-symbols-@LLVM_VERSION@.1 +debian/man/clang-include-fixer-@LLVM_VERSION@.1 +debian/man/clang-reorder-fields-@LLVM_VERSION@.1 diff --git a/debian/control b/debian/control index 205e2be2..4426243f 100644 --- a/debian/control +++ b/debian/control @@ -40,6 +40,18 @@ Description: C, C++ and Objective-C compiler Clang implements all of the ISO C++ 1998, 11 and 14 standards and also provides most of the support of C++17. +Package: clang-tools-4.0 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, clang-4.0 (= ${binary:Version}) +Description: C, C++ and Objective-C compiler + Clang project is a C, C++, Objective C and Objective C++ front-end + based on the LLVM compiler. Its goal is to offer a replacement to the + GNU Compiler Collection (GCC). + . + Clang implements all of the ISO C++ 1998, 11 and 14 standards and also + provides most of the support of C++17. + . + This package contains some clang-based tools. Package: clang-format-4.0 Architecture: any From 5efa5e0093f827bc4b53b54e22f65cecb46ecb65 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 20 Nov 2017 11:08:05 +0000 Subject: [PATCH 69/70] add the missing install file --- debian/clang-tools-X.Y.install.in | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 debian/clang-tools-X.Y.install.in diff --git a/debian/clang-tools-X.Y.install.in b/debian/clang-tools-X.Y.install.in new file mode 100644 index 00000000..31e28612 --- /dev/null +++ b/debian/clang-tools-X.Y.install.in @@ -0,0 +1,47 @@ +usr/lib/llvm-@LLVM_VERSION@/bin/clang-check +usr/lib/llvm-@LLVM_VERSION@/bin/clang-apply-replacements +usr/lib/llvm-@LLVM_VERSION@/bin/clang-query +usr/lib/llvm-@LLVM_VERSION@/bin/clang-rename +usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-rename.el +usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-rename.py +usr/lib/llvm-@LLVM_VERSION@/bin/scan-view +usr/lib/llvm-@LLVM_VERSION@/bin/scan-build +usr/lib/llvm-@LLVM_VERSION@/bin/clang-cl +usr/lib/llvm-@LLVM_VERSION@/bin/sancov +usr/lib/llvm-@LLVM_VERSION@/share/scan-view/ +usr/lib/llvm-@LLVM_VERSION@/share/scan-build/ +usr/lib/llvm-@LLVM_VERSION@/share/man/man1/scan-build.1 +usr/lib/llvm-@LLVM_VERSION@/libexec/ccc-analyzer +usr/lib/llvm-@LLVM_VERSION@/libexec/c++-analyzer +usr/lib/llvm-@LLVM_VERSION@/bin/clang-offload-bundler +usr/lib/llvm-@LLVM_VERSION@/bin/clang-reorder-fields +usr/lib/llvm-@LLVM_VERSION@/bin/clang-change-namespace +usr/lib/llvm-@LLVM_VERSION@/bin/clang-import-test +usr/lib/llvm-@LLVM_VERSION@/bin/modularize +usr/lib/llvm-@LLVM_VERSION@/bin/c-index-test +usr/lib/llvm-@LLVM_VERSION@/bin/clang-include-fixer +usr/lib/llvm-@LLVM_VERSION@/bin/find-all-symbols + +tools/clang/tools/scan-build-@LLVM_VERSION@ usr/share/clang/ +tools/clang/tools/scan-build-py-@LLVM_VERSION@ usr/share/clang/ +tools/clang/tools/scan-view-@LLVM_VERSION@ usr/share/clang/ + +usr/lib/llvm-@LLVM_VERSION@/share/clang/run-find-all-symbols.py +usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-include-fixer.py +usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-include-fixer.el +usr/bin/clang-check-@LLVM_VERSION@ +usr/bin/clang-apply-replacements-@LLVM_VERSION@ +usr/bin/clang-query-@LLVM_VERSION@ +usr/bin/clang-rename-@LLVM_VERSION@ +usr/bin/sancov-@LLVM_VERSION@ +usr/bin/clang-cl-@LLVM_VERSION@ +usr/bin/modularize-@LLVM_VERSION@ +usr/bin/scan-build-@LLVM_VERSION@ +usr/bin/scan-view-@LLVM_VERSION@ +usr/bin/c-index-test-@LLVM_VERSION@ +usr/bin/clang-offload-bundler-@LLVM_VERSION@ +usr/bin/clang-reorder-fields-@LLVM_VERSION@ +usr/bin/find-all-symbols-@LLVM_VERSION@ +usr/bin/clang-include-fixer-@LLVM_VERSION@ +usr/bin/clang-change-namespace-@LLVM_VERSION@ +usr/bin/clang-import-test-@LLVM_VERSION@ From 9d57e8265c1913957035a04738c1e61ab80ffcdc Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 20 Nov 2017 11:09:50 +0000 Subject: [PATCH 70/70] Fix some wrong-section-according-to-package-name and priority-extra-is-replaced-by-priority-optional issues --- debian/changelog | 2 ++ debian/control | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7f2d6a5d..8ddcf25b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ llvm-toolchain-4.0 (1:4.0.1-9) unstable; urgency=medium * Update of the clang description * Standards-Version updated to 4.1.1 * Remove some old breaks/replaces/conflicts (<3.8) + * Fix some wrong-section-according-to-package-name and + priority-extra-is-replaced-by-priority-optional issues -- Sylvestre Ledru Mon, 30 Oct 2017 19:41:20 +0100 diff --git a/debian/control b/debian/control index 4426243f..3546b0a1 100644 --- a/debian/control +++ b/debian/control @@ -96,6 +96,7 @@ Description: C, C++ and Objective-C compiler - Documentation This package contains the documentation. Package: libclang1-4.0 +Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} @@ -120,7 +121,7 @@ Package: libclang1-4.0-dbg Architecture: any Multi-Arch: same Section: debug -Priority: extra +Priority: optional Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, libclang1-4.0 (= ${binary:Version}) Description: clang library (debug) Clang project is a C, C++, Objective C and Objective C++ front-end @@ -239,7 +240,7 @@ Description: Modular compiler and toolchain technologies, runtime library Package: libllvm4.0-dbg Architecture: any Section: debug -Priority: extra +Priority: optional Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm4.0 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same @@ -435,7 +436,7 @@ Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hp Depends: ${shlibs:Depends}, ${misc:Depends}, liblld-4.0 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} Section: debug -Priority: extra +Priority: optional Description: LLVM-based linker, debugging libraries LLD is a new, high-performance linker. It is built as a set of reusable components which highly leverage existing libraries in the larger LLVM @@ -492,7 +493,7 @@ Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hp Depends: ${shlibs:Depends}, ${misc:Depends}, liblldb-4.0 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} Section: debug -Priority: extra +Priority: optional Description: Next generation, high-performance debugger, debugging libraries 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