| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
To support proper parsing of arm64 targets, we needed to adjust
the GHC_LLVM_TARGET function to allow parsing arm64-apple-darwin
into aarch64. This however discared the proper os detection.
To rectify this, we'll pull the os detection into separate block.
Fixes #19173.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This enables a registerised build for the riscv64 architecture.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first change makes the array ones use the proper fixed-size types,
which also means that just like before, they can be used without
explicit conversions with the boxed sized types. (Before, it was Int# /
Word# on both sides, now it is fixed sized on both sides).
For the second change, don't use "extend" or "narrow" in some of the
user-facing primops names for conversions.
- Names like `narrowInt32#` are misleading when `Int` is 32-bits.
- Names like `extendInt64#` are flat-out wrong when `Int is
32-bits.
- `narrow{Int,Word}<N>#` however map a type to itself, and so don't
suffer from this problem. They are left as-is.
These changes are batched together because Alex happend to use the array
ops. We can only use released versions of Alex at this time, sadly, and
I don't want to have to have a release thatwon't work for the final GHC
9.2. So by combining these we get all the changes for Alex done at once.
Bump hackage state in a few places, and also make that workflow slightly
easier for the future.
Bump minimum Alex version
Bump Cabal, array, bytestring, containers, text, and binary submodules
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously, the configure script doesn't respect $AR. This causes the
nixpkgs GHC to capture "ar" instead of the absolute nix store path of ar
in the global config.
The original patch comes from
https://github.com/input-output-hk/haskell.nix/blob/master/overlays/patches/ghc/respect-ar-path.patch.
|
| |
|
|
|
|
| |
A workaround for #19099.
|
|
|
|
|
|
|
|
| |
This addes the necessary logic to support aarch64 on elf, as well
as aarch64 on mach-o, which Apple calls arm64.
We change architecture name to AArch64, which is the official arm
naming scheme.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
See #17856.
|
|
|
|
|
|
|
|
| |
This patch adds the upper bound of a happy version for ghc-9.2.
Currently, We can use happy-1.19 or happy-1.20 for ghc-9.2.
See #18620.
|
|
|
|
|
|
|
|
|
| |
This patch adds the upper bound of a happy version for ghc-9.0
and earlier.
Currently, we can't use happy-1.20.0 for ghc-9.0.
See #18620.
|
| |
|
| |
|
|
|
|
|
| |
We want to only run the check if ld is gold.
Fixes the fix to #17962.
|
|
|
|
|
|
|
|
|
| |
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 #18505
|
|
|
| |
This is a leftover from ef63ff27251a20ff11e58c9303677fa31e609a88
|
| |
|
|
|
|
| |
The latter is apparently not supported by busybox.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch updates file paths according to new module hierarchy [1]:
* Rename:
* compiler/GHC/Parser.hs <= compiler/parser/Parser.hs
* compiler/GHC/Parser/Lexer.hs <= compiler/Parser/Lexer.hs
* Add:
* compiler/GHC/Cmm/Lexer.hs
[1]: https://gitlab.haskell.org/ghc/ghc/-/wikis/Make-GHC-codebase-more-modular
|
| |
|
|
|
|
|
|
|
| |
Compl Yue noticed that the linker was dumping the link map on SmartOS. This is
because Smartos uses the Solaris linker, which uses the `-64` flag, not
`-m64` like Gnu ld, to indicate that it should link for 64-bits. Fix the
configure script to handle the Solaris linker correctly.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
In addition, we prefer the Mingw64 Python distribution on Windows due
to #17483.
|
|
|
|
|
|
|
|
|
|
|
| |
Also refactor FP_GCC_EXTRA_FLAGS in a few ways:
* We no longer support compilers which lack support for -fno-builtin
and -fwrapv so remove the condition on GccVersion
* These flags are only necessary when using the via-C backend
so make them conditional on Unregisterised.
Fixes #15742.
|
| |
|
|
|
|
| |
tested with `bash` and `zsh`.
|
|
|
|
|
| |
This reverts commit aa31ceaf7568802590f73a740ffbc8b800096342 as
suggested in #17392.
|
|
|
|
|
| |
Not only is it now unused but we generally can't assume that we are
compiling with GCC, so it really shouldn't be used.
|
|
|
|
|
| |
GCC 4.6 was released 7 years ago. I think we can finally assume that
it's available. This is a simplification prompted by #15742.
|
| |
|
|
|
|
|
|
| |
This patch adds support for the s390x architecture for the LLVM code
generator. The patch includes a register mapping of STG registers onto
s390x machine registers which enables a registerised build.
|
|
|
|
|
|
|
|
|
|
|
| |
FreeBSD does not support GNU libc, so it makes no sense to use this
triple. Most likely previous builds were just using the FreeBSD libc
instead of gnueabihf. To fix this, we should just use
armv6-unknown-freebsd and armv7-unknown-freebsd triples. Note that
both of these are actually "soft-float", not "hard-float". FreeBSD has
never officially released hard-float arm32:
https://wiki.freebsd.org/ARMTier1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- No need to distinguish between gcc-llvm and clang. First of all,
gcc-llvm is quite old and surely unmaintained by now. Second of all,
none of the code actually care about that distinction!
Now, it does make sense to consider C multiple frontends for LLVMs in
the form of clang vs clang-cl (same clang, yes, but tweaked
interface). But this is better handled in terms of "gccish vs
mvscish" and "is LLVM", yielding 4 combinations. Therefore, I don't
think it is useful saving the existing code for that.
- Get the remaining CC_LLVM_BACKEND, and also TABLES_NEXT_TO_CODE in
mk/config.h the normal way, rather than hacking it post-hoc. No point
keeping these special cases around for now reason.
- Get rid of hand-rolled `die` function and just use `AC_MSG_ERROR`.
- Abstract check + flag override for unregisterised and tables next to
code.
Oh, and as part of the above I also renamed/combined some variables
where it felt appropriate.
- GccIsClang -> CcLlvmBackend. This is for `AC_SUBST`, like the other
Camal case ones. It was never about gcc-llvm, or Apple's renamed clang,
to be clear.
- llvm_CC_FLAVOR -> CC_LLVM_BACKEND. This is for `AC_DEFINE`, like the
other all-caps snake case ones. llvm_CC_FLAVOR was just silly
indirection *and* an odd name to boot.
|
|
|
|
|
|
| |
This was done in Nixpkgs, but never upstreamed. Musl is pretty much
the same as gnu, but with a different libc. I’ve used the same values
for everything.
|
| |
|
|
|
|
|
|
| |
This fixes #16860 by verifying that the generated sources don't already
exist before asserting that the `alex` executable was found. This
replicates the logic already used for `happy` in the case of `alex`.
|
|
|
|
|
|
|
|
|
| |
Some where using `True` / `False`, a legacy of when they were in
`Config.hs`. See #16914 / d238d3062a9858 for a similar problem.
Also clean up the configure variables names for consistency and clarity
while we're at it. "Target" makes clear we are talking about outputted
code, not where GHC itself runs.
|
|
|
|
|
|
|
| |
Fedora uses the naming llc-7.0 while Debian uses llc-7. Ensure that both
are found.
Fixes #16990.
|
|
|
|
|
|
|
| |
Previously we would pass flags intended for the C compiler to the C++
compiler (see #16738). This would cause, for instance, `-std=gnu99` to
be passed to the C++ compiler, causing spurious test failures. Fix this
by maintaining a separate set of flags for C++ compilation invocations.
|