Bug#1038265: [PATCH] Add riscv64 to webapp B-D list and disable LTO on Ubuntu

Sergio Durigan Junior sergiodj at debian.org
Fri Jun 16 20:59:41 BST 2023


Source: git-annex
Version: 10.20230407-1
Severity: wishlist
Tags: patch

Hi again,

Still related to
https://bugs.launchpad.net/ubuntu/+source/git-annex/+bug/2019992, I
found a few more things that needs to be adjusted to properly build
git-annex on Ubuntu.

1) We need to add riscv64 to the list of archs for webapp B-Ds on
   d/control, otherwise the build will always fail on that architecture.
   I believe this makes sense for Debian because of our intention to
   fully support riscv64 on trixie.

2) Ubuntu enables LTO by default, and I found that that can introduce a
   problem when compiling git-annex on ppc64el.  For that reason, I'd
   like to propose the following change which disables LTO on that
   specific arch.

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/

diff --git a/debian/control b/debian/control
index e8737cde6f..41293b4dd4 100644
--- a/debian/control
+++ b/debian/control
@@ -34,16 +34,16 @@ Build-Depends:
 	libghc-hinotify-dev (>= 0.3.10) [linux-any],
 	libghc-dbus-dev (>= 0.10.7) [linux-any],
 	libghc-fdo-notify-dev (>= 0.3) [linux-any],
-	libghc-yesod-dev (>= 1.2.6.1)       [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x],
-	libghc-yesod-core-dev (>= 1.2.19)   [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x],
-	libghc-yesod-form-dev (>= 1.3.15)   [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x],
-	libghc-yesod-static-dev (>= 1.2.4)  [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x],
-	libghc-shakespeare-dev (>= 2.0.0)   [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x],
-	libghc-clientsession-dev            [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x],
-	libghc-warp-dev (>= 3.0.0.5)        [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x],
-	libghc-warp-tls-dev                 [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x],
-	libghc-wai-dev                      [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x],
-	libghc-wai-extra-dev                [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x],
+	libghc-yesod-dev (>= 1.2.6.1)       [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x riscv64],
+	libghc-yesod-core-dev (>= 1.2.19)   [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x riscv64],
+	libghc-yesod-form-dev (>= 1.3.15)   [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x riscv64],
+	libghc-yesod-static-dev (>= 1.2.4)  [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x riscv64],
+	libghc-shakespeare-dev (>= 2.0.0)   [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x riscv64],
+	libghc-clientsession-dev            [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x riscv64],
+	libghc-warp-dev (>= 3.0.0.5)        [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x riscv64],
+	libghc-warp-tls-dev                 [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x riscv64],
+	libghc-wai-dev                      [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x riscv64],
+	libghc-wai-extra-dev                [i386 amd64 arm64 armel armhf kfreebsd-i386 kfreebsd-amd64 m68k mips mips64el mipsel powerpc ppc64el s390x riscv64],
 	libghc-dav-dev (>= 1.0),
 	libghc-persistent-dev (>= 2.8.1),
 	libghc-persistent-template-dev,
diff --git a/debian/rules b/debian/rules
index 1d8d167a9b..c19da8bb98 100755
--- a/debian/rules
+++ b/debian/rules
@@ -30,6 +30,9 @@ export ZSH_COMPLETIONS_PATH=/usr/share/zsh/vendor-completions
 ifeq (yes, $(shell dpkg-vendor --derives-from Ubuntu && echo yes))
 # See LP: #2019992
 export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions
+ifneq (,$(filter $(DEB_HOST_ARCH), ppc64el))
+export DEB_BUILD_MAINT_OPTIONS = optimize=-lto
+endif
 endif
 
 %:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-maintainers/attachments/20230616/a8d46215/attachment.sig>


More information about the Pkg-haskell-maintainers mailing list