To my surprise, it just works, and there are no hs library signature
changes, so there's no need to touch all the hs-* ports.
Next steps will be (in no particular order): enable PIE, update to
ghc 8.4, kill W^X, debug and fix the SIG(SEGV|TRAP|BUS|ILL) problems
with tehmplate haskell seen by some people.
are available fails badly if the ghc-prim package contains more
than one entry in the library-dirs: field, which is currently the
case for our ghc port.
Only check for the existance of vertain files in the first entry
of the library-dirs: field to re-enable tons of previously disabled
tests and to get rid of stupid "/bin/sh: [: ... unexpected
operator/operand" errors.
This should be fixed for real at both our side (don't include the
same directory twice in the library-dirs: field) and upstream (don't
rely on the library-dirs: field only containing one directory).
or ghc-8.2.x (yet untested).
Also, don't build iserv with -threading if multithreading is disabled
(which is the case for the bootstrappers we build). I could also have
patched out iserv from the bindist targets, but this way it's simpler.
ghc uses cc for generating object files from assembler files and
passes the CONF_CC_OPTS_STAGE? flags to it, which clang doesn't
like, so add -Wno-unused-command-line-argument to the flags passed
to cc if it's clang.
To let this work for the bootstrap compiler, properly CONFIGURE_ENV
when installing the bootstrap (in post-patch:). This also makes the
hack patching the bootstrap/bin/ghc script in post-patch: obsolete.
prodded by (and with some hints from) espie@
~here are still a lot of warnings, most about macros #defined in
storage/ClosureMacros.h. Those should be fixed in a separate step,
probably after an update to ghc-8.
as the patch shows).
you'll need to wait for a bootstrap/rebootrap yourself so this is actually
effective.
(should cut down *a lot* on the insane number of warnings produced due to
unknown compile options on a clang system)
okay kili@
the linker again. Otherwise, the ld wrapper script installed when
USE_WXNEEDED=Yes will be used by the installed ghc package.
Problem noticed by Karel Gardas.
A real fix would be to remove PROT_EXEC from mmapForLinker() in
rts/Linker.c and to flip PROT_WRITE / PROT_EXEC in loadObj_()
when it's done, but this requires a little bit more time for
testing (turnaround times for building and testing ghc aren't
that funny).
following the recent change to pledge(2) (passing NULL doesn't change
the value).
- Use maybeWith instead of pattern matching to distinguish between
Nothing and Just x.
- Add some minimal documentation.
only one function giving access to the pledge(2) system call:
pledge :: String -> Maybe [FilePath] -> IO ()
Help and testing by semarie@ and abieber@. Thanks!
No bump yet, because there'll be some more churn (so please wait a
little bit for other haskell commits before starting to build it).
It appears that strip --strip-unneeded sometimes strips too much.
For example, if you take libHStf-random-0.5-926BwEbiHzi7pBkp4dTxOe.a
from the hs-tf-random package on i386 and run strip --strip-unneeded
on it, the T Threefish_256_Process_Block symbol (from threefish_block.o)
is stripped, which shouldn't happen. Note: this specific case applies
to i386, not to amd64. But...
doug@ reported a similar problem for the haskell library texmath,
which we don't yet have in the ports tree, and he made some even
more weird observation: texmath contains the two C source files
cbits/{key,val}ToASCII.c, defining the symbols keylookup (in
keyToAscii.c) and toASCIILut (in valToASCII.c), where both are just
some lookup tables. With strip --strip-unneeded enabled, the resulting
libHStexmath-*.a archive is missing keylookup. doug@ then concatenated
both .c files to a new one and changed the .cabal file of texmath
to use that single one instead, and suddenly the symbol keylookup
no longer was removed.
I'll try to make a port for texmath (which would be required anyway
for porting pandoc) so people who want help to debug this don't
have to build all the haskell goo themselves.