From 2661c00c67a7c904e1cf43ae9e4c2447d44260e0 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Wed, 4 Sep 2024 11:53:56 +0200 Subject: [PATCH] * Disable z3 again for Ubuntu, and make the libz3-dev (build) dependency conditional. --- debian/changelog | 7 +++++++ debian/control | 2 +- debian/control.in | 4 ++-- debian/rules | 13 ++++++++++--- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index d75cb722..b2f46add 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-19 (1:19.1.0~++rc4-2) UNRELEASED; urgency=medium + + * Disable z3 again for Ubuntu, and make the libz3-dev (build) dependency + conditional. + + -- Matthias Klose Wed, 04 Sep 2024 11:52:22 +0200 + llvm-toolchain-19 (1:19.1.0~++rc4-1) unstable; urgency=medium * New release candidate. diff --git a/debian/control b/debian/control index ce250421..5582e485 100644 --- a/debian/control +++ b/debian/control @@ -421,7 +421,7 @@ Architecture: any Depends: ${shlibs:Depends}, libffi-dev, ${misc:Depends}, llvm-19 (= ${binary:Version}), libllvm19 (= ${binary:Version}), libncurses-dev, llvm-19-tools (= ${binary:Version}), libclang-cpp19 (= ${binary:Version}), - libz3-dev, libxml2-dev + libxml2-dev, libz3-dev [!sh4], Description: Modular compiler and toolchain technologies, libraries and headers LLVM is a collection of libraries and tools that make it easy to build compilers, optimizers, just-in-time code generators, and many other diff --git a/debian/control.in b/debian/control.in index 4ac8fb6c..271607f2 100644 --- a/debian/control.in +++ b/debian/control.in @@ -23,7 +23,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, ocaml-findlib [@OCAML_ARCHS@], libctypes-ocaml-dev [@OCAML_ARCHS@], dh-exec, dh-ocaml [@OCAML_ARCHS@], - libpfm4-dev [linux-any], python3-setuptools, libz3-dev [!sh4], + libpfm4-dev [linux-any], python3-setuptools, @Z3_DEV_DEP@ # "| hello" is for older buster/bionic distros without spirv support # We need to keep the constraints coherent between the two alternatives, otherwise # hello would get installed unexpectedly and prevent e.g. wasi-libc from getting pulled @@ -421,7 +421,7 @@ Architecture: any Depends: ${shlibs:Depends}, libffi-dev, ${misc:Depends}, llvm-@LLVM_VERSION@ (= ${binary:Version}), libllvm@LLVM_VERSION@ (= ${binary:Version}), libncurses-dev, llvm-@LLVM_VERSION@-tools (= ${binary:Version}), libclang-cpp@LLVM_VERSION@ (= ${binary:Version}), - libz3-dev, libxml2-dev + libxml2-dev, @Z3_DEV_DEP@ Description: Modular compiler and toolchain technologies, libraries and headers LLVM is a collection of libraries and tools that make it easy to build compilers, optimizers, just-in-time code generators, and many other diff --git a/debian/rules b/debian/rules index bd6db5f8..ff43ef4c 100755 --- a/debian/rules +++ b/debian/rules @@ -190,12 +190,18 @@ LDFLAGS_EXTRA += -latomic endif Z3_FLAG = -DLLVM_ENABLE_Z3_SOLVER=OFF -ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' libz3-dev) gt 4.7.0; echo $$?),0) - ifeq (,$(filter $(DEB_HOST_ARCH),sh4)) - Z3_FLAG = -DLLVM_ENABLE_Z3_SOLVER=ON +# no ocaml support in main for Ubuntu +ifneq ($(DERIVATIVE),Ubuntu) + ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' libz3-dev) gt 4.7.0; echo $$?),0) + ifeq (,$(filter $(DEB_HOST_ARCH),sh4)) + Z3_FLAG = -DLLVM_ENABLE_Z3_SOLVER=ON + endif endif endif STAGE_2_CMAKE_EXTRA += $(Z3_FLAG) +ifneq (,$(findstring =ON, $(Z3_FLAG))) + Z3_DEV_DEP = libz3-dev [!sh4], +endif # Change the default CPU for s390x ZARCH=z196 @@ -678,6 +684,7 @@ stamps/preconfigure: echo "$$f => $$f2"; \ sed -e 's|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|g' \ -e "s|@USAGE_BUILD_DEP@|$(USAGE_BUILD_DEP)|g" \ + -e "s|@Z3_DEV_DEP@|$(Z3_DEV_DEP)|g" \ -e "s|@MULTILIB_ARCHS@|$(MULTILIB_ARCHS)|g" \ -e "s|@OCAML_ARCHS@|$(OCAML_ARCHS)|g" \ -e "s|@OMP_ARCHS@|$(OMP_ARCHS)|g" \