| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
We move the "target has RTS linker" information out of configure into a
predicate in GHC, and remove this option from the settings file where it
is unnecessary -- it's information statically known from the platform.
Note that previously we would consider `powerpc`s and `s390x`s other
than `powerpc-ibm-aix*` and `s390x-ibm-linux` to have an RTS linker,
but the RTS linker supports neither platform.
Closes #23361
|
|
|
|
|
|
|
|
|
|
| |
This patch does a few things:
- Always build 64-bit atomic ops in rts/ghc-prim, even on 32-bit
platforms
- Remove legacy "64bit" cabal flag of rts package
- Fix hs_xchg64 function prototype for 32-bit platforms
- Fix AtomicFetch test for wasm32
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Despite Cabal supporting any architecture name, `cabal --check` only
supports a few built-in ones. Sadly `cabal --check` is used by Hackage
hence using any non built-in name in a package (e.g. `arch(js)`) is
rejected and the package is prevented from being uploaded on Hackage.
Luckily built-in support for the `javascript` architecture was added for
GHCJS a while ago. In order to allow newer `base` to be uploaded on
Hackage we make the switch from `js` to `javascript` architecture.
Fixes #22740.
Co-authored-by: Ben Gamari <ben@smart-cactus.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The clang based toolchain uses ucrt as its math library
and so mingwex is no longer needed. In fact using mingwex
will cause incompatibilities as the default routines in both
have differing ULPs and string formatting modifiers.
```
$ LIBRARY_PATH=/mingw64/lib ghc/_build/stage1/bin/ghc Bug.hs -fforce-recomp && ./Bug.exe
[1 of 2] Compiling Main ( Bug.hs, Bug.o )
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `__imp___p__environ'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `__hscore_get_errno'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_ForeignziCziError_errnoToIOError_info'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziWindows_failIf2_closure'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncodingziCodePageziAPI_mkCodePageEncoding_info'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncodingziCodePage_currentCodePage_closure'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncoding_getForeignEncoding_closure'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_ForeignziCziString_withCStringLen1_info'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziHandleziInternals_zdwflushCharReadBuffer_info'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziHandleziText_hGetBuf1_info'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziFingerprint_fingerprintString_closure'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_DataziTypeableziInternal_mkTrCon_closure'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziException_errorCallWithCallStackException_closure'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziErr_error_info'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\template-haskell-2.19.0.0\libHStemplate-haskell-2.19.0.0.a: unknown symbol `base_DataziMaybe_fromJust1_info'
ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\template-haskell-2.19.0.0\libHStemplate-haskell-2.19.0.0.a: unknown symbol `templatezmhaskell_LanguageziHaskellziTHziSyntax_IntPrimL_con_info'
ghc.exe: ^^ Could not load 'templatezmhaskell_LanguageziHaskellziTHziLibziInternal_stringL_closure', dependency unresolved. See top entry above.
<no location info>: error:
GHC.ByteCode.Linker.lookupCE
During interactive linking, GHCi couldn't find the following symbol:
templatezmhaskell_LanguageziHaskellziTHziLibziInternal_stringL_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session. Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please report this as a GHC bug:
https://www.haskell.org/ghc/reportabug
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLVM 15 turns on the new pass manager by default, which we have yet to
migrate to so for new we pass the `-enable-new-pm-0` flag in our
llvm-passes flag.
LLVM 11 was the first version to support the `-enable-new-pm` flag so we
bump the lowest supported version to 11.
Our CI jobs are using LLVM 12 so they should continue to work despite
this bump to the lower bound.
Fixes #21936
|
|
|
|
|
|
|
|
| |
Teach the `configure` script to create the `VERSION` file.
This will serve as the stable interface to allow the user to determine
the version number of a working tree.
Fixes #22322.
|
|
|
|
|
|
|
|
|
|
| |
This mirrors some existing logic for the bootstrap_target which
influences how TargetPlatform is set.
As described on #21970 not storing this led to `LlvmTarget` being set incorrectly
and hence the wrong `--target` flag being passed to the C compiler.
Towards #21970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent versions of MacOS use a version of ld where `-fixup_chains` is on by default.
This is incompatible with our usage of `-undefined dynamic_lookup`. Therefore we
explicitly disable `fixup-chains` by passing `-no_fixup_chains` to the linker on
darwin. This results in a warning of the form:
ld: warning: -undefined dynamic_lookup may not work with chained fixups
The manual explains the incompatible nature of these two flags:
-undefined treatment
Specifies how undefined symbols are to be treated. Options are: error, warning,
suppress, or dynamic_lookup. The default is error. Note: dynamic_lookup that
depends on lazy binding will not work with chained fixups.
A relevant ticket is #22429
Here are also a few other links which are relevant to the issue:
Official comment: https://developer.apple.com/forums/thread/719961
More relevant links:
https://openradar.appspot.com/radar?id=5536824084660224
https://github.com/python/cpython/issues/97524
Note in release notes: https://developer.apple.com/documentation/xcode-release-notes/xcode-13-releas e-notes
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 7c6de18dd3151ead954c210336728e8686c91de6.
Centos7 using a very old version of the toolchain (autotools-2.69) where
the behaviour of these macros has not yet changed. I am reverting this
without haste as it is blocking the 9.6 branch.
Fixes #22704
|
| |
|
| |
|
|
|
|
|
|
| |
The latter has been deprecated.
See #22566.
|
|
|
|
|
|
|
| |
As noted in #22566, this macro is deprecated as of autoconf-2.70
`AC_PROG_CC` now sets `ac_cv_prog_cc_c99` itself.
Closes #22566.
|
| |
|
|
|
|
|
| |
I am not sure this job is good because it requires booting HEAD with
HEAD, but it should be fine.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add JS backend adapted from the GHCJS project by Luite Stegeman.
Some features haven't been ported or implemented yet. Tests for these
features have been disabled with an associated gitlab ticket.
Bump array submodule
Work funded by IOG.
Co-authored-by: Jeffrey Young <jeffrey.young@iohk.io>
Co-authored-by: Luite Stegeman <stegeman@gmail.com>
Co-authored-by: Josh Meredith <joshmeredith2008@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hadrian now performs substitutions, especially to generate .cabal files
from .cabal.in files. Two benefits:
1. We won't have to re-configure when we modify thing.cabal.in. Hadrian
will take care of this for us.
2. It paves the way to allow the same package to be configured
differently by Hadrian in the same session. This will be useful to
fix #19174: we want to build a stage2 cross-compiler for the host
platform and a stage1 compiler for the cross target platform in the
same Hadrian session.
|
|
|
|
| |
Instead of assuming support on all Linuxes.
|
|
|
|
|
|
| |
This patch adds the wasm32-wasi tuple support to various places in the
tree: autoconf, hadrian, ghc-boot and also the compiler. The codegen
logic will come in subsequent commits.
|
|
|
|
|
| |
This patch adds checks for getpid, getuid and raise in autoconf. These
functions are absent in wasm32-wasi and thus needs to be checked.
|
| |
|
|
|
|
|
|
|
|
|
| |
Currently it is only used by the make build system, which is soon to be
retired, and it has not built since 41cf758b. We may need to reintroduce
it when dynamic-linking support is introduced on Windows, but we will
cross that bridge once we get there.
Fixes #21753.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`autoreconf` will insert an `m4_warning` when the obsolescent
`AC_HEADER_TIME` macro is used:
> Update your code to rely only on HAVE_SYS_TIME_H,
> then remove this warning and the obsolete code below it.
> All current systems provide time.h; it need not be checked for.
> Not all systems provide sys/time.h, but those that do, all allow
> you to include it and time.h simultaneously.
Presence of `sys/time.h` was already checked in an earlier
`AC_CHECK_HEADERS` invocation, so `AC_HEADER_TIME` can be dropped and
guards relying on `TIME_WITH_SYS_TIME` can be reworked to
(unconditionally) include `time.h` and include `sys/time.h` based on
`HAVE_SYS_TIME_H`.
Note the documentation of `AC_HEADER_TIME` in (at least) Autoconf 2.67
says
> This macro is obsolescent, as current systems can include both files
> when they exist. New programs need not use this macro.
|
|
|
|
|
|
|
|
|
|
|
|
| |
As advertized by `autoreconf`:
> All current systems provide time.h; it need not be checked for.
Hence, remove the check for it in `configure.ac` and remove conditional
inclusion of the header in `HAVE_TIME_H` blocks where applicable.
The `time.h` header was being included in various source files without a
`HAVE_TIME_H` guard already anyway.
|
|
|
|
| |
Fixes #22245
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang 13+ supports annotating a return statement using the musttail
attribute, which guarantees that it lowers to a tail call if compilation
succeeds.
This patch takes advantage of that feature for the unregisterised code
generator. The configure script tests availability of the musttail
attribute, if it's available, the Cmm tail calls will become C tail
calls that avoids the mini interpreter trampoline overhead. Nothing is
affected if the musttail attribute is not supported.
Clang documentation:
https://clang.llvm.org/docs/AttributeReference.html#musttail
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now always merge .a archives when ar supports -L.
This change is necessary in order to bootstrap GHC using GHC 9.4
on Windows, as nested archives aren't supported.
Not doing so triggered bug #21990 when trying to use the Win32
package, with errors such as:
Not a x86_64 PE+ file.
Unknown COFF 4 type in getHeaderInfo.
ld.lld: error: undefined symbol: Win32zm2zi12zi0zi0_SystemziWin32ziConsoleziCtrlHandler_withConsoleCtrlHandler1_info
We have to be careful about which ar is meant: in stage 0, the check
should be done on the system ar (system-ar in system.config).
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Previously we used AC_PATH_PROG which, as noted by #21601, does not
look for tools with a target prefix,
breaking cross-compilation.
Fixes #21601.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds support to hadrian for starting a multi-repl containing
all the packages which stage0 can build. In particular, there is the new
user-facing command:
```
./hadrian/ghci-multi
```
which when executed will start a multi-repl containing the `ghc` package
and all it's dependencies.
This is implemented by two new hadrian targets:
```
./hadrian/build multi:<pkg>
```
Construct the arguments for a multi-repl session where the top-level
package is <pkg>. For example, `./hadrian/ghci-multi` is implemented
using `multi:ghc` target.
There is also the `multi` command which constructs a repl for everything
in stage0 which we can build.
|
|
|
|
|
|
|
|
|
| |
Since 6be2c5a7e9187fc14d51e1ec32ca235143bb0d8b we would probe for LD
rather early in `configure`. However, it turns out that this breaks
`configure`'s `ld`-override logic, which assumes that `LD` was set by
the user and aborts.
Fixes #21778.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We previously only checked the stage 1/2 compiler
for --target support. We got away with this for quite a while but it
eventually caught up with us in #21579, where `bytestring`'s new NEON
implementation was unbuildable on Darwin due to Rosetta's seemingly
random logic for determining which executable image to execute. This
lead to a confusing failure to build `bytestring`'s cbits, when `clang`
tried to compile NEON builtins while targetting x86-64.
Fix this by checking CC_STAGE0 for --target support.
Fixes #21579.
|
|
|
|
|
|
|
|
| |
Here we introduce a new "virtual" package into the initial package
database, `system-cxx-std-lib`. This gives users a convenient, platform
agnostic way to link against C++ libraries, addressing #20010.
Fixes #20010.
|
|
|
|
|
|
|
|
|
|
| |
Here we introduce proper support for compilation of C++ objects. This
includes:
* logic in `configure` to detect the C++ toolchain and propagating this
information into the `settings` file
* logic in the driver to use the C++ toolchain when compiling C++
sources
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the make bindists we generate documentation in docs/ghc-<VER> but the
hadrian bindists generate docs/ghc/ so the path to the GHC API docs was
wrong in the index.html file.
Rather than make the hadrian and make bindists the same it was easier to
assume that if you're using the mkDocs script that you're using hadrian
bindists.
Fixes #21509
|
|
|
|
|
|
|
| |
It appears that the version of sphinx shipped on CentOS 7
reports a version string of `Sphinx v1...`. Accept the `v`.
(cherry picked from commit a9197a292fd4b13308dc6664c01351c7239357ed)
|
|
|
|
|
|
| |
Pull forward minimum version to match 9.2.
(cherry picked from commit c26faa54c5fbe902ccb74e79d87e3fa705e270d1)
|
|
|
|
| |
Bumps haddock submodule.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here we deprecate the eventlogging RTS ways and instead enable eventlog
support in the remaining ways. This simplifies packaging and reduces GHC
compilation times (as we can eliminate two whole compilations of the RTS)
while simplifying the end-user story. The trade-off is a small increase
in binary sizes in the case that the user does not want eventlogging
support, but we think that this is a fine trade-off.
This also revealed a latent RTS bug: some files which included `Cmm.h`
also assumed that it defined various macros which were in fact defined
by `Config.h`, which `Cmm.h` did not include. Fixing this in turn
revealed that `StgMiscClosures.cmm` failed to import various spinlock
statistics counters, as evidenced by the failed unregisterised build.
Closes #18948.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop libtool logic from gen-dll, allowing us to drop the remaining logic
from the `configure` script.
Strangely, this appears to reliably reduce compiler allocations of
T16875 on Windows.
Closes #18826.
Metric Decrease:
T16875
|
|
|
|
|
|
|
|
|
|
| |
* Bump win32-tarballs to 0.7
* Move Windows toolchain autoconf logic into separate file
* Use clang and LLVM utilities as described in #21019
* Disable object merging as lld doesn't support -r
* Drop --oformat=pe-bigobj-x86-64 arguments from ld flags as LLD detects
that the output is large on its own.
* Drop gcc wrapper since Clang finds its root fine on its own.
|
|
|
|
|
|
|
|
| |
Since object files may in fact be archive files, we must ensure that
their contents are merged rather than constructing an
archive-of-an-archive.
See #21068.
|
|
|
|
|
| |
LLVM 13.0.0 is released in Oct 2021, and latest head validates against
LLVM 13 just fine if LlvmMaxVersion is bumped.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows ghc and its dependencies to be built using a normal
invocation of cabal-install. Each componenent which relied on generated
files or additional configuration now has a Setup.hs file.
There are also various fixes to the cabal files to satisfy
cabal-install.
There is a new hadrian command which will build a stage2 compiler and
then a stage3 compiler by using cabal.
```
./hadrian/build build-cabal
```
There is also a new CI job which tests running this command.
For the 9.4 release we will upload all the dependent executables to
hackage and then end users will be free to build GHC and GHC executables
via cabal.
There are still some unresolved questions about how to ensure soundness
when loading plugins into a reinstalled GHC (#20742) which will be
tighted up in due course.
Fixes #19896
|
|
|
|
| |
Like -threaded, stage0 isn't guaranteed to have an event-logging RTS.
|
|
|
|
|
|
|
|
|
|
| |
Previously we would unconditionally provide a declaration for `environ`,
even if `<unistd.h>` already provided one. This would result in
`-Werror` builds failing on some platforms.
Also `#include <unistd.h>` to ensure that the declaration is visible.
Fixes #20861.
|