Skip to content

feature/cross-compile#8

Draft
andreabedini wants to merge 67 commits intomasterfrom
stable-haskell/feature/cross-compile
Draft

feature/cross-compile#8
andreabedini wants to merge 67 commits intomasterfrom
stable-haskell/feature/cross-compile

Conversation

@andreabedini
Copy link
Copy Markdown
Member

Marked as draft to avoid merging.

@andreabedini andreabedini force-pushed the stable-haskell/feature/cross-compile branch 2 times, most recently from 985b8b7 to 9abf046 Compare July 14, 2025 09:23
@andreabedini andreabedini force-pushed the stable-haskell/feature/cross-compile branch from 9abf046 to eeff3cd Compare July 22, 2025 06:54
@andreabedini andreabedini force-pushed the stable-haskell/feature/cross-compile branch from eeff3cd to 6f865c6 Compare August 7, 2025 08:33
@andreabedini andreabedini force-pushed the stable-haskell/feature/cross-compile branch from 4df0c3d to d81e915 Compare August 15, 2025 04:13
@andreabedini andreabedini force-pushed the stable-haskell/feature/cross-compile branch from d81e915 to 7d3b026 Compare August 21, 2025 04:28
- Remove QualifiyOptions

Remove QualifyOptions by setting qoSetupIndependent to be always true (the
current default) and qoBaseShim false (this must have been just a hack of some
sort).
@andreabedini andreabedini force-pushed the stable-haskell/feature/cross-compile branch from 7d3b026 to ab0a509 Compare August 22, 2025 02:54
…ry, pkgsUseProfilingLibrary, pkgsUseProfilingLibraryShared

We do not want to check the compiler.
…antiatedWith from ElaboratedConfiguredPackage to ElaboratedComponent

Instantiation only makes sense for components.
…g jsem

This is a user problem. User should not enable jsem on a compiler that does not support it.

This change also avoid us to pass the compiler all the way down.

A better approach to restore this functionality would be to defer the application of the parallel strategy.
andreabedini and others added 29 commits April 1, 2026 20:07
Isolate the common logic between building and only downloading.

_Push the ifs up and the loops down_
Determine packages to build in-place by their solver id, not their package id.
Cabal uses a peculiar c program to check if LD supports and should
use -x. To do this, it shells out to GHC to compiler the C file.
This however requires that GHC will not bail out, yet cabal does
not pass --package-db flags to this GHC invocation, and as such we
can run into situations where GHC bails out, especially during GHC
bootstrap phases where not all boot packages are available.

We however do not need GHC to compiler a c program, and can rely
on the C compiler.

Fundamentally cabal does not allow modelling program dependencies
in the program db, as such we must configure gcc first before using
it.

We make a small change to lib:Cabal (specifically the GHC module,
and it's Internal companion) to allow it to configure gcc first,
before trying to configure ld, and thus having gcc in scope while
configuring ld. This removes the need for the awkward ghc
invocation to compiler the test program.
Split the function into multiple ones.
If a node has dangling edges, then the list of missing neighbours cannot be empty.
Exceptions are not nice but this is an obvious invariant. Graph should provide a better API to make this unnecessary.
Not really a fix. I do not know why this happens.
It is duplicate information since we write the program invocation right after.
  • Import exeExtension from Distribution.Simple.BuildPaths to determine
  correct executable naming by platform
  • Extract platform information from toolchain configuration during build
  orchestration
  • Apply platform-specific file extension (e.g., .exe on Windows) when
  constructing executable paths in build output
  • Refactor variable naming for clarity (exe → exeName) to distinguish
  filename base from full executable path
  • Normalize import formatting for consistency
This is a partial revert of f47840d

GHC toggles -dyanmic-too for TH and now we're missing shared
interface files.
This reduces linux binary flavors to two:

- glibc (dynamic)
- musl (fully static)

'gmp' and 'zlib' are always statically linked.
@andreabedini andreabedini force-pushed the stable-haskell/feature/cross-compile branch from 8e9a1e3 to fdbfbbe Compare May 4, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants