Bug#1071167: haskell-zlib: Use extra --ghc-options in d/rules on loong64
zhangdandan
zhangdandan at loongson.cn
Wed May 15 12:40:55 BST 2024
Source: haskell-zlib
Version: 0.6.3.0-2
Severity: important
Tags: patch
User: debian-loongarch at lists.debian.org
Usertags: loong64
Dear maintainers,
Compiling the haskell-pandoc failed for loong64 in the Debian Package
Auto-Building environment.
The error log is as follows,
```
[58 of 58] Linking dist-ghc/build/test-pandoc/test-pandoc
/usr/bin/ld.bfd:
/usr/lib/ghc/lib/../lib/loongarch64-linux-ghc-9.4.7/rts-1.0.2/libHSrts-1.0.2_thr.a(NonMovingMark.thr_o):
relocation R_LARCH_B26 overflow 0xfffffffff5fec6a4
Dump relocate record:
stack top relocation name symbol
at
/usr/lib/gcc/loongarch64-linux-gnu/13/../../../loongarch64-linux-gnu/crt1.o(.text+0x0):
...
0x0000000000000000 R_LARCH_NONE `<nameless>' + 3(0x3)
......
```
The Full log can be found at
https://buildd.debian.org/status/logs.php?pkg=haskell-pandoc&ver=3.1.3-1&arch=loong64.
After analysis, we need to add extra --ghc-options in d/rules on loong64
to increase jump-instructions' range.
Please consider the patch I attached.
Your opinions are welcome.
Thanks,
Dandan Zhang
-------------- next part --------------
diff -Nru haskell-zlib-0.6.3.0/debian/rules haskell-zlib-0.6.3.0/debian/rules
--- haskell-zlib-0.6.3.0/debian/rules 2021-11-27 12:52:06.000000000 +0000
+++ haskell-zlib-0.6.3.0/debian/rules 2023-08-27 09:40:15.000000000 +0000
@@ -4,3 +4,8 @@
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/hlibrary.mk
+
+ifneq (,$(filter $(DEB_BUILD_ARCH),loong64))
+DEB_SETUP_GHC_CONFIGURE_ARGS += --ghc-options="-optc-mcmodel=medium"
+endif
+
More information about the Pkg-haskell-maintainers
mailing list