## Package: ghc / 8.4.4+dfsg1-3

Package Version Patches format
ghc 8.4.4+dfsg1-3 3.0 (quilt)

### Patch series

view the series file
Patch File delta Description

ghc.mk | 8 1 + 7 - 0 !
1 file changed, 1 insertion(+), 7 deletions(-)

---

aclocal.m4 | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 use vfpv3-d16 fpu for arm builds
Jani writes: The D16 part was Debian/Ubuntu specific, IIRC we define hardfloat


utils/ghc-pkg/Main.hs | 6 4 + 2 - 0 !
1 file changed, 4 insertions(+), 2 deletions(-)

 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.


aclocal.m4 | 5 4 + 1 - 0 !
compiler/utils/Platform.hs | 2 2 + 0 - 0 !
2 files changed, 6 insertions(+), 1 deletion(-)

---

compiler/iface/MkIface.hs | 5 4 + 1 - 0 !
1 file changed, 4 insertions(+), 1 deletion(-)

---

rts/RtsSymbols.c | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 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.
.



ghc.mk | 8 6 + 2 - 0 !
1 file changed, 6 insertions(+), 2 deletions(-)

 use the stage1 binaries for install
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.
.


llvm-targets | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 with new ghc 8.4.3, the armel situation seems to have improved,
apply this patch unconditionally.


compiler/main/SysTools.hs | 31 29 + 2 - 0 !
1 file changed, 29 insertions(+), 2 deletions(-)

 driver: skip -bsymbolic on unregisterised targets
Trac #15338 is yet another example where -Bsymbolic breaks
semantics of a C program: global variable duplication happens
and unsafePerformIO creates two stdout copies.
.
When -Bsymbolic is not used both C compiler and linker agree
on how global variables are handled. In case of sh4 it consists
on a few assertions:
.
1. global variable is exported from shared library
2. code is referred to this variable via GOT-like mechanism to allow
interposition
3. global variable is present .bss section on an executable
(as an R_*_COPY relocation: symbol contents is copied at executable
startup time)
4. and symbol in executable interposes symbol in shared library.
.
This way both code in shared library and code in executable refer
to a copy of global variable in .bss section of an executable.
.
Unfortunately -Bsymbolic option breaks assumption [2.] and generates
direct references to the symbol. This causes mismatch between
values seen from executable and values seen from shared library code.
.
This change disables '-Bsymbolic' for unregisterised targets.



configure.ac | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 use llvm 6.0 on arm*


rts/posix/OSMem.c | 4 4 + 0 - 0 !
1 file changed, 4 insertions(+)

 fix osreserveheapmemory block alignment


aclocal.m4 | 8 7 + 1 - 0 !
1 file changed, 7 insertions(+), 1 deletion(-)

 cherry-pick of upstream commits
beba89a0f16681c85d39fc8a894bde4162ff492a.patch:
5e63a25249f3cb07300258e115af9ff55079d2ea.patch:


includes/Stg.h | 11 11 + 0 - 0 !
1 file changed, 11 insertions(+)

 allow unregisterised ghc-8.2 to build newer ghc
Commit b68697e579d38ca29c2b84377dc2affa04659a28 introduced a regression
stopping existing unregisteristed compilers from being used to compile a newer
version of GHC. The problem is that the bootstrap compiler uses the newer Stg.h
where EB_, IB_, etc, definitions have changed resulting in the following error:
.
error: conflicting types for 'ghc_GhcPrelude_zdtrModule4_bytes'
note: in definition of macro 'EB_'
#define EB_(X)    extern const char X[]
note: previous definition of 'ghc_GhcPrelude_zdtrModule4_bytes' was here
char ghc_GhcPrelude_zdtrModule4_bytes[] = "ghc";
.
.
This patch is a rework of https://phabricator.haskell.org/D3741.
It modifies Stg.h to include the old definitions, if a compiler older than
8.4 is being used.
.
This patch can be removed, once ghc-8.2 is no longer the bootstrap compiler.


aclocal.m4 | 18 0 + 18 - 0 !
configure.ac | 5 0 + 5 - 0 !
libraries/ghc-prim/Setup.hs | 2 1 + 1 - 0 !
libraries/ghc-prim/aclocal.m4 | 17 17 + 0 - 0 !
libraries/ghc-prim/configure.ac | 18 18 + 0 - 0 !
libraries/ghc-prim/ghc-prim.buildinfo.in | 2 2 + 0 - 0 !
6 files changed, 38 insertions(+), 24 deletions(-)

---

compiler/main/GHC.hs | 25 22 + 3 - 0 !
3 files changed, 65 insertions(+), 31 deletions(-)

---

aclocal.m4 | 5 4 + 1 - 0 !
1 file changed, 4 insertions(+), 1 deletion(-)

 add kfreebsdgnu to ghc_convert_os in aclocal.m4


compiler/llvmGen/Llvm/Types.hs | 2 1 + 1 - 0 !
compiler/llvmGen/LlvmCodeGen/Base.hs | 62 9 + 53 - 0 !
compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 59 48 + 11 - 0 !
compiler/main/DriverPipeline.hs | 2 1 + 1 - 0 !
4 files changed, 59 insertions(+), 66 deletions(-)

---
---
---