* Move the default ARM arch from arm1176jzf-s (armv6) to cortex-a7

(Closes: #930008)
* Use dh-exec to exclude lib/LLVM*.so on powerpc and
  powerpcspe from llvm-X.Y-dev.install.in
This commit is contained in:
Sylvestre Ledru 2019-06-08 09:31:42 +02:00
commit 1c403b70c0
7 changed files with 52 additions and 2 deletions

6
debian/changelog vendored
View File

@ -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 <sylvestre@debian.org> Sun, 19 May 2019 13:31:37 +0200

2
debian/control vendored
View File

@ -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/

View File

@ -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

13
debian/patches/930008-arm.diff vendored Normal file
View File

@ -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";
}

View File

@ -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

View File

@ -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 <string.h>
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 <vector>
@ -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

3
debian/rules vendored
View File

@ -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: