[Git][ghc/ghc][wip/toolchain-selection] 36 commits: Move via-C flags into GHC

Rodrigo Mesquita (@alt-romes) gitlab at gitlab.haskell.org
Tue May 30 17:40:30 UTC 2023



Rodrigo Mesquita pushed to branch wip/toolchain-selection at Glasgow Haskell Compiler / GHC


Commits:
98933a81 by Ben Gamari at 2023-05-30T18:27:10+01:00
Move via-C flags into GHC

These were previously hardcoded in configure (with no option for
overriding them) and simply passed onto ghc through the settings file.

Since configure already guarantees gcc supports those flags, we simply
move them into GHC.

- - - - -
dc639ee5 by Ben Gamari at 2023-05-30T18:27:10+01:00
ghc-toolchain: Initial commit

- - - - -
0ed861bd by Ben Gamari at 2023-05-30T18:27:10+01:00
Rip out runtime linker/compiler checks

- - - - -
f912c4f9 by Ben Gamari at 2023-05-30T18:27:10+01:00
configure: Rip out toolchain selection logic

- - - - -
b1836d31 by Ben Gamari at 2023-05-30T18:27:10+01:00
Fixes

- - - - -
61304d56 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
ghc-toolchain: Rename readProcess to readProcessStdout

Fixes bugs regarding a translation from the original autconf program
that failed to account for the exit code.

The longer name reenforces that we really only care about the stdout,
and the exit code and stderr of the program are irrelevant for the case.

- - - - -
341e6a89 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Re-introduce ld-override option

- - - - -
925784de by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
ghc-toolchain library and usage in hadrian flags

- - - - -
41fec247 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Re-introduce flags in hadrian config

- - - - -
71884db6 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
ghc-toolchain: UseLibFFI, LdCompactUnwind, LdFileList

A more complete ghc-toolchain.
Added configuration of:

* Use libffi for adjustors
* Supports compact unwind
* Supports filelist

- - - - -
9ca9fb0e by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Handle passing CPP cmd and flags from configure to ghc-toolchain

- - - - -
d1603cd2 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Rip more of configure that is no longer being used

- - - - -
7e36516a by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Remove configure checks of GNUnoexecStack and ident directive

And fix bug in ghc-toolchain respective code

- - - - -
59abac81 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Rip out more from hadrians system.config.in

- - - - -
f7206ebb by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Configure CLink supports response files

- - - - -
6f74ef31 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Read deleted keys from host and target's target

- - - - -
d50699f6 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Delete CMD_OPTS_STAGEX

Instead of having configure configure different options for different
programs depend on the stage, we delete this completely and have hadrian
select the correct target toolchain configuration file depending on the
stage, from which it can read those options.

- - - - -
0ba90dba by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Fix [host|target]-[os|arch] vs [host|target]-haskell-[os|arch]

- - - - -
5451a941 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Handle unspecified vs specified flags and commands better

- - - - -
6f878979 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Configure Cpp and HsCpp separately

- - - - -
64d2d696 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Fixes for compilation

- - - - -
b8c03ff5 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Link is GNU linkerg

- - - - -
681a44f1 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Revert "Rip more of configure that is no longer being used"

I realized we still need this function in rts/configure.ac

This reverts commit 01f5d4b480f4ab1514ac0a4fc957db199d1a0279.

- - - - -
c9dbc76b by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Revert get_arm_isa deletion from 74f03f243d08aa910d39cdd9dadb976e9386283a

As in the previous commit, we still need this info from the rts
configure script.

I suppose it could be useful for the rts to also read somehow the
toolchain information...

- - - - -
858a0194 by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
helper AC function for enable/disable

- - - - -
b97ce5bd by Rodrigo Mesquita at 2023-05-30T18:27:10+01:00
Delete unused imports of SysTools.Info

- - - - -
120f82c5 by Rodrigo Mesquita at 2023-05-30T18:28:30+01:00
Drop PROG_CPP in distrib/autoconf too

- - - - -
58caa344 by Rodrigo Mesquita at 2023-05-30T18:28:30+01:00
Get rid of MonadCatch instances and dependencies

- - - - -
de4bb9ea by Rodrigo Mesquita at 2023-05-30T18:28:30+01:00
ghc-toolchain: Check Cc supports extra-via-c-flags

- - - - -
4c27d354 by Rodrigo Mesquita at 2023-05-30T18:28:30+01:00
Consider empty programs as non-specified programs

- - - - -
7b10379b by Rodrigo Mesquita at 2023-05-30T18:28:30+01:00
Cpp and HsCpp cleanup

- - - - -
ac6fedb6 by Rodrigo Mesquita at 2023-05-30T18:28:30+01:00
Add comment from check for gold t22266

- - - - -
4f652366 by Rodrigo Mesquita at 2023-05-30T18:28:30+01:00
Stop configuring into settings unused Ld command

- - - - -
34b5f21b by Rodrigo Mesquita at 2023-05-30T18:28:30+01:00
Remove more settings bits from hadrian/cfg

- - - - -
fbc5d5e4 by Rodrigo Mesquita at 2023-05-30T18:28:30+01:00
Use llvm target from ghc-toolchain

- - - - -
08be70b9 by Rodrigo Mesquita at 2023-05-30T18:28:30+01:00
Print default.target

- - - - -


30 changed files:

- compiler/GHC/Driver/Backend.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Linker/ExtraObj.hs
- compiler/GHC/Linker/Static.hs
- compiler/GHC/Settings/IO.hs
- compiler/GHC/SysTools.hs
- compiler/GHC/SysTools/Info.hs
- compiler/GHC/SysTools/Tasks.hs
- configure.ac
- distrib/configure.ac.in
- ghc/Main.hs
- hadrian/bindist/Makefile
- hadrian/bindist/config.mk.in
- hadrian/cabal.project
- hadrian/cfg/system.config.in
- hadrian/hadrian.cabal
- hadrian/src/Base.hs
- hadrian/src/Builder.hs
- hadrian/src/Context.hs
- hadrian/src/Hadrian/Haskell/Hash.hs
- hadrian/src/Hadrian/Oracles/TextFile.hs
- hadrian/src/Oracles/Flag.hs
- hadrian/src/Oracles/Setting.hs
- hadrian/src/Rules/BinaryDist.hs
- hadrian/src/Rules/Generate.hs
- hadrian/src/Rules/Gmp.hs
- hadrian/src/Rules/Libffi.hs
- hadrian/src/Rules/Test.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cdb184e4b5be33fa4d9aa9eb9bd485d852d87aa1...08be70b93696b84bfab9afdfa2f30549fe21b06e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cdb184e4b5be33fa4d9aa9eb9bd485d852d87aa1...08be70b93696b84bfab9afdfa2f30549fe21b06e
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/20230530/6b2ad678/attachment-0001.html>


More information about the ghc-commits mailing list