[Git][ghc/ghc][wip/rts-configure] 22 commits: Test that functions from `mingwex` are available

John Ericson (@Ericson2314) gitlab at gitlab.haskell.org
Thu Oct 12 15:44:17 UTC 2023



John Ericson pushed to branch wip/rts-configure at Glasgow Haskell Compiler / GHC


Commits:
34fc28b0 by John Ericson at 2023-10-12T06:48:28-04:00
Test that functions from `mingwex` are available

Ryan wrote these two minimizations, but they never got added to the test
suite.

See #23309, #23378

Co-Authored-By: Ben Gamari <bgamari.foss at gmail.com>
Co-Authored-By: Ryan Scott <ryan.gl.scott at gmail.com>

- - - - -
bdb54a0e by John Ericson at 2023-10-12T06:48:28-04:00
Do not check for the `mingwex` library in `/configure`

See the recent discussion in !10360 --- Cabal will itself check for the
library for the packages that need it, and while the autoconf check
additionally does some other things like define a `HAS_LIBMINGWEX` C
Preprocessor macro, those other things are also unused and unneeded.

Progress towards #17191, which aims to get rid of `/configure` entirely.

- - - - -
43e814e1 by Ben Gamari at 2023-10-12T06:49:40-04:00
base: Introduce move modules into src

The only non-move changes here are whitespace changes to pass the
`whitespace` test and a few testsuite adaptations.

- - - - -
df81536f by Moritz Angermann at 2023-10-12T06:50:16-04:00
[PEi386 linker] Bounds check and null-deref guard

We should resonably be able to expect that we won't exceed the number of
sections if we assume to be dealing with legal object files. We can however
not guarantee that we get some negative values, and while we try to
special case most, we should exclude negative indexing into the sections
array.

We also need to ensure that we do not try to derefences targetSection,
if it is NULL, due to the switch statement.

- - - - -
c74c4f00 by John Ericson at 2023-10-12T10:31:13-04:00
Move apple compat check to RTS configure

- - - - -
c80778ea by John Ericson at 2023-10-12T10:31:13-04:00
Move clock/timer fun checks to RTS configure

Actual library check (which will set the Cabal flag) is left in the
top-level configure for now.

Progress towards #17191

- - - - -
7f9f2686 by John Ericson at 2023-10-12T10:31:13-04:00
Move visibility and "musttail" annotation checks to the RTS configure

All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.

Progress towards #17191

- - - - -
ffb3efe6 by John Ericson at 2023-10-12T10:31:13-04:00
Move leading underscore checks to RTS configure

`CabalLeadingUnderscore` is done via Hadrian already, so we can stop
`AC_SUBST`ing it completely.

- - - - -
25fa4b02 by John Ericson at 2023-10-12T10:31:13-04:00
Move alloca, fork, const, and big endian checks to RTS configure

All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it
belongs in the RTS configure and should be safe to move without
modification.

- - - - -
5170f42a by John Ericson at 2023-10-12T10:31:13-04:00
Move libdl check to RTS configure

- - - - -
ea7a1447 by John Ericson at 2023-10-12T10:31:13-04:00
Adjust `FP_FIND_LIBFFI`

Just set vars, and `AC_SUBST` in top-level configure.

Don't define `HAVE_SYSTEM_LIBFFI` because nothing is using it. It hasn't
be in used since 3609340743c1b25fdfd0e18b1670dac54c8d8623 (part of the
make build system).

- - - - -
f399812c by John Ericson at 2023-10-12T10:31:13-04:00
Split BFD support to RTS configure

The flag is still in the top-level configure, but the other checks
(which define various macros --- important) are in the RTS configure.

- - - - -
f64f44e9 by John Ericson at 2023-10-12T10:31:13-04:00
Split libm check between top level and RTS

- - - - -
dafc4709 by Moritz Angermann at 2023-10-12T10:31:49-04:00
CgUtils.fixStgRegStmt respect register width

This change ensure that the reg + offset computation is always of the
same size.  Before this we could end up with a 64bit register, and then
add a 32bit offset (on 32bit platforms).  This not only would fail type
sanity checking, but also incorrectly truncate 64bit values into 32bit
values silently on 32bit architectures.

- - - - -
1f209951 by John Ericson at 2023-10-12T11:36:54-04:00
Do not substitute `@...@` for stage-specific values in cabal files

`rts` and `ghc-prim` now no longer have a `*.cabal.in` to set Cabal flag
defaults; instead manual choices are passed to configure in the usual
way.

The old way was fundamentally broken, because it meant we were baking
these Cabal files for a specific stage. Now we only do stage-agnostic
@...@ substitution in cabal files (the GHC version), and so all
stage-specific configuration is properly confined to `_build` and the
right stage dir.

