diff -Nru llvm-toolchain-4.0-4.0.1/debian/changelog llvm-toolchain-4.0-4.0.1/debian/changelog --- llvm-toolchain-4.0-4.0.1/debian/changelog 2018-07-02 08:45:18.000000000 +0000 +++ llvm-toolchain-4.0-4.0.1/debian/changelog 2018-08-16 12:04:53.000000000 +0000 @@ -1,3 +1,24 @@ +llvm-toolchain-4.0 (1:4.0.1-10~deb9u2+rpi1) stretch-staging; urgency=medium + + [changes brought forward from llvm-toolchain-3.8 1:3.8-2+rpi1 by Peter Michael Green at Sat, 14 May 2016 21:43:35 +0000] + * Cleanup .pyc files in clean target. + * Add a hack to the cmake based build to force armv6 (unfortunately the cmake + based build relies on config.guess which assumes you want to build for the + hardware you are running on). + * Add -DCOMPILER_RT_BUILD_BUILTINS=OFF to disable parts of compiler-rt that + are broken on lower arm architectures. + + [changes introduced in llvm-toolchain-3.9 1:3.9.1-1 by Peter Michael Green] + * disable testsuite (using a method that is hopefully less likely to cause diff conflicts than previously). + * Remove -march=armv7-a in compiler-rt/cmake/config-ix-base.cmake + * Clean up debian/usr in clean target. + * Clean up clang/tools/*-3.9 in clean target. + * Clean up stray *3.9.vim files + * Clean up clang/tools/scan-build/man/scan-build-3.9.1 and utils/vim/llvm-3.9-vimrc + * Clean up debian/*.install + + -- Raspbian forward porter Thu, 16 Aug 2018 12:04:53 +0000 + llvm-toolchain-4.0 (1:4.0.1-10~deb9u2) stretch; urgency=medium * Don't link with gold on s390x, not available in stretch. diff -Nru llvm-toolchain-4.0-4.0.1/debian/patches/cmake-arm-version-hack.patch llvm-toolchain-4.0-4.0.1/debian/patches/cmake-arm-version-hack.patch --- llvm-toolchain-4.0-4.0.1/debian/patches/cmake-arm-version-hack.patch 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-4.0-4.0.1/debian/patches/cmake-arm-version-hack.patch 2018-08-16 12:02:12.000000000 +0000 @@ -0,0 +1,29 @@ +--- /dev/null ++++ llvm-toolchain-4.0-4.0.1/cmake/config.guess.hack +@@ -0,0 +1,2 @@ ++#!/bin/bash -e ++$(dirname "$0")/config.guess | sed -r s/arm[a-zA-Z0-9]*/armv6/ +--- llvm-toolchain-4.0-4.0.1.orig/cmake/modules/GetHostTriple.cmake ++++ llvm-toolchain-4.0-4.0.1/cmake/modules/GetHostTriple.cmake +@@ -15,7 +15,7 @@ function( get_host_triple var ) + set( value "i686-pc-mingw32" ) + endif() + else( MSVC ) +- set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess) ++ set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess.hack) + execute_process(COMMAND sh ${config_guess} + RESULT_VARIABLE TT_RV + OUTPUT_VARIABLE TT_OUT +--- llvm-toolchain-4.0-4.0.1.orig/compiler-rt/cmake/base-config-ix.cmake ++++ llvm-toolchain-4.0-4.0.1/compiler-rt/cmake/base-config-ix.cmake +@@ -170,8 +170,8 @@ macro(test_targets) + if(WIN32) + test_target_arch(arm "" "" "") + else() +- test_target_arch(arm "" "-march=armv7-a" "-mfloat-abi=soft") +- test_target_arch(armhf "" "-march=armv7-a" "-mfloat-abi=hard") ++ test_target_arch(arm "" "" "-mfloat-abi=soft") ++ test_target_arch(armhf "" "" "-mfloat-abi=hard") + endif() + elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch32") + test_target_arch(aarch32 "" "-march=armv8-a") diff -Nru llvm-toolchain-4.0-4.0.1/debian/patches/series llvm-toolchain-4.0-4.0.1/debian/patches/series --- llvm-toolchain-4.0-4.0.1/debian/patches/series 2017-11-27 20:39:31.000000000 +0000 +++ llvm-toolchain-4.0-4.0.1/debian/patches/series 2018-08-16 12:02:12.000000000 +0000 @@ -60,3 +60,4 @@ rL306379.diff sparc64-fix-stack-alignment.diff update-cuda-search-path.patch +cmake-arm-version-hack.patch diff -Nru llvm-toolchain-4.0-4.0.1/debian/rules llvm-toolchain-4.0-4.0.1/debian/rules --- llvm-toolchain-4.0-4.0.1/debian/rules 2018-07-02 08:44:43.000000000 +0000 +++ llvm-toolchain-4.0-4.0.1/debian/rules 2018-08-16 12:02:13.000000000 +0000 @@ -29,7 +29,7 @@ LDFLAGS_EXTRA = CXXFLAGS_EXTRA = -std=c++0x CONFIGURE_EXTRA = -CMAKE_EXTRA = +CMAKE_EXTRA = -DCOMPILER_RT_BUILD_BUILTINS=OFF ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe)) LDFLAGS_EXTRA += -latomic @@ -178,6 +178,12 @@ preconfigure: + # add executable flag to script we added as part of triplet hack + # --plugwash + chmod 755 cmake/config.guess.hack + # also make sure config.guess is executable + chmod 755 cmake/config.guess + for f in debian/*.in; do \ f2=$$(echo $$f | sed 's/\.in$$//;s/X\.Y/$(LLVM_VERSION)/'); \ echo "$$f => $$f2"; \ @@ -520,7 +526,7 @@ # Remove auto generated python pyc find $(CURDIR)/debian/llvm-$(LLVM_VERSION)-tools/usr/lib/llvm-$(LLVM_VERSION)/ -name '*.pyc' | xargs -r rm -f -ifeq (${RUN_TEST},yes) +ifeq (false,true) # List of the archs we know we have 100 % tests working ARCH_LLVM_TEST_OK := i386 amd64 @@ -582,6 +588,9 @@ genhtml -o reports/coverage --show-details --highlight --legend $$REPORT; \ fi override_dh_auto_test: +else +override_dh_auto_test: + echo testsuite disabled endif @@ -604,6 +613,11 @@ rm -f $(CURDIR)/utils/vim/llvm-$(LLVM_VERSION).vim $(CURDIR)/utils/vim/tablegen-$(LLVM_VERSION).vim rm -f $(CURDIR)/clang/tools/clang-format/clang-format-diff-$(LLVM_VERSION) rm -f $(CURDIR)/clang/tools/clang-format/clang-format-$(LLVM_VERSION).py - + rm -f `find . -name '*.pyc'` + rm -rf debian/usr + rm -rf clang/tools/*-3.9 + rm -f `find . -name '*3.9.vim'` + rm -f clang/tools/scan-build/man/scan-build-3.9.1 utils/vim/llvm-3.9-vimrc + rm -f debian/*.install .PHONY: override_dh_strip preconfigure