The reason why this does not work is not that we can't built static
objects, we can, but we can't use `-staticlib` on GHC on windows.
`-staticlib` rolls all dependencies into a combined archive. While this
would work on windows if we used gnu ar and MRI script, GHC can't rely
on GNU ar, and as such has a quick archive concatenation module for GNU
and BSD archives only.
This is because they are just for Setup.hs, so they are just used at build time
and completely isolated from the normal components' dependencies.
This was previous implemented in 8a8f0408cd, but
reverted in e69c7f5641 because it broken
setup-depends non-cross in haskell shell environments (custom Setup.hs in cross
shell environments has never worked). This version adds a special native
exception to avoid that breakage.
Just like with the other `--extra-*` flags, cc/ld-wrapper already handles
this, but we need to make Cabal aware so that the haskell builds have
the correct metadata.
The reason why this does not work is not that we can't built static
objects, we can, but we can't use `-staticlib` on GHC on windows.
`-staticlib` rolls all dependencies into a combined archive. While this
would work on windows if we used gnu ar and MRI script, GHC can't rely
on GNU ar, and as such has a quick archive concatenation module for GNU
and BSD archives only.
This is because they are just for Setup.hs, so they are just used at build time
and completely isolated from the normal components' dependencies.
This was previous implemented in 8a8f0408cd, but
reverted in e69c7f5641 because it broken
setup-depends non-cross in haskell shell environments (custom Setup.hs in cross
shell environments has never worked). This version adds a special native
exception to avoid that breakage.
Just like with the other `--extra-*` flags, cc/ld-wrapper already handles
this, but we need to make Cabal aware so that the haskell builds have
the correct metadata.
Following legacy packing conventions, `isArm` was defined just for
32-bit ARM instruction set. This is confusing to non packagers though,
because Aarch64 is an ARM instruction set.
The official ARM overview for ARMv8[1] is surprisingly not confusing,
given the overall state of affairs for ARM naming conventions, and
offers us a solution. It divides the nomenclature into three levels:
```
ISA: ARMv8 {-A, -R, -M}
/ \
Mode: Aarch32 Aarch64
| / \
Encoding: A64 A32 T32
```
At the top is the overall v8 instruction set archicture. Second are the
two modes, defined by bitwidth but differing in other semantics too, and
buttom are the encodings, (hopefully?) isomorphic if they encode the
same mode.
The 32 bit encodings are mostly backwards compatible with previous
non-Thumb and Thumb encodings, and if so we can pun the mode names to
instead mean "sets of compatable or isomorphic encodings", and then
voilà we have nice names for 32-bit and 64-bit arm instruction sets
which do not use the word ARM so as to not confused either laymen or
experienced ARM packages.
[1]: https://developer.arm.com/products/architecture/a-profile
Since GHC is a cross compiler, it's perfectly possible to make haskell
binaries on platforms without GHCs. `windows ++ unix` seems good enough
for now.
Also don't default `hydraPlatforms` to `platforms`. The former must be a
list of systems (strings), but the latter is a list of systems or
patterns.
This change raises the question of whether we should disable building of shared
libraries altogether (since we don't link them). Unfortunately, we can't,
because GHC expects shared libraries to be around when building and running
test suites, and no amount of passing --disable-shared flags at configure time
changes the fact. I *guess* that's related to the DYNAMIC_GHC_PROGRAMS = YES
flag we set when building GHC itself, but I haven't investigated it further
yet.
Closes https://github.com/NixOS/nixpkgs/issues/29011.
Unless specified otherwise, the default package set compiles library variants
for profiling with profiling-detail "all-functions". Executables, however, are
not built with profiling enabled.
This change increases the closure size for many Haskell programs, but the
practical advantage of having stack traces and performance measurements easily
available during development seems to outweigh that cost.
Closes https://github.com/NixOS/nixpkgs/issues/22340.
This reverts commit e73e5c884f. Please don't
set $LD_LIBRARY_PATH! Instead, pass appropriate --extra-include-dir and
--extra-lib-dir arguments to "cabal configure" to ensure that Cabal knows
about system dependencies.
For a Haskell package "foo" the environment foo.env now contains the build tool
dependencies required for compiling the package in $PATH.
Fixes https://github.com/NixOS/cabal2nix/issues/331.