Also `include-ghc-prim` is a flag that no longer exists for `ghc-prim`
(it was removed in 835d8ddbbfb11796ea8a03d1806b7cee38ba17a6) so I got
rid of it.

Co-Authored-By: Matthew Pickering <matthewtpickering at gmail.com>

- - - - -
041d3cfb by John Ericson at 2023-10-12T11:38:51-04:00
Move function checks to RTS configure

Some of these functions are used in `base` too, but we can copy the
checks over to its configure if that's an issue.

- - - - -
b67f3795 by John Ericson at 2023-10-12T11:38:51-04:00
Move over a number of C-style checks to RTS configure

- - - - -
b5a2feec by John Ericson at 2023-10-12T11:38:51-04:00
Move/Copy more `AC_DEFINE` to RTS config

Only exception is the LLVM version macros, which are used for GHC
itself.

- - - - -
80ce7a8f by John Ericson at 2023-10-12T11:39:22-04:00
Define `TABLES_NEXT_TO_CODE` in the RTS configure

We create a new cabal flag to facilitate this.

- - - - -
b9c24368 by John Ericson at 2023-10-12T11:39:23-04:00
Configure scripts: `checkOS`: Make a bit more robust

`mingw64` and `mingw32` are now both accepted for `OSMinGW32`. This
allows us to cope with configs/triples that we haven't normalized extra
being what GNU `config.sub` does.

- - - - -
830a78d3 by John Ericson at 2023-10-12T11:39:48-04:00
Generate `ghcplatform.h` from RTS configure

We create a new cabal flag to facilitate this.

- - - - -
eaef63d4 by John Ericson at 2023-10-12T11:42:07-04:00
Get rid of all mention of `mk/config.h`

The RTS configure script is now solely responsible for managing its
headers; the top level configure script does not help.

- - - - -


30 changed files:

- .gitignore
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/StgToCmm/CgUtils.hs
- configure.ac
- distrib/cross-port
- docs/coding-style.html
- hadrian/src/Rules/Generate.hs
- hadrian/src/Rules/Lint.hs
- hadrian/src/Rules/Register.hs
- hadrian/src/Rules/SourceDist.hs
- hadrian/src/Settings/Packages.hs
- libraries/base/base.cabal
- libraries/base/Control/Applicative.hs → libraries/base/src/Control/Applicative.hs
- libraries/base/Control/Arrow.hs → libraries/base/src/Control/Arrow.hs
- libraries/base/Control/Category.hs → libraries/base/src/Control/Category.hs
- libraries/base/Control/Concurrent.hs → libraries/base/src/Control/Concurrent.hs
- libraries/base/Control/Concurrent.hs-boot → libraries/base/src/Control/Concurrent.hs-boot
- libraries/base/Control/Concurrent/Chan.hs → libraries/base/src/Control/Concurrent/Chan.hs
- libraries/base/Control/Concurrent/MVar.hs → libraries/base/src/Control/Concurrent/MVar.hs
- libraries/base/Control/Concurrent/QSem.hs → libraries/base/src/Control/Concurrent/QSem.hs
- libraries/base/Control/Concurrent/QSemN.hs → libraries/base/src/Control/Concurrent/QSemN.hs
- libraries/base/Control/Exception.hs → libraries/base/src/Control/Exception.hs
- libraries/base/Control/Exception/Base.hs → libraries/base/src/Control/Exception/Base.hs
- libraries/base/Control/Monad.hs → libraries/base/src/Control/Monad.hs
- libraries/base/Control/Monad/Fail.hs → libraries/base/src/Control/Monad/Fail.hs
- libraries/base/Control/Monad/Fix.hs → libraries/base/src/Control/Monad/Fix.hs
- libraries/base/Control/Monad/IO/Class.hs → libraries/base/src/Control/Monad/IO/Class.hs
- libraries/base/Control/Monad/Instances.hs → libraries/base/src/Control/Monad/Instances.hs
- libraries/base/Control/Monad/ST.hs → libraries/base/src/Control/Monad/ST.hs
- libraries/base/Control/Monad/ST/Imp.hs → libraries/base/src/Control/Monad/ST/Imp.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7d3f7d92b54a450151a474a9f4af8bed8b54fe0c...eaef63d4aa345fd0ea8400392084c69104da68ab

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7d3f7d92b54a450151a474a9f4af8bed8b54fe0c...eaef63d4aa345fd0ea8400392084c69104da68ab
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231012/aeb6c11f/attachment-0001.html>


More information about the ghc-commits mailing list