-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcc: native aarch64-darwin support #115235
Conversation
f493b16
to
0628d3a
Compare
Updated the PR to use GCC 11 instead of GCC 10, which reduces the patch from 22.6MiB to 0.5MiB. I also dropped the thinning patch since @thefloweringash removed the need for it. This PR depends on #121759, which is why I cherry-picked the commit from there. |
for configureScript in $configureScripts; do | ||
patchShebangs $configureScript | ||
done | ||
'' | ||
# This should kill all the stdinc frameworks that gcc and friends like to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section moved from pre to post patch, otherwise the changes in here invalidate the patch base.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extracting this into a separate PR targeting staging: #121772.
@@ -432,14 +432,16 @@ stdenv.mkDerivation { | |||
# Always add -march based on cpu in triple. Sometimes there is a | |||
# discrepency (x86_64 vs. x86-64), so we provide an "arch" arg in | |||
# that case. | |||
+ optionalString ((targetPlatform ? gcc.arch) && | |||
# TODO: aarch64-darwin has mcpu incompatible with gcc | |||
+ optionalString ((targetPlatform ? gcc.arch) && (isClang || !(stdenv.isDarwin && stdenv.isAarch64)) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly is the problem here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#105026 sets CPU to something GCC doesn't know about:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
46fcd10
to
a680b4b
Compare
I'm confused why ofborg picks |
a680b4b
to
4aa95e3
Compare
Figured out why We can either:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't see why block this.
Motivation for this change
This is intended to work in top of #105026.
I just wanted to have a working
black
, which is a Python code formatter. It depends onaiohttp
for an http server in daemon mode, which in turn depends onnumpy
, which wantsblas
andlapack
, both of which depend ongfortran
. So here we are.Both
openblas
andlapack
require changes foraarch64-darwin
support, I'll open PRs for them after we agree on this one.I need help with every TODO, since I can't figure out the proper way to deal with them.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)