Add support for systemd-binfmt

Closes: #1012367
This commit is contained in:
Michael Biebl 2022-06-05 20:50:24 +02:00
parent 908b2ac265
commit f60d81e883
5 changed files with 5 additions and 5 deletions

2
debian/control vendored
View File

@ -340,7 +340,7 @@ Description: Modular compiler and toolchain technologies
Package: llvm-13-runtime
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Recommends: binfmt-support
Recommends: binfmt-support | systemd
Description: Modular compiler and toolchain technologies, IR interpreter
LLVM is a collection of libraries and tools that make it easy to build
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@
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
chmod +x foo.bc
# only run if the binfmt is installed correctly
/usr/sbin/update-binfmts --display llvm-$VERSION-runtime.binfmt &> foo.log || true
if grep -q "interpreter = /usr/bin/lli-" foo.log; then
/usr/sbin/update-binfmts --enable llvm-$VERSION-runtime.binfmt || true
if grep -q "enabled" /proc/sys/fs/binfmt_misc/llvm-${VERSION}-runtime.binfmt; then
if ! ./foo.bc|grep -q "lli foo"; then
echo "executing ./foo.bc failed"
./foo.bc || true

View File

@ -1,5 +1,5 @@
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
# dbgsym packages not being available in testing
# clang-13-dbgsym, libclang1-13-dbgsym