[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 9 commits: Configure CPP into settings
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Jun 28 04:58:50 UTC 2023
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
54006049 by Rodrigo Mesquita at 2023-06-28T00:58:36-04:00
Configure CPP into settings
There is a distinction to be made between the Haskell Preprocessor and
the C preprocessor. The former is used to preprocess Haskell files,
while the latter is used in C preprocessing such as Cmm files.
In practice, they are both the same program (usually the C compiler) but
invoked with different flags.
Previously we would, at configure time, configure the haskell
preprocessor and save the configuration in the settings file, but,
instead of doing the same for CPP, we had hardcoded in GHC that the CPP
program was either `cc -E` or `cpp`.
This commit fixes that asymmetry by also configuring CPP at configure
time, and tries to make more explicit the difference between HsCpp and
Cpp (see Note [Preprocessing invocations]).
Note that we don't use the standard CPP and CPPFLAGS to configure Cpp,
but instead use the non-standard --with-cpp and --with-cpp-flags.
The reason is that autoconf sets CPP to "$CC -E", whereas we expect the
CPP command to be configured as a standalone executable rather than a
command. These are symmetrical with --with-hs-cpp and
--with-hs-cpp-flags.
Cleanup: Hadrian no longer needs to pass the CPP configuration for CPP
to be C99 compatible through -optP, since we now configure that
into settings.
Closes #23422
- - - - -
49a5ac17 by Rodrigo Mesquita at 2023-06-28T00:58:36-04:00
Stop configuring unused Ld command in `settings`
GHC has no direct dependence on the linker. Rather, we depend upon the C
compiler for linking and an object-merging program (which is typically
`ld`) for production of GHCi objects and merging of C stubs into final
object files.
Despite this, for historical reasons we still recorded information about
the linker into `settings`. Remove these entries from `settings`,
`hadrian/cfg/system.config`, as well as the `configure` logic
responsible for this information.
Closes #23566.
- - - - -
9a88d36f by aadaa_fgtaa at 2023-06-28T00:58:39-04:00
Optimise ELF linker (#23464)
- cache last elements of `relTable`, `relaTable` and `symbolTables` in `ocInit_ELF`
- cache shndx table in ObjectCode
- run `checkProddableBlock` only with debug rts
- - - - -
f73f6b9a by Rodrigo Mesquita at 2023-06-28T00:58:40-04:00
Configure MergeObjs supports response files rather than Ld
The previous configuration script to test whether Ld supported response
files was
* Incorrect (see #23542)
* Used, in practice, to check if the *merge objects tool* supported
response files.
This commit modifies the macro to run the merge objects tool (rather
than Ld), using a response file, and checking the result with $NM
Fixes #23542
- - - - -
75304ec6 by Ben Gamari at 2023-06-28T00:58:41-04:00
Rip out runtime linker/compiler checks
We used to choose flags to pass to the toolchain at runtime based on the
platform running GHC, and in this commit we drop all of those runtime
linker checks
Ultimately, this represents a change in policy: We no longer adapt at
runtime to the toolchain being used, but rather make final decisions
about the toolchain used at /configure time/
(we have deleted Note [Run-time linker info] altogether!).
This works towards the goal of having all toolchain configuration logic
living in the same place, which facilities the work towards a
runtime-retargetable GHC (see #19877).
As of this commit, the runtime linker/compiler logic was moved to
autoconf, but soon it, and the rest of the existing toolchain
configuration logic, will live in the standalone ghc-toolchain program
(see !9263)
In particular, what used to be done at runtime is now as follows:
* The flags -Wl,--no-as-needed for needed shared libs are configured
into settings
* The flag -fstack-check is configured into settings
* The check for broken tables-next-to-code was outdated
* We use the configured c compiler by default as the assembler program
* We drop `asmOpts` because we already configure -Qunused-arguments flag
into settings (see !10589)
Fixes #23562
Co-author: Rodrigo Mesquita (@alt-romes)
- - - - -
3bfe3eb3 by Bryan Richter at 2023-06-28T00:58:42-04:00
Remove extraneous debug output
- - - - -
c6d884fa by Bryan Richter at 2023-06-28T00:58:42-04:00
Work with unset vars in -e mode
- - - - -
7581def0 by Bryan Richter at 2023-06-28T00:58:42-04:00
Pass positional arguments in their positions
By quoting $cmd, the default "bash -i" is a single argument to run, and
no file named "bash -i" actually exists to be run.
- - - - -
800c1fe5 by Bryan Richter at 2023-06-28T00:58:42-04:00
Handle unset value in -e context
- - - - -
30 changed files:
- .gitlab/ci.sh
- .gitlab/darwin/toolchain.nix
- compiler/GHC/Driver/Backend.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Linker/ExtraObj.hs
- compiler/GHC/Settings.hs
- compiler/GHC/Settings/IO.hs
- compiler/GHC/StgToJS/Linker/Linker.hs
- compiler/GHC/SysTools.hs
- compiler/GHC/SysTools/Cpp.hs
- − compiler/GHC/SysTools/Info.hs
- compiler/GHC/SysTools/Tasks.hs
- compiler/ghc.cabal.in
- configure.ac
- distrib/configure.ac.in
- ghc/Main.hs
- hadrian/bindist/Makefile
- hadrian/bindist/config.mk.in
- hadrian/cfg/system.config.in
- hadrian/src/Oracles/Setting.hs
- hadrian/src/Rules/Generate.hs
- hadrian/src/Settings/Builders/Ghc.hs
- hadrian/src/Settings/Builders/Hsc2Hs.hs
- m4/fp_cpp_cmd_with_args.m4
- + m4/fp_hs_cpp_cmd_with_args.m4
- − m4/fp_ld_supports_response_files.m4
- + m4/fp_link_supports_no_as_needed.m4
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bb0eb7104298be878567bd9f15919f538fff2bc1...800c1fe5549335097cd77797e716e99cacce08b4
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bb0eb7104298be878567bd9f15919f538fff2bc1...800c1fe5549335097cd77797e716e99cacce08b4
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/20230628/54e6ab70/attachment-0001.html>
More information about the ghc-commits
mailing list