| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The check for the "v" prefix is redundant.
|
| |
|
| |
|
|
|
|
| |
`parallel` is no longer a submodule since 3cb063c805ec841ca33b8371ef8aba9329221b6c
|
|
|
|
|
| |
In addition, we prefer the Mingw64 Python distribution on Windows due
to #17483.
|
|
|
| |
Previously we used `AC_DEFINE`d variable `CC_LLVM_BACKEND` which has an empty shell expansion.
|
| |
|
|
|
| |
to be consistent what FP_GCC_VERSION requires
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Be more precise at detecting cross-compilation case.
Before the change configuration
$ ./configure --host=x86_64-pc-linux-gnu --target=x86_64-gentoo-linux-musl
was not considered a cross-target. Even though libcs are different (`glibc` vs. `musl`).
Without this patch build fails as:
```
"inplace/bin/ghc-cabal" check libraries/integer-gmp
"inplace/bin/ghc-cabal" configure libraries/integer-gmp dist-install \
--with-ghc="/home/slyfox/dev/git/ghc/inplace/bin/ghc-stage1" \
--with-ghc-pkg="/home/slyfox/dev/git/ghc/inplace/bin/ghc-pkg" \
--disable-library-for-ghci --enable-library-vanilla --enable-library-for-ghci \
--enable-library-profiling --enable-shared --with-hscolour="/usr/bin/HsColour" \
--configure-option=CFLAGS="-Wall \
-Werror=unused-but-set-variable -Wno-error=inline \
-iquote /home/slyfox/dev/git/ghc/libraries/integer-gmp" \
--configure-option=LDFLAGS=" " --configure-option=CPPFLAGS=" \
" --gcc-options="-Wall -Werror=unused-but-set-variable -Wno-error=inline -iquote /home/slyfox/dev/git/ghc/libraries/integer-gmp \
" --with-gcc="x86_64-gentoo-linux-musl-gcc" --with-ld="x86_64-gentoo-linux-musl-ld.gold" --with-ar="x86_64-gentoo-linux-musl-ar" \
--with-alex="/usr/bin/alex" --with-happy="/usr/bin/happy"
Configuring integer-gmp-1.0.2.0...
configure: WARNING: unrecognized options: --with-compiler
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for gcc... /usr/lib/ccache/bin/x86_64-gentoo-linux-musl-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/home/slyfox/dev/git/ghc/libraries/integer-gmp/dist-install/build':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
make[1]: *** [libraries/integer-gmp/ghc.mk:5: libraries/integer-gmp/dist-install/package-data.mk] Error 1
make: *** [Makefile:126: all] Error 2
```
Note: here `ghc-stage1` is assumed to target `musl` target but is passed
`glibc` toolchain. It happens because initial ./configure phase did not
detect host/target as different.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
| |
Previously we were using AC_DEFINE instead of
AC_DEFINE_UNQUOTED, resulted in the variable not being
interpolated.
Fixes #17505.
|
| |
|
|
|
|
| |
Bumps haddock submodule.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
If sphinx's python version check failed, many people prefer to build
without documents instead of stopping on the error.
So this commit fixes the following:
* Modify AC_MSG_ERROR to AC_MSG_WARN
* Add clearing of SPHINXBUILD variable when check fails
See also !2016.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This checks the configuration about python3-sphinx.
We need python3-sphinx instead of python2-sphinx to build documentation.
The approach is as follows:
* Check python3 version with custom `conf.py` invoked from
sphinx-build` executable
* Place custom `conf.py` into new `utils/check-sphinx` directory
If sphinx is for python2 not python3, it's treated as config ERROR
instead of WARN.
See also #17346 and #17356.
|
|
|
|
| |
Fixing #17255.
|
|
|
|
|
| |
This had silently regressed due to 81860281 and the variable renaming performed
in b55ee979, as noted in #17374.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
| |
d679ca43e7477284d733b94ff542be5363be3353 meant to remove it but did not
finish the job.
|
|
|
|
|
| |
We no longer support booting from older GHC since
527bcc41630918977c73584d99125ff164400695.
|
|
|
|
| |
Unused outside it since b6be81b841e34ca45b3549c4c79e886a8761e59a.
|