[Git][ghc/ghc][wip/toolchain-selection] 11 commits: ghc-toolchain: Toolchain Selection

Rodrigo Mesquita (@alt-romes) gitlab at gitlab.haskell.org
Mon Jun 26 17:56:28 UTC 2023



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


Commits:
eaf8568e by Rodrigo Mesquita at 2023-06-26T18:55:56+01:00
ghc-toolchain: Toolchain Selection

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.

Fixes

Re-introduce ld-override option

ghc-toolchain library and usage in hadrian flags

Re-introduce flags in hadrian config

ghc-toolchain: UseLibFFI, LdCompactUnwind, LdFileList

A more complete ghc-toolchain.
Added configuration of:

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

Handle passing CPP cmd and flags from configure to ghc-toolchain

Rip more of configure that is no longer being used

Remove configure checks of GNUnoexecStack and ident directive

And fix bug in ghc-toolchain respective code

Rip out more from hadrians system.config.in

Configure CLink supports response files

Read deleted keys from host and target's target

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.

Fix [host|target]-[os|arch] vs [host|target]-haskell-[os|arch]

Handle unspecified vs specified flags and commands better

Configure Cpp and HsCpp separately

Fixes for compilation

Link is GNU linkerg

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.

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...

helper AC function for enable/disable

Delete unused imports of SysTools.Info

Drop PROG_CPP in distrib/autoconf too

Get rid of MonadCatch instances and dependencies

ghc-toolchain: Check Cc supports extra-via-c-flags

Consider empty programs as non-specified programs

Cpp and HsCpp cleanup

Add comment from check for gold t22266

Remove more settings bits from hadrian/cfg

Use llvm target from ghc-toolchain

Print default.target

Fix bugs in MergeTool and Ar

Add check and log errors on error

X

Revert LLVMTarget deletion in mkprojectmkin

Fix stack job

Fixes for ghc-toolchain to match configure output

ghc-toolchain: Fix ar supports at file

Fixes

ghc-toolchain: Fix check for gold bug

ghc-toolchain: configure linker options correctly

Support more targets and dont use llvmtarget

allow duplos in place of triples

- - - - -
a46933e1 by Rodrigo Mesquita at 2023-06-26T18:55:56+01:00
configure: Revert ripping out of toolchain selection logic

- - - - -
71b5a19f by Rodrigo Mesquita at 2023-06-26T18:55:56+01:00
Stop configuring into settings unused Ld command

- - - - -
9dce4c67 by Rodrigo Mesquita at 2023-06-26T18:55:56+01:00
configure: Create and validate toolchain target file

- - - - -
0f004240 by Rodrigo Mesquita at 2023-06-26T18:55:56+01:00
Don't pass options to ghc-toolchain, it should arrive at the same conclusion as configure for now

- - - - -
53067d14 by Rodrigo Mesquita at 2023-06-26T18:55:56+01:00
ghc-toolchain: set CC LD plat. dependent flags

A lot to be said about this approach, we might want to re-do this all
eventually...
Perhaps I ought to add a TODO at the top level of these functions?

We might also not do it altogether, some of these might be outdated?

- - - - -
838970c2 by Rodrigo Mesquita at 2023-06-26T18:55:56+01:00
ghc-toolchain: Create default.target in the bindist

- - - - -
bce00b92 by Rodrigo Mesquita at 2023-06-26T18:55:56+01:00
A TODO comment

- - - - -
cff8aa4d by Rodrigo Mesquita at 2023-06-26T18:55:56+01:00
Split GHC.Platform.ArchOS from ghc-boot into ghc-platform

- - - - -
e32a209a by Rodrigo Mesquita at 2023-06-26T18:55:56+01:00
Use ghc-platform instead of ghc-boot

del async dep

- - - - -
26b82e64 by Rodrigo Mesquita at 2023-06-26T18:55:56+01:00
Fixes

- - - - -


30 changed files:

- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Linker/Static.hs
- configure.ac
- + default.target.in
- 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/Packages.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
- hadrian/src/Rules/ToolArgs.hs
- hadrian/src/Settings/Builders/Cabal.hs
- hadrian/src/Settings/Builders/Cc.hs
- hadrian/src/Settings/Builders/DeriveConstants.hs
- hadrian/src/Settings/Builders/Ghc.hs
- hadrian/src/Settings/Builders/HsCpp.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4039a8d30c7c9e1ab41f9208c02e782486ec1dff...26b82e647ec5b2bc8ed5dec0d867cf7132024bfe

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4039a8d30c7c9e1ab41f9208c02e782486ec1dff...26b82e647ec5b2bc8ed5dec0d867cf7132024bfe
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/20230626/b2838137/attachment.html>


More information about the ghc-commits mailing list