Repository navigation
gcc: clean up Darwin patches - #519065
gcc: clean up Darwin patches#519065emilazy wants to merge 6 commits into
Conversation
|
Sigh, sorry about the rebase mishap… |
Review dismissed automatically
|
Just a note, @zinzilulo managed to fix gcc13 compilation on darwin with the darwin gnat fixes we were working on in #522847, if that helps. |
| # GitHub's "compare" API produces unstable diffs, so we resort to reusing | ||
| # diffs from the Homebrew repo. | ||
| ++ optionals canApplyIainsDarwinPatches ( | ||
| ++ optionals stdenv.targetPlatform.isDarwin ( |
There was a problem hiding this comment.
Is there a reason this is stdenv.targetPlatform and not stdenv.hostPlatform, like applying the other patches are above?
There was a problem hiding this comment.
The patches are relevant for cross‐compiling to Darwin (and shouldn’t be relevant for cross‐compiling to other platforms from Darwin, I think).
| ''; | ||
|
|
||
| platforms = platforms.unix; | ||
| badPlatforms = lib.optionals (lib.versions.major version == "13") platforms.darwin; |
There was a problem hiding this comment.
This should no longer be required, now that #522847 is in staging.
There was a problem hiding this comment.
Dropped. I haven’t tested the GNAT build, though.
|
Currently this doesn't build on --- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -236,7 +236,7 @@ ;;
esac
tmake_file="$tmake_file t-slibgcc-darwin"
case ${host} in
- *-*-darwin2*)
+ *-*-darwin2* | *-*-darwin)
tmake_file="t-darwin-min-11 $tmake_file"
;;
*-*-darwin1[89]*)Edit: With this patch applied, gnat15 builds as expected, and builds projects as expected, specifically |
I’m pretty sure these should no longer be required after the toolchain update and SDK rework.
The upstream issue was fixed, the branch has changes relevant to `x86_64-darwin` too, and you don’t really want to target Darwin without these patches. We reorder the deployment target patch after the patches, as they touch the same file, and apply it on AArch64 for all versions (but for Darwin targets rather than hosts, which should be the relevant case anyway).
|
Thank you for your work! |
|
I thought these changes were all included in PR #531338 but by glancing at these two commit lists it seems like some might've been left behind. Either way, this PR needs to get updated past the other PR (or closed). |
Should be fine to be closed. I just rewrote the commits here a little in #531338, but they should apply to almost the same thing. |
|
OK, reopen if you disagree, |
I checked that this builds in like 2025, but not after rebasing. Will need testing before merging.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.