-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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: tighten platform flags special-case for aarch64-darwin #225328
Conversation
8810720
to
8d16f74
Compare
8d16f74
to
87c7651
Compare
87c7651
to
b3cbd02
Compare
Gentle ping. |
@trofi may I ask for a review? I know this is darwin, but you've had good insights into gcc guts on my other PRs. FWIW, this PR is the only missing piece for getting rid of |
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.
LGTM!
If you can resolve the conflict we can push it to |
b3cbd02
to
efe1cce
Compare
Done, thank you. |
@@ -3,10 +3,13 @@ | |||
let | |||
gcc = targetPlatform.gcc or {}; | |||
p = gcc | |||
isAarch64Darwin = targetPlatform.isDarwin && targetPlatform.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.
You probably need to move it out of the middle of p
expression (1 line above or below) as eval fails as:
error: syntax error, unexpected '=', expecting ';'
at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-4/pkgs/development/compilers/gcc/common/platform-flags.nix:6:19:
5| p = gcc
6| isAarch64Darwin = targetPlatform.isDarwin && targetPlatform.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.
Of course, thank you.
efe1cce
to
4fc79e2
Compare
The 4aa95e3 commit added support for aarch64-darwin but also ignored platform flags if the build platform is aarch64-darwin. This leads to confusing errors such as `pkgsCross.raspberryPi` packages compiled with soft-float even though the platform supports hard-float (and is built as such on other platforms). The correct way to ignore platform flags is to check `targetPlatform`, not the build platform. This change fixes that. While we're here, tigthen the special-case to cover only the problematic flags: `-with-cpu` and `-with-arch`.
4fc79e2
to
c10a195
Compare
Done. This time I tested with
not
🤦 |
Pulled as is. Thank you! |
The 4aa95e3 commit added support for
aarch64-darwin but also ignored platform flags if the build platform
is aarch64-darwin. This leads to confusing errors such as
pkgsCross.raspberryPi
packages compiled with soft-float even thoughthe platform supports hard-float (and is built as such on other
platforms).
The correct way to ignore platform flags is to check
targetPlatform
,not the build platform. This change fixes that.
While we're here, tigthen the special-case to cover only the problematic
flags:
-with-cpu
and-with-arch
.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)