diff --git a/debian/changelog b/debian/changelog index 4bc42967..472caae3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ llvm-toolchain-19 (1:19.1.0~++rc3-1~exp2) UNRELEASED; urgency=medium * Add a .gitignore file with all toplevel upstream files and directories. * Add some memory tracking, getting some information on memory hogs. + * Don't require g++-multilib on s390x for newer Ubuntu releases. -- Matthias Klose Tue, 27 Aug 2024 11:47:25 +0200 diff --git a/debian/control.in b/debian/control.in index 87bac8fd..8b7ecf75 100644 --- a/debian/control.in +++ b/debian/control.in @@ -16,7 +16,7 @@ Build-Depends: debhelper (>= 10.0), cmake, ninja-build, libipt-dev [amd64 i386], lcov, procps, help2man, zlib1g-dev, libzstd-dev, - g++-multilib [amd64 i386 kfreebsd-amd64 mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32], + g++-multilib [@MULTILIB_ARCHS@], libjs-mathjax, python3-myst-parser | python3-recommonmark, python3-pexpect, doxygen,@USAGE_BUILD_DEP@ ocaml-base [amd64 arm64 armhf ppc64el riscv64 s390x] | ocaml-nox [amd64 arm64 armhf ppc64el riscv64 s390x], diff --git a/debian/rules b/debian/rules index ce9d77ca..429204ff 100755 --- a/debian/rules +++ b/debian/rules @@ -53,6 +53,9 @@ endif VENDOR=$(shell lsb_release -is) DISTRO=$(shell lsb_release -sc) +DERIVATIVE := $(shell if dpkg-vendor --derives-from Ubuntu; then echo Ubuntu; \ + elif dpkg-vendor --derives-from Debian; then echo Debian; \ + else echo Unknown; fi) SONAME_EXT := 1 SONAME_OPENMP := 5 @@ -89,6 +92,13 @@ DH_VERSION := $(shell dpkg -s debhelper | grep '^Version' | awk '{print $$2}') include /usr/share/dpkg/architecture.mk +MULTILIB_ARCHS := amd64 i386 kfreebsd-amd64 mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32 +ifeq ($(DERIVATIVE),Ubuntu) + ifeq (,$(filter $(DISTRO), bionic focal jammy noble)) + MULTILIB_ARCHS := $(filter-out s390 s390x, $(MULTILIB_ARCHS)) + endif +endif + CONFIGURE_EXTRA = # these are handled on a per stage / build basis @@ -166,7 +176,7 @@ 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) # no ocaml support in main for Ubuntu -ifneq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes) +ifeq ($(DERIVATIVE),Debian) Z3_FLAG = -DLLVM_ENABLE_Z3_SOLVER=ON endif endif @@ -174,7 +184,7 @@ STAGE_2_CMAKE_EXTRA += $(Z3_FLAG) # Change the default CPU for s390x ZARCH=z196 -ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes) +ifeq ($(DERIVATIVE),Ubuntu) ZARCH=z13 endif STAGE_2_CMAKE_EXTRA += -DCLANG_SYSTEMZ_DEFAULT_ARCH=$(ZARCH) @@ -404,7 +414,7 @@ RUN_TEST=yes ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) RUN_TEST=no endif -ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes) +ifeq ($(DERIVATIVE),Ubuntu) ifeq (riscv64,$(DEB_HOST_ARCH)) RUN_TEST=no endif @@ -653,6 +663,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|@MULTILIB_ARCHS@|$(MULTILIB_ARCHS)|g" \ -e "s|@BRANCH_NAME@|$(BRANCH_NAME)|g" \ -e "s|@OCAML_STDLIB_DIR@|$(OCAML_STDLIB_DIR)|g" \ -e "s|@LLVM_EPOCH@|$(LLVM_EPOCH)|g" \