| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to make the packages in this repo "reinstallable", we need to
associate source code with a specific packages. Having a top level
`/includes` dir that mixes concerns (which packages' includes?) gets in
the way of this.
To start, I have moved everything to `rts/`, which is mostly correct.
There are a few things however that really don't belong in the rts (like
the generated constants haskell type, `CodeGen.Platform.h`). Those
needed to be manually adjusted.
Things of note:
- No symlinking for sake of windows, so we hard-link at configure time.
- `CodeGen.Platform.h` no longer as `.hs` extension (in addition to
being moved to `compiler/`) so as not to confuse anyone, since it is
next to Haskell files.
- Blanket `-Iincludes` is gone in both build systems, include paths now
more strictly respect per-package dependencies.
- `deriveConstants` has been taught to not require a `--target-os` flag
when generating the platform-agnostic Haskell type. Make takes
advantage of this, but Hadrian has yet to.
|
|
|
|
|
|
|
|
| |
Running the test suite with asserts enabled is somewhat tricky at the
moment as running it with a GHC compiled the DEBUG way has some hundred
failures from the start. These seem to be unrelated to assertions
though. So this provides a toggle to make it easier to debug failing
assertions using the test suite.
|
| |
|
|
|
|
|
| |
Previously the rts's cabal file would claim that it bundled libffi, even
if we are using the system's libffi. Fixes #19869.
|
| |
|
|
|
|
|
|
|
| |
bound.
We use a non-inclusive upper bound so that setting the upper bound to 13 for
example means that all 12.x versions are accepted.
|
|
|
|
|
|
|
|
| |
Previously Hadrian depended implicitly upon whatever `bash` it found in
`PATH`, offerring no way for the user to override. Fix this by detecting
`sh` in `configure` and passing the result to Hadrian.
Fixes #19797.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also some code cleanup, and a fix for an (extant unrelated) missing
<pthread_np.h> include that should hopefully resolve a failure in the
FreeBSD CI build, since it is best to make sure that this MR actually
builds on FreeBSD systems other than mine.
Some unexpected metric changes on FreeBSD (perhaps because CI had been
failing for a while???):
Metric Decrease:
T3064
T5321Fun
T5642
T9020
T12227
T13253-spj
T15164
T18282
WWRec
Metric Increase:
haddock.compiler
|
|
|
|
|
| |
This requires adding another rewrite to the mangler, to avoid generating
PLT entries.
|
|
|
|
| |
Bumps the `haddock` submodule.
|
|
|
|
|
|
|
| |
Previously we used this non-portable function unconditionally, breaking
FreeBSD.
Fixes #19637.
|
| |
|
|
|
|
| |
and not just the name on the binary on the `$PATH`.
|
|
|
|
|
| |
As noted in my comment on #19058, this comment was previously a bit
misleading in the case of stable branches.
|
|
|
|
|
|
|
| |
Previously we would support only one LLVM major version. Here we
generalize this to accept a range, taking this range to be LLVM 10 to 11,
as 11 is necessary for Apple M1 support. We also accept 12, as that is
what apple ships with BigSur on the M1.
|
|
|
|
|
|
|
| |
Now that GHC 9.0.1 is released, it is time to drop support for bootstrapping
with GHC 8.8, as we only support building with the previous two major GHC
releases. As an added bonus, this allows us to remove several bits of CPP that
are either always true or no longer reachable.
|
|
|
|
| |
This enables a registerised build for the riscv64 architecture.
|
|
|
|
|
|
|
| |
Should fix failures on Windows:
configure.ac:1511: error: `
' is already registered with AC_CONFIG_FILES.
|
| |
|
|
|
|
|
| |
This wraps the existing GHCi wrapper script (driver/ghci/ghci.c) in a
cabal file and adds the package to Hadrian.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The native-code codepath uses dlinfo to identify memory regions owned by
a loaded dynamic object, facilitating safe unload. Unfortunately, this
interface is not always available. Add an autoconf check for it and
introduce a safe fallback behavior.
Fixes #19159.
|
| |
|
|
|
|
|
| |
Since the __atomic_* builtins are not supported until gcc 4.7. Given
that this version was released in 2012 I think this is acceptable.
|
|
|
|
| |
This should have been done when the toolchain was bumped.
|
|
|
|
| |
Fixes #18267.
|
|
|
|
|
|
| |
Bumps haskeline and haddock submodules.
(cherry picked from commit f218cfc92f7b1a1e01190851972bb9a0e0f3c682)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In b592bd98ff25730bbe3c13d6f62a427df8c78e28 we started using
-dead_strip_dylib on macOS when lining dynamic libraries and binaries.
The underlying reason being the Load Command Size Limit in macOS
Sierra (10.14) and later.
GHC will produce @rpath/libHS... dependency entries together with a
corresponding RPATH entry pointing to the location of the libHS...
library. Thus for every library we produce two Load Commands. One to
specify the dependent library, and one with the path where to find it.
This makes relocating libraries and binaries easier, as we just need to
update the RPATH entry with the install_name_tool. The dynamic linker
will then subsitute each @rpath with the RPATH entries it finds in the
libraries load commands or the environement, when looking up @rpath
relative libraries.
-dead_strip_dylibs intructs the linker to drop unused libraries. This in
turn help us reduce the number of referenced libraries, and subsequently
the size of the load commands. This however does not remove the RPATH
entries. Subsequently we can end up (in extreme cases) with only a
single @rpath/libHS... entry, but 100s or more RPATH entries in the Load
Commands.
This patch rectifies this (slighly unorthodox) by passing *no* -rpath
arguments to the linker at link time, but -headerpad 8000. The
headerpad argument is in hexadecimal and the maxium 32k of the load
command size. This tells the linker to pad the load command section
enough for us to inject the RPATHs later. We then proceed to link the
library or binary with -dead_strip_dylibs, and *after* the linking
inspect the library to find the left over (non-dead-stripped)
dependencies (using otool). We find the corresponding RPATHs for each
@rpath relative dependency, and inject them into the library or binary
using the install_name_tool. Thus achieving a deadstripped dylib (and
rpaths) build product.
We can not do this in GHC, without starting to reimplement a dynamic
linker as we do not know which symbols and subsequently libraries are
necessary.
Commissioned-by: Mercury Technologies, Inc. (mercury.com)
|
|
|
|
|
|
|
| |
The fix to #17962 ended up regressing on Windows as it failed to
replicate the logic responsible for overriding the toolchain paths on
Windows. This resulted in a hard-coded path to a directory that likely
doesn't exist on the user's system (#18550).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously to merge a set of object files we would invoke the linker as
usual, adding -r to the command-line. However, this can result in
non-sensical command-lines which causes lld to balk (#17962).
To avoid this we introduce a new tool setting into GHC, -pgmlm, which is
the linker which we use to merge object files.
|
|
|
|
| |
Fixes 18266
|
| |
|
| |
|
|
|
|
|
|
| |
Previously we would simply assume that makeindex was available.
Now we correctly detect it in `configure` and respect this conclusion in
hadrian and make.
|
|
|
|
|
|
|
|
|
|
|
| |
Starting with Win 8.1/Server 2012 windows no longer preallocates
page tables for reserverd memory eagerly, which prevented us from
using this approach in the past.
We also try to allocate the heap high in the memory space.
Hopefully this makes it easier to allocate things in the low
4GB of memory that need to be there. Like jump islands for the
linker.
|
|
|
|
|
|
|
| |
The initial version was rewritten by Tamar Christina.
It was rewritten in large parts by Andreas Klebinger.
Co-authored-by: Andreas Klebinger <klebinger.andreas@gmx.at>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we would report the number of physical processors, which
can be quite wrong in a containerized setting. Now we rather return how
many processors are in our affinity mask when possible.
I also refactored the code to prefer platform-specific since this will
report logical CPUs instead of physical (using
`machdep.cpu.thread_count` on Darwin and `cpuset_getaffinity` on FreeBSD).
Fixes #14781.
|
| |
|
|
|
|
|
|
| |
Metric Decrease:
T13035
T1969
|
|
|
|
|
|
|
|
| |
This allows us to remove several bits of CPP that are either always
true or no longer reachable. As an added bonus, we no longer need to
worry about importing `Control.Monad.Fail.fail` qualified to avoid
clashing with `Control.Monad.fail`, since the latter is now the same
as the former.
|
|
|
|
|
| |
The test operator "==" is a Bash extension and produces a wrong result
if /bin/sh is not Bash.
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously it was possible to override the stage0 C compiler via `CC_STAGE0`,
but you couldn't override `ld` or `ar` in stage0. This change allows overriding them
by setting `LD_STAGE0` or `AR_STAGE0`, respectively.
Our team uses this feature internally to take more control of our GHC build
and make it run more hermetically.
|