ghc.git
23 months agoreplace dmb instruction with coprocessor barrier instruction.
Peter Michael Green [Wed, 20 Dec 2023 21:29:26 +0000 (21:29 +0000)]
replace dmb instruction with coprocessor barrier instruction.

23 months agoManual merge of version 9.0.2-5+rpi1 and 9.4.7-2 to produce 9.4.7-2+rpi1
Peter Michael Green [Tue, 19 Dec 2023 13:27:42 +0000 (13:27 +0000)]
Manual merge of version 9.0.2-5+rpi1 and 9.4.7-2 to produce 9.4.7-2+rpi1

2 years agoMerge ghc (9.4.7-2) import into refs/heads/workingbranch
Ilias Tsitsimpis [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Merge ghc (9.4.7-2) import into refs/heads/workingbranch

2 years ago[PATCH] PPC NCG: Generate clear right insn at arch width
Peter Trommler [Tue, 7 Nov 2023 20:47:24 +0000 (21:47 +0100)]
[PATCH] PPC NCG: Generate clear right insn at arch width

The clear right immediate (clrrxi) is only available in word and
doubleword width. Generate clrrxi instructions at architecture
width for all MachOp widths.

Fixes #24145

Gbp-Pq: Name ppc64el-fix-clrri

2 years agouse-modern-atomics
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
use-modern-atomics

commit f8fa1d08d7cbfef508bab355bda80f495e928f98
Author: Ben Gamari <bgamari.foss@gmail.com>
Date:   Mon Apr 17 21:04:47 2023 +0000

    ghc-prim: Use C11 atomics

    Previously `ghc-prim`'s atomic wrappers used the legacy `__sync_*`
    family of C builtins. Here we refactor these to rather use the
    appropriate C11 atomic equivalents, allowing us to be more explicit
    about the expected ordering semantics.

Gbp-Pq: Name use-modern-atomics

2 years agoEnable GHCi on all platforms in Debian
Ilias Tsitsimpis [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Enable GHCi on all platforms in Debian

Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/24098

Gbp-Pq: Name hadrian-enable-interpreter

2 years agohadrian-fix-dnosmp
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
hadrian-fix-dnosmp

commit bea762f2c9d3ff1f67e3fdb22a8ac288b32225b0
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Date:   Thu Oct 12 12:44:02 2023 +0300

    hadrian: Pass -DNOSMP to C compiler when needed

    Hadrian passes the -DNOSMP flag to GHC when the target doesn't support
    SMP, but doesn't pass it to CC as well, leading to the following
    compilation error on mips64el:

    | Run Cc (FindCDependencies CDep) Stage1: rts/sm/NonMovingScav.c => _build/stage1/rts/build/c/sm/NonMovingScav.o.d
    Command line: /usr/bin/mips64el-linux-gnuabi64-gcc -E -MM -MG -MF _build/stage1/rts/build/c/hooks/FlagDefaults.thr_debug_p_o.d -MT _build/stage1/rts/build/c/hooks/FlagDefaults.o -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -Irts/include -x c rts/hooks/FlagDefaults.c -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline -Wpointer-arith -Wmissing-noreturn -Wnested-externs -Wredundant-decls -Wundef -fno-strict-aliasing -DTHREADED_RTS -DDEBUG -fomit-frame-pointer -O2 -g -Irts -I_build/stage1/rts/build -DDEBUG -fno-omit-frame-pointer -g3 -O0
    ===> Command failed with error code: 1
    In file included from rts/include/Stg.h:348,
                     from rts/include/Rts.h:38,
                     from rts/hooks/FlagDefaults.c:8:
    rts/include/stg/SMP.h:416:2: error: #error memory barriers unimplemented on this architecture
      416 | #error memory barriers unimplemented on this architecture
          |  ^~~~~
    rts/include/stg/SMP.h:440:2: error: #error memory barriers unimplemented on this architecture
      440 | #error memory barriers unimplemented on this architecture
          |  ^~~~~
    rts/include/stg/SMP.h:464:2: error: #error memory barriers unimplemented on this architecture
      464 | #error memory barriers unimplemented on this architecture
          |  ^~~~~

    The old make system correctly passed this flag to both GHC and CC [1].

    Fix this error by passing -DNOSMP to CC as well.

    [1] https://gitlab.haskell.org/ghc/ghc/-/blob/00920f176b0235d5bb52a8e054d89a664f8938fe/rts/ghc.mk#L407

    Closes #24082

Gbp-Pq: Name hadrian-fix-dnosmp

2 years agofix-32-bit-unreg
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
fix-32-bit-unreg

commit 9194c9c066a31cbb7a49830e4b5e2454fd4af6ba
Author: Cheng Shao <terrorjack@type.dance>
Date:   Mon Jan 23 13:17:07 2023 +0000

    CmmToC: fix CmmRegOff for 64-bit register on a 32-bit target

    We used to print the offset value to a platform word sized integer.
    This is incorrect when the offset is negative (e.g. output of cmm
    constant folding) and the register is 64-bit but on a 32-bit target,
    and may lead to incorrect runtime result (e.g. #22607).

    The fix is simple: just treat it as a proper MO_Add, with the correct
    width info inferred from the register itself.

    Metric Increase:
        T12707
        T13379
        T4801
        T5321FD
        T5321Fun

    (cherry picked from commit d151546e59a50158f25c3df6728b00d3c27bb4b9)

Gbp-Pq: Name fix-32-bit-unreg

2 years agofix-hs_cmpxchg64
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
fix-hs_cmpxchg64

commit 9fa545722f9151781344446dd5501db38cb90dd1
Author: Cheng Shao <terrorjack@type.dance>
Date:   Mon Feb 27 19:11:27 2023 +0000

    ghc-prim: fix hs_cmpxchg64 function prototype

    hs_cmpxchg64 must return a StgWord64, otherwise incorrect runtime
    results of 64-bit MO_Cmpxchg will appear in 32-bit unregisterised
    builds, which go unnoticed at compile-time due to C implicit casting
    in .hc files.

Gbp-Pq: Name fix-hs_cmpxchg64

2 years agohadrian-disable-threaded
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
hadrian-disable-threaded

===================================================================

Gbp-Pq: Name hadrian-disable-threaded

2 years agosparc-support
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
sparc-support

===================================================================

Gbp-Pq: Name sparc-support

2 years agofix-cross-compilation
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
fix-cross-compilation

commit bd92182cd56140ffb2f68ec01492e5aa6333a8fc
Author: Ben Gamari <bgamari.foss@gmail.com>
Date:   Tue Jun 21 14:05:59 2022 +0000

    configure: Use AC_PATH_TOOL to detect tools

    Previously we used AC_PATH_PROG which, as noted by #21601, does not
    look for tools with a target prefix,
    breaking cross-compilation.

    Fixes #21601.

Gbp-Pq: Name fix-cross-compilation

2 years agoAllow setting path for LLC/OPT during configuration
Ilias Tsitsimpis [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Allow setting path for LLC/OPT during configuration

Patch configure.ac to allow us to modify the path for LLC/OPT during
configuration.

Gbp-Pq: Name allow-setting-llvm-program

2 years agoFix installation patch for iserv/unlit
Ilias Tsitsimpis [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Fix installation patch for iserv/unlit

Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/22557
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/22697

Gbp-Pq: Name hadrian-iserv

2 years agoUse realpath instead of custom script
Ilias Tsitsimpis [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Use realpath instead of custom script

Use realpath instead of the custom script, which is broken. As an example,

  $ ./mk/relpath.sh /usr/lib/ghc/lib /usr/lib/ghc-doc
  ..-doc
  $ realpath --relative-to=/usr/lib/ghc/lib /usr/lib/ghc-doc
  ../../ghc-doc

Gbp-Pq: Name hadrian-relpath

2 years agoPass 'mathjax' to Haddock
Ilias Tsitsimpis [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Pass 'mathjax' to Haddock

Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/23625

Hadrian currently doesn't allow us to modify Haddock options, so
patch Hadrian to manually pass the 'mathjax' option.

Gbp-Pq: Name hadrian-haddock-opts

2 years agoAdd more hadrian bootstrap plans
Ilias Tsitsimpis [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Add more hadrian bootstrap plans

Hadrian only contains bootstrap plans for previous GHC versions. Add plans for
the current version as well, since we may want to bootstrap hadrian with a
cross-compiled GHC that is of the same version as the GHC we are building here.

Gbp-Pq: Name hadrian-plans

2 years agonewer-llvm
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
newer-llvm

commit 0cc16aaf89d7dc3963764b7193ceac73e4e3329b
Author: Matthew Pickering <matthewtpickering@gmail.com>
Date:   Mon Jan 30 10:58:12 2023 +0000

    Bump supported LLVM range from 10 through 15 to 11 through 16

    LLVM 15 turns on the new pass manager by default, which we have yet to
    migrate to so for new we pass the `-enable-new-pm-0` flag in our
    llvm-passes flag.

    LLVM 11 was the first version to support the `-enable-new-pm` flag so we
    bump the lowest supported version to 11.

    Our CI jobs are using LLVM 12 so they should continue to work despite
    this bump to the lower bound.

    Fixes #21936

Gbp-Pq: Name newer-llvm

2 years agouse-unbundled-sphinx-rtd-theme
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
use-unbundled-sphinx-rtd-theme

===================================================================

Gbp-Pq: Name use-unbundled-sphinx-rtd-theme

2 years agoFix LLVM error on armel
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Fix LLVM error on armel

GHC 8.10 fails to build on armel with the following error:
   LLVM ERROR: unable to allocate function argument #8
   PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
   Stack dump:
   0.  Program arguments: llc-12 -O2 -enable-tbaa -relocation-model=pic -mcpu=arm7tdmi -mattr=+soft-float,-vfp2,-vfp2sp,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-fp16,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fullfp16,-fp64,-d32,-neon,-crypto,-dotprod,-fp16fml,-bf16,-mve,-mve.fp,-fpregs,+strict-align /tmp/ghc5537_0/ghc_6.bc -o /tmp/ghc5537_0/ghc_7.lm_s
   1.  Running pass 'Function Pass Manager' on module '/tmp/ghc20177_0/ghc_6.bc'.
   2.  Running pass 'ARM Instruction Selection' on function '@"stg_gc_f1$def"'
   `llc-12' failed in phase `LLVM Compiler'. (Exit code: -6)
   make[3]: *** [rts/ghc.mk:325: rts/dist/build/HeapStackCheck.o] Error 1

 Surprisingly, reverting commit 4540bbe2811e860f35de6e67ab2f0040592fd3a5 fixes
 thie error.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/20285

Gbp-Pq: Name fix-llvm-armel

2 years agoRemove hard-coded googleapis font URL
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Remove hard-coded googleapis font URL

Bug: https://github.com/haskell/haddock/issues/1211
Bug-Debian: https://bugs.debian.org/963690

Gbp-Pq: Name haddock-remove-googleapis-fonts

2 years agolocal-mathjax
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
local-mathjax

===================================================================

Gbp-Pq: Name local-mathjax

2 years agoAdd kfreebsdgnu to GHC_CONVERT_OS in aclocal.m4
Svante Signell [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Add kfreebsdgnu to GHC_CONVERT_OS in aclocal.m4

Bug-Debian: https://bugs.debian.org/913140

Gbp-Pq: Name kfreebsd-aclocal.m4

2 years agoUse native x86_64 instructions on x32
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Use native x86_64 instructions on x32

This patch enables a few native 64-bit integer instructions
on x32 which are available on this architecture despite using
32-bit pointers. These instructions are present on x86_64 but
not on x86 and ghc checks the size of (void *) to determine
that. This method fails on x32 since despite using 32-bit
pointers and hence sizeof(void *) == 4, it still uses the
full x86_64 instruction set and software-emulated variants
of the aforementioned 64-bit integer instructions are
therefore not present in the toolchain which will make ghc
fail to build on x32.
See: https://ghc.haskell.org/trac/ghc/ticket/11571

Gbp-Pq: Name x32-use-native-x86_64-insn.patch

2 years agobuildpath-abi-stability
Debian Haskell Group [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
buildpath-abi-stability

Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424

Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424

Gbp-Pq: Name buildpath-abi-stability.patch

2 years agoDo not emit a warning if the .haddock file is missing
Joachim Breitner [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Do not emit a warning if the .haddock file is missing

As it is quite common on Debian installations to install the -dev package
without the -doc package.

Gbp-Pq: Name no-missing-haddock-file-warning

2 years agoUse VFPv3-D16 FPU for ARM builds
Jani Monoses [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Use VFPv3-D16 FPU for ARM builds

Upstream-Bug: https://ghc.haskell.org/trac/ghc/ticket/5914

Jani writes: The D16 part was Debian/Ubuntu specific, IIRC we define hardfloat
in that particular variant (16 double registers) or we had a different naming
for some reason.

Gbp-Pq: Name ARM-VFPv3D16

2 years agoghc (9.4.7-2) unstable; urgency=medium
Ilias Tsitsimpis [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
ghc (9.4.7-2) unstable; urgency=medium

  * Remove files generated by gen_contents_index at installation time (Closes:
    #1055817)
  * Canonicalize paths in gen_contents_index (Closes: #1055070)
  * Backport upstream fix for CLRRI opcode on ppc64{el,} (Closes: #1054894)
  * Pass number of parallel jobs from DEB_BUILD_OPTIONS to hadrian.
    Code adapted from the debian/rules file for src:cmake.
    Thanks to John Paul Adrian Glaubitz for the fix (Closes: #1056742).
  * Restore --disable-ld-override for affected architectures (Closes: #1056636)

[dgit import unpatched ghc 9.4.7-2]

2 years agoImport ghc_9.4.7-2.debian.tar.xz
Ilias Tsitsimpis [Wed, 13 Dec 2023 10:28:47 +0000 (12:28 +0200)]
Import ghc_9.4.7-2.debian.tar.xz

[dgit import tarball ghc 9.4.7-2 ghc_9.4.7-2.debian.tar.xz]

2 years agoMerge ghc (9.4.7-1) import into refs/heads/workingbranch
Ilias Tsitsimpis [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Merge ghc (9.4.7-1) import into refs/heads/workingbranch

2 years agouse-modern-atomics
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
use-modern-atomics

commit f8fa1d08d7cbfef508bab355bda80f495e928f98
Author: Ben Gamari <bgamari.foss@gmail.com>
Date:   Mon Apr 17 21:04:47 2023 +0000

    ghc-prim: Use C11 atomics

    Previously `ghc-prim`'s atomic wrappers used the legacy `__sync_*`
    family of C builtins. Here we refactor these to rather use the
    appropriate C11 atomic equivalents, allowing us to be more explicit
    about the expected ordering semantics.

Gbp-Pq: Name use-modern-atomics

2 years agoEnable GHCi on all platforms in Debian
Ilias Tsitsimpis [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Enable GHCi on all platforms in Debian

Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/24098

Gbp-Pq: Name hadrian-enable-interpreter

2 years agohadrian-fix-dnosmp
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
hadrian-fix-dnosmp

commit bea762f2c9d3ff1f67e3fdb22a8ac288b32225b0
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Date:   Thu Oct 12 12:44:02 2023 +0300

    hadrian: Pass -DNOSMP to C compiler when needed

    Hadrian passes the -DNOSMP flag to GHC when the target doesn't support
    SMP, but doesn't pass it to CC as well, leading to the following
    compilation error on mips64el:

    | Run Cc (FindCDependencies CDep) Stage1: rts/sm/NonMovingScav.c => _build/stage1/rts/build/c/sm/NonMovingScav.o.d
    Command line: /usr/bin/mips64el-linux-gnuabi64-gcc -E -MM -MG -MF _build/stage1/rts/build/c/hooks/FlagDefaults.thr_debug_p_o.d -MT _build/stage1/rts/build/c/hooks/FlagDefaults.o -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -Irts/include -x c rts/hooks/FlagDefaults.c -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline -Wpointer-arith -Wmissing-noreturn -Wnested-externs -Wredundant-decls -Wundef -fno-strict-aliasing -DTHREADED_RTS -DDEBUG -fomit-frame-pointer -O2 -g -Irts -I_build/stage1/rts/build -DDEBUG -fno-omit-frame-pointer -g3 -O0
    ===> Command failed with error code: 1
    In file included from rts/include/Stg.h:348,
                     from rts/include/Rts.h:38,
                     from rts/hooks/FlagDefaults.c:8:
    rts/include/stg/SMP.h:416:2: error: #error memory barriers unimplemented on this architecture
      416 | #error memory barriers unimplemented on this architecture
          |  ^~~~~
    rts/include/stg/SMP.h:440:2: error: #error memory barriers unimplemented on this architecture
      440 | #error memory barriers unimplemented on this architecture
          |  ^~~~~
    rts/include/stg/SMP.h:464:2: error: #error memory barriers unimplemented on this architecture
      464 | #error memory barriers unimplemented on this architecture
          |  ^~~~~

    The old make system correctly passed this flag to both GHC and CC [1].

    Fix this error by passing -DNOSMP to CC as well.

    [1] https://gitlab.haskell.org/ghc/ghc/-/blob/00920f176b0235d5bb52a8e054d89a664f8938fe/rts/ghc.mk#L407

    Closes #24082

Gbp-Pq: Name hadrian-fix-dnosmp

2 years agofix-32-bit-unreg
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
fix-32-bit-unreg

commit 9194c9c066a31cbb7a49830e4b5e2454fd4af6ba
Author: Cheng Shao <terrorjack@type.dance>
Date:   Mon Jan 23 13:17:07 2023 +0000

    CmmToC: fix CmmRegOff for 64-bit register on a 32-bit target

    We used to print the offset value to a platform word sized integer.
    This is incorrect when the offset is negative (e.g. output of cmm
    constant folding) and the register is 64-bit but on a 32-bit target,
    and may lead to incorrect runtime result (e.g. #22607).

    The fix is simple: just treat it as a proper MO_Add, with the correct
    width info inferred from the register itself.

    Metric Increase:
        T12707
        T13379
        T4801
        T5321FD
        T5321Fun

    (cherry picked from commit d151546e59a50158f25c3df6728b00d3c27bb4b9)

Gbp-Pq: Name fix-32-bit-unreg

2 years agofix-hs_cmpxchg64
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
fix-hs_cmpxchg64

commit 9fa545722f9151781344446dd5501db38cb90dd1
Author: Cheng Shao <terrorjack@type.dance>
Date:   Mon Feb 27 19:11:27 2023 +0000

    ghc-prim: fix hs_cmpxchg64 function prototype

    hs_cmpxchg64 must return a StgWord64, otherwise incorrect runtime
    results of 64-bit MO_Cmpxchg will appear in 32-bit unregisterised
    builds, which go unnoticed at compile-time due to C implicit casting
    in .hc files.

Gbp-Pq: Name fix-hs_cmpxchg64

2 years agohadrian-disable-threaded
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
hadrian-disable-threaded

===================================================================

Gbp-Pq: Name hadrian-disable-threaded

2 years agosparc-support
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
sparc-support

===================================================================

Gbp-Pq: Name sparc-support

2 years agofix-cross-compilation
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
fix-cross-compilation

commit bd92182cd56140ffb2f68ec01492e5aa6333a8fc
Author: Ben Gamari <bgamari.foss@gmail.com>
Date:   Tue Jun 21 14:05:59 2022 +0000

    configure: Use AC_PATH_TOOL to detect tools

    Previously we used AC_PATH_PROG which, as noted by #21601, does not
    look for tools with a target prefix,
    breaking cross-compilation.

    Fixes #21601.

Gbp-Pq: Name fix-cross-compilation

2 years agoAllow setting path for LLC/OPT during configuration
Ilias Tsitsimpis [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Allow setting path for LLC/OPT during configuration

Patch configure.ac to allow us to modify the path for LLC/OPT during
configuration.

Gbp-Pq: Name allow-setting-llvm-program

2 years agoFix installation patch for iserv/unlit
Ilias Tsitsimpis [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Fix installation patch for iserv/unlit

Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/22557
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/22697

Gbp-Pq: Name hadrian-iserv

2 years agoUse realpath instead of custom script
Ilias Tsitsimpis [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Use realpath instead of custom script

Use realpath instead of the custom script, which is broken. As an example,

  $ ./mk/relpath.sh /usr/lib/ghc/lib /usr/lib/ghc-doc
  ..-doc
  $ realpath --relative-to=/usr/lib/ghc/lib /usr/lib/ghc-doc
  ../../ghc-doc

Gbp-Pq: Name hadrian-relpath

2 years agoPass 'mathjax' to Haddock
Ilias Tsitsimpis [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Pass 'mathjax' to Haddock

Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/23625

Hadrian currently doesn't allow us to modify Haddock options, so
patch Hadrian to manually pass the 'mathjax' option.

Gbp-Pq: Name hadrian-haddock-opts

2 years agoAdd more hadrian bootstrap plans
Ilias Tsitsimpis [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Add more hadrian bootstrap plans

Hadrian only contains bootstrap plans for previous GHC versions. Add plans for
the current version as well, since we may want to bootstrap hadrian with a
cross-compiled GHC that is of the same version as the GHC we are building here.

Gbp-Pq: Name hadrian-plans

2 years agonewer-llvm
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
newer-llvm

commit 0cc16aaf89d7dc3963764b7193ceac73e4e3329b
Author: Matthew Pickering <matthewtpickering@gmail.com>
Date:   Mon Jan 30 10:58:12 2023 +0000

    Bump supported LLVM range from 10 through 15 to 11 through 16

    LLVM 15 turns on the new pass manager by default, which we have yet to
    migrate to so for new we pass the `-enable-new-pm-0` flag in our
    llvm-passes flag.

    LLVM 11 was the first version to support the `-enable-new-pm` flag so we
    bump the lowest supported version to 11.

    Our CI jobs are using LLVM 12 so they should continue to work despite
    this bump to the lower bound.

    Fixes #21936

Gbp-Pq: Name newer-llvm

2 years agouse-unbundled-sphinx-rtd-theme
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
use-unbundled-sphinx-rtd-theme

===================================================================

Gbp-Pq: Name use-unbundled-sphinx-rtd-theme

2 years agoFix LLVM error on armel
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Fix LLVM error on armel

GHC 8.10 fails to build on armel with the following error:
   LLVM ERROR: unable to allocate function argument #8
   PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
   Stack dump:
   0.  Program arguments: llc-12 -O2 -enable-tbaa -relocation-model=pic -mcpu=arm7tdmi -mattr=+soft-float,-vfp2,-vfp2sp,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-fp16,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fullfp16,-fp64,-d32,-neon,-crypto,-dotprod,-fp16fml,-bf16,-mve,-mve.fp,-fpregs,+strict-align /tmp/ghc5537_0/ghc_6.bc -o /tmp/ghc5537_0/ghc_7.lm_s
   1.  Running pass 'Function Pass Manager' on module '/tmp/ghc20177_0/ghc_6.bc'.
   2.  Running pass 'ARM Instruction Selection' on function '@"stg_gc_f1$def"'
   `llc-12' failed in phase `LLVM Compiler'. (Exit code: -6)
   make[3]: *** [rts/ghc.mk:325: rts/dist/build/HeapStackCheck.o] Error 1

 Surprisingly, reverting commit 4540bbe2811e860f35de6e67ab2f0040592fd3a5 fixes
 thie error.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/20285

Gbp-Pq: Name fix-llvm-armel

2 years agoRemove hard-coded googleapis font URL
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Remove hard-coded googleapis font URL

Bug: https://github.com/haskell/haddock/issues/1211
Bug-Debian: https://bugs.debian.org/963690

Gbp-Pq: Name haddock-remove-googleapis-fonts

2 years agolocal-mathjax
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
local-mathjax

===================================================================

Gbp-Pq: Name local-mathjax

2 years agoAdd kfreebsdgnu to GHC_CONVERT_OS in aclocal.m4
Svante Signell [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Add kfreebsdgnu to GHC_CONVERT_OS in aclocal.m4

Bug-Debian: https://bugs.debian.org/913140

Gbp-Pq: Name kfreebsd-aclocal.m4

2 years agoUse native x86_64 instructions on x32
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Use native x86_64 instructions on x32

This patch enables a few native 64-bit integer instructions
on x32 which are available on this architecture despite using
32-bit pointers. These instructions are present on x86_64 but
not on x86 and ghc checks the size of (void *) to determine
that. This method fails on x32 since despite using 32-bit
pointers and hence sizeof(void *) == 4, it still uses the
full x86_64 instruction set and software-emulated variants
of the aforementioned 64-bit integer instructions are
therefore not present in the toolchain which will make ghc
fail to build on x32.
See: https://ghc.haskell.org/trac/ghc/ticket/11571

Gbp-Pq: Name x32-use-native-x86_64-insn.patch

2 years agobuildpath-abi-stability
Debian Haskell Group [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
buildpath-abi-stability

Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424

Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424

Gbp-Pq: Name buildpath-abi-stability.patch

2 years agoDo not emit a warning if the .haddock file is missing
Joachim Breitner [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Do not emit a warning if the .haddock file is missing

As it is quite common on Debian installations to install the -dev package
without the -doc package.

Gbp-Pq: Name no-missing-haddock-file-warning

2 years agoUse VFPv3-D16 FPU for ARM builds
Jani Monoses [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Use VFPv3-D16 FPU for ARM builds

Upstream-Bug: https://ghc.haskell.org/trac/ghc/ticket/5914

Jani writes: The D16 part was Debian/Ubuntu specific, IIRC we define hardfloat
in that particular variant (16 double registers) or we had a different naming
for some reason.

Gbp-Pq: Name ARM-VFPv3D16

2 years agoghc (9.4.7-1) unstable; urgency=medium
Ilias Tsitsimpis [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
ghc (9.4.7-1) unstable; urgency=medium

  * Upload to unstable

[dgit import unpatched ghc 9.4.7-1]

2 years agoImport ghc_9.4.7-1.debian.tar.xz
Ilias Tsitsimpis [Wed, 18 Oct 2023 19:50:19 +0000 (22:50 +0300)]
Import ghc_9.4.7-1.debian.tar.xz

[dgit import tarball ghc 9.4.7-1 ghc_9.4.7-1.debian.tar.xz]

2 years agoImport ghc_9.4.7.orig.tar.xz
Ilias Tsitsimpis [Tue, 10 Oct 2023 19:08:48 +0000 (22:08 +0300)]
Import ghc_9.4.7.orig.tar.xz

[dgit import orig ghc_9.4.7.orig.tar.xz]

2 years agoMerge ghc (9.0.2-5+rpi1) import into refs/heads/workingbranch
Raspbian forward porter [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
Merge ghc (9.0.2-5+rpi1) import into refs/heads/workingbranch

2 years agouse-unbundled-sphinx-rtd-theme
Debian Haskell Group [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
use-unbundled-sphinx-rtd-theme

===================================================================

Gbp-Pq: Name use-unbundled-sphinx-rtd-theme

2 years ago[PATCH] sphinx: Use modern syntax for extlinks
Matthew Pickering [Tue, 3 Jan 2023 15:56:37 +0000 (15:56 +0000)]
[PATCH] sphinx: Use modern syntax for extlinks

This fixes the following build error:

```
  Command line: /opt/homebrew/opt/sphinx-doc/bin/sphinx-build -b man -d /private/tmp/extra-dir-55768274273/.doctrees-man -n -w /private/tmp/extra-dir-55768274273/.log docs/users_guide /private/tmp/extra-dir-55768274273
  ===> Command failed with error code: 2

  Exception occurred:
    File "/opt/homebrew/Cellar/sphinx-doc/6.0.0/libexec/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 101, in role
      title = caption % part
              ~~~~~~~~^~~~~~
  TypeError: not all arguments converted during string formatting
```

I tested on Sphinx-5.1.1 and Sphinx-6.0.0

Thanks for sterni for providing instructions about how to test using
sphinx-6.0.0.

Fixes #22690

Gbp-Pq: Name 00dc51060881df81258ba3b3bdf447294618a4de.patch

2 years agoseparate-docs
Debian Haskell Group [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
separate-docs

===================================================================

Gbp-Pq: Name separate-docs

2 years ago[PATCH] Update supported LLVM versions
Ben Gamari [Fri, 29 Apr 2022 16:51:26 +0000 (12:51 -0400)]
[PATCH] Update supported LLVM versions

Pull forward minimum version to match 9.2.

(cherry picked from commit c26faa54c5fbe902ccb74e79d87e3fa705e270d1)

Gbp-Pq: Name ddd2591c5ca395e39ea36855e5b7e0a3464b7ad8.patch

2 years ago[PATCH] configure: bump LlvmMaxVersion to 14
Cheng Shao [Thu, 27 Jan 2022 12:12:14 +0000 (12:12 +0000)]
[PATCH] configure: bump LlvmMaxVersion to 14

LLVM 13.0.0 is released in Oct 2021, and latest head validates against
LLVM 13 just fine if LlvmMaxVersion is bumped.

Gbp-Pq: Name 78db231ffdf8385662812781c1d09c630cfad313.patch

2 years agoUse libatomic for 64-bit operations
Debian Haskell Group [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
Use libatomic for 64-bit operations

The rts package uses GCC's __atomic built-in functions on 64-bit values. This
is not supported on some 32bit platforms (e.g., mipsel) resulting in the
following compilation error:
   rts/dist/build/libHSrts_thr-ghc8.10.7.so: error: undefined reference to '__atomic_load_8'
   rts/dist/build/libHSrts_thr-ghc8.10.7.so: error: undefined reference to '__atomic_store_8'
   rts/dist/build/libHSrts_thr-ghc8.10.7.so: error: undefined reference to '__atomic_fetch_add_8'

 Fix this by linking against libatomic.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/20549
Forwarded: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6820

Gbp-Pq: Name latomic-64bit

2 years agolatomic-subword
Debian Haskell Group [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
latomic-subword

commit 90f06a0e015e18c066fe1569fb2add318bec72ca
Author: Haochen Tong <i@hexchain.org>
Date:   Mon Oct 11 11:40:56 2021 +0800

    Check for libatomic dependency for atomic operations

    Some platforms (e.g. RISC-V) require linking against libatomic for some
    (e.g. sub-word-sized) atomic operations.

    Fixes #19119.

Gbp-Pq: Name latomic-subword

2 years agoFix LLVM error on armel
Debian Haskell Group [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
Fix LLVM error on armel

GHC 8.10 fails to build on armel with the following error:
   LLVM ERROR: unable to allocate function argument #8
   PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
   Stack dump:
   0.  Program arguments: llc-12 -O2 -enable-tbaa -relocation-model=pic -mcpu=arm7tdmi -mattr=+soft-float,-vfp2,-vfp2sp,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-fp16,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fullfp16,-fp64,-d32,-neon,-crypto,-dotprod,-fp16fml,-bf16,-mve,-mve.fp,-fpregs,+strict-align /tmp/ghc5537_0/ghc_6.bc -o /tmp/ghc5537_0/ghc_7.lm_s
   1.  Running pass 'Function Pass Manager' on module '/tmp/ghc20177_0/ghc_6.bc'.
   2.  Running pass 'ARM Instruction Selection' on function '@"stg_gc_f1$def"'
   `llc-12' failed in phase `LLVM Compiler'. (Exit code: -6)
   make[3]: *** [rts/ghc.mk:325: rts/dist/build/HeapStackCheck.o] Error 1

 Surprisingly, reverting commit 4540bbe2811e860f35de6e67ab2f0040592fd3a5 fixes
 thie error.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/20285

Gbp-Pq: Name fix-llvm-armel

2 years agoRemove hard-coded googleapis font URL
Debian Haskell Group [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
Remove hard-coded googleapis font URL

Bug: https://github.com/haskell/haddock/issues/1211
Bug-Debian: https://bugs.debian.org/963690

Gbp-Pq: Name haddock-remove-googleapis-fonts

2 years agolocal-mathjax
Debian Haskell Group [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
local-mathjax

===================================================================

Gbp-Pq: Name local-mathjax

2 years agoAdd kfreebsdgnu to GHC_CONVERT_OS in aclocal.m4
Svante Signell [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
Add kfreebsdgnu to GHC_CONVERT_OS in aclocal.m4

Bug-Debian: https://bugs.debian.org/913140

Gbp-Pq: Name kfreebsd-aclocal.m4

2 years agoUse the stage1 binaries for install
John Paul Adrian Glaubitz [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
Use the stage1 binaries for install

Last-Update: 2017-01-29

In order to be able to perform a cross-build, we need to use
the stage1 binaries during installation. Both ghc and ghc-pkg
are run during the install target and therefore must be able
to run on the build machine.

Gbp-Pq: Name use-stage1-binaries-for-install.patch

2 years agoUse native x86_64 instructions on x32
Debian Haskell Group [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
Use native x86_64 instructions on x32

This patch enables a few native 64-bit integer instructions
on x32 which are available on this architecture despite using
32-bit pointers. These instructions are present on x86_64 but
not on x86 and ghc checks the size of (void *) to determine
that. This method fails on x32 since despite using 32-bit
pointers and hence sizeof(void *) == 4, it still uses the
full x86_64 instruction set and software-emulated variants
of the aforementioned 64-bit integer instructions are
therefore not present in the toolchain which will make ghc
fail to build on x32.
See: https://ghc.haskell.org/trac/ghc/ticket/11571

Gbp-Pq: Name x32-use-native-x86_64-insn.patch

2 years agoDon't include BufPos in interface files
Debian Haskell Group [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
Don't include BufPos in interface files

Origin: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8972
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/22162

===================================================================

Gbp-Pq: Name buildpath-abi-stability-2.patch

2 years agobuildpath-abi-stability
Debian Haskell Group [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
buildpath-abi-stability

Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424

Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424

Gbp-Pq: Name buildpath-abi-stability.patch

2 years agoDo not emit a warning if the .haddock file is missing
Joachim Breitner [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
Do not emit a warning if the .haddock file is missing

As it is quite common on Debian installations to install the -dev package
without the -doc package.

Gbp-Pq: Name no-missing-haddock-file-warning

2 years agoUse VFPv3-D16 FPU for ARM builds
Jani Monoses [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
Use VFPv3-D16 FPU for ARM builds

Upstream-Bug: https://ghc.haskell.org/trac/ghc/ticket/5914
Launchpad-Bug: https://ghc.haskell.org/trac/ghc/ticket/5914

Jani writes: The D16 part was Debian/Ubuntu specific, IIRC we define hardfloat
in that particular variant (16 double registers) or we had a different naming
for some reason.

Gbp-Pq: Name ARM-VFPv3D16

2 years agouse-debian-gen_contents_index
Debian Haskell Group [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
use-debian-gen_contents_index

===================================================================

Gbp-Pq: Name use-debian-gen_contents_index

2 years agoghc (9.0.2-5+rpi1) trixie-staging; urgency=medium
Raspbian forward porter [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
ghc (9.0.2-5+rpi1) trixie-staging; urgency=medium

  [changes brought forward from 7.6.3-21+rpi1 by Peter Michael Green <plugwash@raspbian.org> at Sun, 19 Apr 2015 14:00:16 +0000]
  * Change compiler defaults for armv6
  [changed introduced in 7.10.3-2+rpi1 by Peter Michael Green]
  * Add call to dh_autoreconf_clean

  [changes brought forward from 9.0.2-4+rpi2 by Peter Michael Green <plugwash@raspbian.org> at Tue, 04 Oct 2022 05:00:41 +0000]
  * Add build-conflicts on libllvm14

  [changes brought forward from 9.0.2-4+rpi3 by Peter Michael Green <plugwash@raspbian.org> at Wed, 05 Oct 2022 13:33:13 +0000]
  * Add build conflicts on libnuma1

[dgit import unpatched ghc 9.0.2-5+rpi1]

2 years agoImport ghc_9.0.2-5+rpi1.debian.tar.xz
Raspbian forward porter [Tue, 19 Sep 2023 23:00:36 +0000 (00:00 +0100)]
Import ghc_9.0.2-5+rpi1.debian.tar.xz

[dgit import tarball ghc 9.0.2-5+rpi1 ghc_9.0.2-5+rpi1.debian.tar.xz]

2 years agoMerge ghc (9.0.2-5) import into refs/heads/workingbranch
Scott Talbert [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
Merge ghc (9.0.2-5) import into refs/heads/workingbranch

2 years agouse-unbundled-sphinx-rtd-theme
Debian Haskell Group [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
use-unbundled-sphinx-rtd-theme

===================================================================

Gbp-Pq: Name use-unbundled-sphinx-rtd-theme

2 years ago[PATCH] sphinx: Use modern syntax for extlinks
Matthew Pickering [Tue, 3 Jan 2023 15:56:37 +0000 (15:56 +0000)]
[PATCH] sphinx: Use modern syntax for extlinks

This fixes the following build error:

```
  Command line: /opt/homebrew/opt/sphinx-doc/bin/sphinx-build -b man -d /private/tmp/extra-dir-55768274273/.doctrees-man -n -w /private/tmp/extra-dir-55768274273/.log docs/users_guide /private/tmp/extra-dir-55768274273
  ===> Command failed with error code: 2

  Exception occurred:
    File "/opt/homebrew/Cellar/sphinx-doc/6.0.0/libexec/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 101, in role
      title = caption % part
              ~~~~~~~~^~~~~~
  TypeError: not all arguments converted during string formatting
```

I tested on Sphinx-5.1.1 and Sphinx-6.0.0

Thanks for sterni for providing instructions about how to test using
sphinx-6.0.0.

Fixes #22690

Gbp-Pq: Name 00dc51060881df81258ba3b3bdf447294618a4de.patch

2 years agoseparate-docs
Debian Haskell Group [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
separate-docs

===================================================================

Gbp-Pq: Name separate-docs

2 years ago[PATCH] Update supported LLVM versions
Ben Gamari [Fri, 29 Apr 2022 16:51:26 +0000 (12:51 -0400)]
[PATCH] Update supported LLVM versions

Pull forward minimum version to match 9.2.

(cherry picked from commit c26faa54c5fbe902ccb74e79d87e3fa705e270d1)

Gbp-Pq: Name ddd2591c5ca395e39ea36855e5b7e0a3464b7ad8.patch

2 years ago[PATCH] configure: bump LlvmMaxVersion to 14
Cheng Shao [Thu, 27 Jan 2022 12:12:14 +0000 (12:12 +0000)]
[PATCH] configure: bump LlvmMaxVersion to 14

LLVM 13.0.0 is released in Oct 2021, and latest head validates against
LLVM 13 just fine if LlvmMaxVersion is bumped.

Gbp-Pq: Name 78db231ffdf8385662812781c1d09c630cfad313.patch

2 years agoUse libatomic for 64-bit operations
Debian Haskell Group [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
Use libatomic for 64-bit operations

The rts package uses GCC's __atomic built-in functions on 64-bit values. This
is not supported on some 32bit platforms (e.g., mipsel) resulting in the
following compilation error:
   rts/dist/build/libHSrts_thr-ghc8.10.7.so: error: undefined reference to '__atomic_load_8'
   rts/dist/build/libHSrts_thr-ghc8.10.7.so: error: undefined reference to '__atomic_store_8'
   rts/dist/build/libHSrts_thr-ghc8.10.7.so: error: undefined reference to '__atomic_fetch_add_8'

 Fix this by linking against libatomic.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/20549
Forwarded: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6820

Gbp-Pq: Name latomic-64bit

2 years agolatomic-subword
Debian Haskell Group [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
latomic-subword

commit 90f06a0e015e18c066fe1569fb2add318bec72ca
Author: Haochen Tong <i@hexchain.org>
Date:   Mon Oct 11 11:40:56 2021 +0800

    Check for libatomic dependency for atomic operations

    Some platforms (e.g. RISC-V) require linking against libatomic for some
    (e.g. sub-word-sized) atomic operations.

    Fixes #19119.

Gbp-Pq: Name latomic-subword

2 years agoFix LLVM error on armel
Debian Haskell Group [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
Fix LLVM error on armel

GHC 8.10 fails to build on armel with the following error:
   LLVM ERROR: unable to allocate function argument #8
   PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
   Stack dump:
   0.  Program arguments: llc-12 -O2 -enable-tbaa -relocation-model=pic -mcpu=arm7tdmi -mattr=+soft-float,-vfp2,-vfp2sp,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-fp16,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fullfp16,-fp64,-d32,-neon,-crypto,-dotprod,-fp16fml,-bf16,-mve,-mve.fp,-fpregs,+strict-align /tmp/ghc5537_0/ghc_6.bc -o /tmp/ghc5537_0/ghc_7.lm_s
   1.  Running pass 'Function Pass Manager' on module '/tmp/ghc20177_0/ghc_6.bc'.
   2.  Running pass 'ARM Instruction Selection' on function '@"stg_gc_f1$def"'
   `llc-12' failed in phase `LLVM Compiler'. (Exit code: -6)
   make[3]: *** [rts/ghc.mk:325: rts/dist/build/HeapStackCheck.o] Error 1

 Surprisingly, reverting commit 4540bbe2811e860f35de6e67ab2f0040592fd3a5 fixes
 thie error.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/20285

Gbp-Pq: Name fix-llvm-armel

2 years agoRemove hard-coded googleapis font URL
Debian Haskell Group [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
Remove hard-coded googleapis font URL

Bug: https://github.com/haskell/haddock/issues/1211
Bug-Debian: https://bugs.debian.org/963690

Gbp-Pq: Name haddock-remove-googleapis-fonts

2 years agolocal-mathjax
Debian Haskell Group [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
local-mathjax

===================================================================

Gbp-Pq: Name local-mathjax

2 years agoAdd kfreebsdgnu to GHC_CONVERT_OS in aclocal.m4
Svante Signell [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
Add kfreebsdgnu to GHC_CONVERT_OS in aclocal.m4

Bug-Debian: https://bugs.debian.org/913140

Gbp-Pq: Name kfreebsd-aclocal.m4

2 years agoUse the stage1 binaries for install
John Paul Adrian Glaubitz [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
Use the stage1 binaries for install

Last-Update: 2017-01-29

In order to be able to perform a cross-build, we need to use
the stage1 binaries during installation. Both ghc and ghc-pkg
are run during the install target and therefore must be able
to run on the build machine.

Gbp-Pq: Name use-stage1-binaries-for-install.patch

2 years agoUse native x86_64 instructions on x32
Debian Haskell Group [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
Use native x86_64 instructions on x32

This patch enables a few native 64-bit integer instructions
on x32 which are available on this architecture despite using
32-bit pointers. These instructions are present on x86_64 but
not on x86 and ghc checks the size of (void *) to determine
that. This method fails on x32 since despite using 32-bit
pointers and hence sizeof(void *) == 4, it still uses the
full x86_64 instruction set and software-emulated variants
of the aforementioned 64-bit integer instructions are
therefore not present in the toolchain which will make ghc
fail to build on x32.
See: https://ghc.haskell.org/trac/ghc/ticket/11571

Gbp-Pq: Name x32-use-native-x86_64-insn.patch

2 years agoDon't include BufPos in interface files
Debian Haskell Group [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
Don't include BufPos in interface files

Origin: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8972
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/22162

===================================================================

Gbp-Pq: Name buildpath-abi-stability-2.patch

2 years agobuildpath-abi-stability
Debian Haskell Group [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
buildpath-abi-stability

Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424

Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424

Gbp-Pq: Name buildpath-abi-stability.patch

2 years agoDo not emit a warning if the .haddock file is missing
Joachim Breitner [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
Do not emit a warning if the .haddock file is missing

As it is quite common on Debian installations to install the -dev package
without the -doc package.

Gbp-Pq: Name no-missing-haddock-file-warning

2 years agoUse VFPv3-D16 FPU for ARM builds
Jani Monoses [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
Use VFPv3-D16 FPU for ARM builds

Upstream-Bug: https://ghc.haskell.org/trac/ghc/ticket/5914
Launchpad-Bug: https://ghc.haskell.org/trac/ghc/ticket/5914

Jani writes: The D16 part was Debian/Ubuntu specific, IIRC we define hardfloat
in that particular variant (16 double registers) or we had a different naming
for some reason.

Gbp-Pq: Name ARM-VFPv3D16

2 years agouse-debian-gen_contents_index
Debian Haskell Group [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
use-debian-gen_contents_index

===================================================================

Gbp-Pq: Name use-debian-gen_contents_index

2 years agoghc (9.0.2-5) unstable; urgency=medium
Scott Talbert [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
ghc (9.0.2-5) unstable; urgency=medium

  * Team upload.
  * Fix FTBFS with sphinx 7.1 (Closes: #1042658)

[dgit import unpatched ghc 9.0.2-5]

2 years agoImport ghc_9.0.2-5.debian.tar.xz
Scott Talbert [Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)]
Import ghc_9.0.2-5.debian.tar.xz

[dgit import tarball ghc 9.0.2-5 ghc_9.0.2-5.debian.tar.xz]

3 years agoMerge ghc (9.0.2-4) import into refs/heads/workingbranch
Ilias Tsitsimpis [Sat, 24 Sep 2022 07:06:11 +0000 (08:06 +0100)]
Merge ghc (9.0.2-4) import into refs/heads/workingbranch

3 years agoseparate-docs
Debian Haskell Group [Sat, 24 Sep 2022 07:06:11 +0000 (08:06 +0100)]
separate-docs

===================================================================

Gbp-Pq: Name separate-docs