diff --git a/debian/changelog b/debian/changelog index ac832107..e00cdda7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -117,6 +117,12 @@ llvm-toolchain-8 (1:8.0.1~+rc1-1~exp2) experimental; urgency=medium * WebAssembly is now build by default, remove it from the experimental list * check-polly was executed twice + * Move the default ARM arch from arm1176jzf-s (armv6) to cortex-a7 + (Closes: #930008) + + [ John Paul Adrian Glaubitz ] + * Use dh-exec to exclude lib/LLVM*.so on powerpc and + powerpcspe from llvm-X.Y-dev.install.in -- Sylvestre Ledru Sun, 19 May 2019 13:31:37 +0200 diff --git a/debian/control b/debian/control index 854bd5b0..b3c97681 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ Build-Depends: debhelper (>= 9.0), cmake, chrpath, texinfo, sharutils, ocaml-nox [amd64 arm64 armhf i386 ppc64el s390x], ocaml-findlib [amd64 arm64 armhf i386 ppc64el s390x], libctypes-ocaml-dev [amd64 arm64 armhf i386 ppc64el s390x], - dh-ocaml [amd64 arm64 armhf i386 ppc64el s390x], + dh-exec, dh-ocaml [amd64 arm64 armhf i386 ppc64el s390x], Build-Conflicts: oprofile, ocaml, libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev Standards-Version: 4.2.1 Homepage: https://www.llvm.org/ diff --git a/debian/llvm-X.Y-dev.install.in b/debian/llvm-X.Y-dev.install.in index 1ef7299f..2e47ae24 100644 --- a/debian/llvm-X.Y-dev.install.in +++ b/debian/llvm-X.Y-dev.install.in @@ -1,6 +1,8 @@ +#!/usr/bin/dh-exec + usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM*.a #usr/lib/llvm-@LLVM_VERSION@/lib/libllvm*.a -usr/lib/llvm-@LLVM_VERSION@/lib/LLVM*.so +[!powerpc !powerpcspe] usr/lib/llvm-@LLVM_VERSION@/lib/LLVM*.so usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM.so usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM-@LLVM_VERSION@.so usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM-@LLVM_VERSION_FULL@.so diff --git a/debian/patches/930008-arm.diff b/debian/patches/930008-arm.diff new file mode 100644 index 00000000..d2ea156a --- /dev/null +++ b/debian/patches/930008-arm.diff @@ -0,0 +1,13 @@ +Index: llvm-toolchain-8-8.0.1~+rc1/lib/Support/Triple.cpp +=================================================================== +--- llvm-toolchain-8-8.0.1~+rc1.orig/lib/Support/Triple.cpp ++++ llvm-toolchain-8-8.0.1~+rc1/lib/Support/Triple.cpp +@@ -1620,7 +1620,7 @@ StringRef Triple::getARMCPUForArch(Strin + case llvm::Triple::EABIHF: + case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABIHF: +- return "arm1176jzf-s"; ++ return "cortex-a7"; + default: + return "arm7tdmi"; + } diff --git a/debian/patches/series b/debian/patches/series index ffcca5a9..ea1c7b00 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -123,3 +123,5 @@ kfreebsd/lib_Target_X86.diff kfreebsd/lldb_source_Host_freebsd_Host.cpp.diff kfreebsd/lldb_source_Plugins_Process_FreeBSD.diff kfreebsd/tools_llvm-shlib_CMakeLists.txt.diff + +930008-arm.diff diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index ca0046c6..8a8f2059 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -142,6 +142,15 @@ if ! file foo.o 2>&1 | grep -i -q "aarch64"; then file foo.o exit 42 fi + +clang-$VERSION --target=arm-linux-gnueabihf -dM -E -xc - < /dev/null &> foo.log +if ! grep -q "#define __ARM_ARCH 7" foo.log; then + # bug 930008 + echo "The target arch for arm should v7" + cat foo.log + exit 42 +fi + echo ' #include int @@ -450,6 +459,12 @@ if test ! -f /usr/lib/llvm-$VERSION/include/c++/v1/vector; then exit -1; fi +if test ! -f /usr/lib/llvm-$VERSION/lib/libc++abi.so; then + echo "Install libc++abi-$VERSION-dev"; + exit -1; +fi + + # libc++ echo ' #include @@ -773,6 +788,15 @@ int main () } EOF +F=$(clang-$VERSION --target=x86_64-unknown-linux-gnu --rtlib=compiler-rt --print-libgcc-file-name) +if test ! $F; then + echo "Cannot find $F" + echo "TODO check if the exit1 can be put back" +# exit 1 +else + echo "$F is one of the compiler-rt file" +fi + # only for AMD64 for now # many sanitizers only work on AMD64 # x32 programs need to be enabled in the kernel bootparams for debian diff --git a/debian/rules b/debian/rules index f7c60dce..ed4cbb37 100755 --- a/debian/rules +++ b/debian/rules @@ -275,6 +275,9 @@ preconfigure: -e "s|@LLVM_VERSION@|$(LLVM_VERSION)|g" $$f > $$f2; \ done + # Make install file executable for dh-exec + chmod +x debian/llvm-$(LLVM_VERSION)-dev.install + # Override this two targets. They are trying to manage the .in conversion for me override_dh_ocamlinit: override_dh_ocamlclean: