Merge branch 'systemd-binfmt-13' into '13'

Add support for systemd-binfmt

See merge request pkg-llvm-team/llvm-toolchain!92
This commit is contained in:
Sylvestre Ledru 2022-06-06 08:09:02 +00:00
commit 2ca8a48870
6 changed files with 11 additions and 5 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
llvm-toolchain-13 (1:13.0.1-7) UNRELEASED; urgency=medium
* Add support for systemd-binfmt (Closes: #1012367)
-- Michael Biebl <biebl@debian.org> Mon, 06 Jun 2022 01:19:25 +0200
llvm-toolchain-13 (1:13.0.1-6) unstable; urgency=medium llvm-toolchain-13 (1:13.0.1-6) unstable; urgency=medium
[ John Paul Adrian Glaubitz ] [ John Paul Adrian Glaubitz ]

2
debian/control vendored
View File

@ -340,7 +340,7 @@ Description: Modular compiler and toolchain technologies
Package: llvm-13-runtime Package: llvm-13-runtime
Architecture: any Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends} Depends: ${shlibs:Depends}, ${misc:Depends}
Recommends: binfmt-support Recommends: binfmt-support | systemd
Description: Modular compiler and toolchain technologies, IR interpreter Description: Modular compiler and toolchain technologies, IR interpreter
LLVM is a collection of libraries and tools that make it easy to build LLVM is a collection of libraries and tools that make it easy to build
compilers, optimizers, just-in-time code generators, and many other compilers, optimizers, just-in-time code generators, and many other

View File

@ -0,0 +1 @@
:llvm-@LLVM_VERSION@-runtime.binfmt:M::BC::/usr/bin/lli-@LLVM_VERSION@:

View File

@ -5,4 +5,5 @@ usr/bin/lli-@LLVM_VERSION@
usr/bin/lli-child-target-@LLVM_VERSION@ usr/bin/lli-child-target-@LLVM_VERSION@
debian/llvm-@LLVM_VERSION@-runtime.binfmt usr/share/binfmts/ debian/llvm-@LLVM_VERSION@-runtime.binfmt usr/share/binfmts/
debian/llvm-@LLVM_VERSION@-runtime.binfmt.conf usr/lib/binfmt.d/

View File

@ -305,9 +305,7 @@ fi
clang-$VERSION -O3 -emit-llvm foo.c -c -o foo.bc clang-$VERSION -O3 -emit-llvm foo.c -c -o foo.bc
chmod +x foo.bc chmod +x foo.bc
# only run if the binfmt is installed correctly # only run if the binfmt is installed correctly
/usr/sbin/update-binfmts --display llvm-$VERSION-runtime.binfmt &> foo.log || true if grep -q "enabled" /proc/sys/fs/binfmt_misc/llvm-${VERSION}-runtime.binfmt; then
if grep -q "interpreter = /usr/bin/lli-" foo.log; then
/usr/sbin/update-binfmts --enable llvm-$VERSION-runtime.binfmt || true
if ! ./foo.bc|grep -q "lli foo"; then if ! ./foo.bc|grep -q "lli foo"; then
echo "executing ./foo.bc failed" echo "executing ./foo.bc failed"
./foo.bc || true ./foo.bc || true

View File

@ -1,5 +1,5 @@
Test-Command: bash -v ./debian/qualify-clang.sh Test-Command: bash -v ./debian/qualify-clang.sh
Depends: @, cmake, make, g++, file, dpkg-dev, binfmt-support Depends: @, cmake, make, g++, file, dpkg-dev
# Comment the dbgsym package because of bug #917528 # Comment the dbgsym package because of bug #917528
# dbgsym packages not being available in testing # dbgsym packages not being available in testing
# clang-13-dbgsym, libclang1-13-dbgsym # clang-13-dbgsym, libclang1-13-dbgsym