From 8832846d532bf16743de39e94aa5ef50e3bbd57a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 12 Mar 2023 11:20:27 +0100 Subject: [PATCH 1/3] Disable the flang autopkgtests on unsupported architectures --- debian/changelog | 6 ++++++ debian/qualify-clang.sh | 42 +++++++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/debian/changelog b/debian/changelog index 976f0c75..1809d55b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-15 (1:15.0.7-3) unstable; urgency=medium + + * Disable the flang autopkgtests on unsupported architectures + + -- Sylvestre Ledru Sun, 12 Mar 2023 11:19:54 +0100 + llvm-toolchain-15 (1:15.0.7-2) unstable; urgency=medium [ Sylvestre Ledru ] diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index f247d0e5..9aa443da 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -1077,8 +1077,10 @@ g++ -nostdinc++ -I/usr/lib/llvm-$VERSION/bin/../include/c++/v1/ -L/usr/lib/llvm- ./o > /dev/null fi -echo "Testing flang-$VERSION (Fortran) ..." -echo 'program math + +if dpkg -l|grep -q flang-$VERSION; then + echo "Testing flang-$VERSION (Fortran) ..." + echo 'program math implicit none real :: x, y x = 3.14 @@ -1086,15 +1088,15 @@ echo 'program math print *, "x + y = ", x + y end program math ' > foo.f90 -flang-new-$VERSION foo.f90 -o foo && ./foo &> foo.log -if ! grep -q "x + y =" foo.log 2>&1; then - echo "flang: Could not find the expected output" - exit -1 -fi + flang-new-$VERSION foo.f90 -o foo && ./foo &> foo.log + if ! grep -q "x + y =" foo.log 2>&1; then + echo "flang: Could not find the expected output" + exit -1 + fi -# testing with a shared libraries -echo ' + # testing with a shared libraries + echo ' module hello_world contains subroutine say_hello() @@ -1102,21 +1104,25 @@ module hello_world end subroutine say_hello end module hello_world ' > lib.f90 -flang-new-$VERSION -c lib.f90 -fpie -flang-new-$VERSION -shared -fpie -o libflib.so lib.o + flang-new-$VERSION -c lib.f90 -fpie + flang-new-$VERSION -shared -fpie -o libflib.so lib.o -echo ' + echo ' program main use hello_world call say_hello() end program main' > foo.f90 -flang-new-$VERSION foo.f90 -L. -lflib -o foo -LD_LIBRARY_PATH=. ./foo &> foo.log -if ! grep -q "Hello, World!" foo.log 2>&1; then - echo "flang: lib didn't work" - exit -1 + flang-new-$VERSION foo.f90 -L. -lflib -o foo + LD_LIBRARY_PATH=. ./foo &> foo.log + if ! grep -q "Hello, World!" foo.log 2>&1; then + echo "flang: lib didn't work" + exit -1 + fi + rm -f foo.log foo.f90 foo libflib.so +else + echo "Skipping esting flang-$VERSION (Fortran) ..." + echo "doesn't exist on this arch" fi -rm -f foo.log foo.f90 foo libflib.so # libclc echo "Testing libclc-$VERSION-dev ..." From 08c1d509d89c3e52b87e509a71c1746759df9f92 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 15 Mar 2023 21:45:54 +0100 Subject: [PATCH 2/3] Fix debian/libclang1-15.symbols soname --- debian/changelog | 6 ++++++ debian/libclang1-X.Y.symbols.in | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1809d55b..ef4bce9d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-15 (1:15.0.7-4) UNRELEASED; urgency=medium + + * Fix debian/libclang1-15.symbols soname + + -- Sylvestre Ledru Wed, 15 Mar 2023 21:45:46 +0100 + llvm-toolchain-15 (1:15.0.7-3) unstable; urgency=medium * Disable the flang autopkgtests on unsupported architectures diff --git a/debian/libclang1-X.Y.symbols.in b/debian/libclang1-X.Y.symbols.in index 4b13e9a8..da8bfadb 100644 --- a/debian/libclang1-X.Y.symbols.in +++ b/debian/libclang1-X.Y.symbols.in @@ -1,5 +1,5 @@ -libclang-@LLVM_VERSION@.so.13 libclang1-@LLVM_VERSION@ #MINVER# - (optional)LLVM_13@LLVM_13 1:5.0~svn298832-1~ +libclang-@LLVM_VERSION@.so.@LLVM_VERSION@ libclang1-@LLVM_VERSION@ #MINVER# + (optional)LLVM_13@LLVM_13 1:15.0.7-3 clang_BlockCommandComment_getArgText@LLVM_13 1:5.0~svn298832-1~ clang_BlockCommandComment_getCommandName@LLVM_13 1:5.0~svn298832-1~ clang_BlockCommandComment_getNumArgs@LLVM_13 1:5.0~svn298832-1~ From c6de09bea4ecaa613a193e11e985ea2727962f5d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 17 Mar 2023 09:06:34 +0100 Subject: [PATCH 3/3] check that sccache works before using it --- debian/rules | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/debian/rules b/debian/rules index 0432f5ff..8e44e5fe 100755 --- a/debian/rules +++ b/debian/rules @@ -461,12 +461,15 @@ SCCACHE_ENABLE=no SCCACHE_CMAKE = # if sccache is installed in the chroot, use it ifeq ($(shell test -e /opt/sccache/sccache && echo -n yes),yes) - STAGE_1_CMAKE_EXTRA += $(SCCACHE_CMAKE) - SCCACHE_ENABLE=yes - SCCACHE_PATH=/opt/sccache/ - SCCACHE_CMD=$(SCCACHE_PATH)/sccache - SCCACHE_CMAKE = -DCMAKE_C_COMPILER_LAUNCHER=$(SCCACHE_CMD) -DCMAKE_CXX_COMPILER_LAUNCHER=$(SCCACHE_CMD) - export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:/opt/sccache + # check that it is working on this OS + ifeq ($(shell /opt/sccache/sccache --version && echo -n yes),yes) + STAGE_1_CMAKE_EXTRA += $(SCCACHE_CMAKE) + SCCACHE_ENABLE=yes + SCCACHE_PATH=/opt/sccache/ + SCCACHE_CMD=$(SCCACHE_PATH)/sccache + SCCACHE_CMAKE = -DCMAKE_C_COMPILER_LAUNCHER=$(SCCACHE_CMD) -DCMAKE_CXX_COMPILER_LAUNCHER=$(SCCACHE_CMD) + export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:/opt/sccache + endif endif # enables cmake build targets like stage2-[target_name]