[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 21 commits: Stop configuring unused Ld command in `settings`

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Jun 28 16:57:33 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
ecdc4353 by Rodrigo Mesquita at 2023-06-28T12:24:57-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.

- - - - -
bf9ec3e4 by Bryan Richter at 2023-06-28T12:25:33-04:00
Remove extraneous debug output

- - - - -
7eb68dd6 by Bryan Richter at 2023-06-28T12:25:33-04:00
Work with unset vars in -e mode

- - - - -
49c27936 by Bryan Richter at 2023-06-28T12:25:33-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.

- - - - -
887dc4fc by Bryan Richter at 2023-06-28T12:25:33-04:00
Handle unset value in -e context

- - - - -
d939cd10 by Rodrigo Mesquita at 2023-06-28T12:57:03-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

- - - - -
a39eabc2 by Ben Gamari at 2023-06-28T12:57:03-04:00
hadrian: Always canonicalize topDirectory

Hadrian's `topDirectory` is intended to provide an absolute path to the
root of the GHC tree. However, if the tree is reached via a symlink this

One question here is whether the `canonicalizePath` call is expensive
enough to warrant caching. In a quick microbenchmark I observed that
`canonicalizePath "."` takes around 10us per call; this seems
sufficiently low not to worry.

Alternatively, another approach here would have been to rather move the
canonicalization into `m4/fp_find_root.m4`. This would have avoided
repeated canonicalization but sadly path canonicalization is a hard
problem in POSIX shell.

Addresses #22451.

- - - - -
4baa1fc9 by aadaa_fgtaa at 2023-06-28T12:57:08-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

- - - - -
5d080438 by Ben Gamari at 2023-06-28T12:57:08-04:00
compiler: Introduce MO_{ACQUIRE,RELEASE}_FENCE

- - - - -
4bb6d219 by Ben Gamari at 2023-06-28T12:57:08-04:00
compiler: Drop MO_WriteBarrier

rts: Drop write_barrier

- - - - -
01408558 by Ben Gamari at 2023-06-28T12:57:08-04:00
rts: Drop load_store_barrier()

This is no longer used.

- - - - -
3ecc3d98 by Ben Gamari at 2023-06-28T12:57:08-04:00
rts: Drop last instances of prim_{write,read}_barrier

- - - - -
e7690b82 by Ben Gamari at 2023-06-28T12:57:08-04:00
rts: Eliminate remaining uses of load_load_barrier

- - - - -
67edc44d by Sven Tennie at 2023-06-28T12:57:08-04:00
compiler: Drop MO_ReadBarrier

- - - - -
33df4f18 by Ben Gamari at 2023-06-28T12:57:08-04:00
rts: Drop load_load_barrier

This is no longer used.

- - - - -
2f0562e1 by Sven Tennie at 2023-06-28T12:57:09-04:00
Delete write_barrier function

- - - - -
f9ebaf84 by Ben Gamari at 2023-06-28T12:57:09-04:00
rts: Make collectFreshWeakPtrs definition a prototype

x86-64/Darwin's toolchain inexplicably warns that collectFreshWeakPtrs
needs to be a prototype.

- - - - -
8a26ef35 by Sven Tennie at 2023-06-28T12:57:09-04:00
Fix number of free double regs

D1..D4 are defined for aarch64 and thus not free.

- - - - -
f95d0108 by Ryan Scott at 2023-06-28T12:57:10-04:00
Fix typechecking of promoted empty lists

The `'[]` case in `tc_infer_hs_type` is smart enough to handle arity-0 uses of
`'[]` (see the newly added `T23543` test case for an example), but the `'[]`
case in `tc_hs_type` was not. We fix this by changing the `tc_hs_type` case to
invoke `tc_infer_hs_type`, as prescribed in `Note [Future-proofing the type
checker]`.

There are some benign changes to test cases' expected output due to the new
code path using `forall a. [a]` as the kind of `'[]` rather than `[k]`.

Fixes #23543.

- - - - -
e773b4fa by Rodrigo Mesquita at 2023-06-28T12:57:11-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

- - - - -
42591b51 by Sylvain Henry at 2023-06-28T12:57:22-04:00
JS: fix JS stack printing (#23565)

- - - - -


30 changed files:

- .gitlab/ci.sh
- .gitlab/darwin/toolchain.nix
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/PPC/CodeGen.hs
- compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
- compiler/GHC/CmmToAsm/Wasm/FromCmm.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToC.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Settings.hs
- compiler/GHC/Settings/IO.hs
- compiler/GHC/StgToCmm/Prim.hs
- compiler/GHC/StgToJS/Linker/Linker.hs
- compiler/GHC/SysTools/Cpp.hs
- compiler/GHC/SysTools/Tasks.hs
- compiler/GHC/Tc/Gen/HsType.hs
- 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


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/05cb2e565d33919a3f0af371011ff90805be8e8b...42591b51795a1607c02e70c477bf4abf429f620c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/05cb2e565d33919a3f0af371011ff90805be8e8b...42591b51795a1607c02e70c477bf4abf429f620c
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/95e822a7/attachment-0001.html>


More information about the ghc-commits mailing list