arm-trusted-firmware: tell Makefile how our C compilers are named#247922
arm-trusted-firmware: tell Makefile how our C compilers are named#247922sternenseemann merged 3 commits intoNixOS:masterfrom
Conversation
arm-trusted-firmware assumes that HOSTCC is `gcc` which is not necessarily the case.
Some of the firmware requires an arm-embedded toolchain to be in PATH. The Makefile offers a similar mechanism to CROSS_COMPILE for letting it know what naming scheme is used for the accompanying tools.
lopsided98
left a comment
There was a problem hiding this comment.
Cross-compiled all targets, and tested native and cross build of armTrustedFirmwareTools.
|
The |
|
In what way? I was concerned that it wouldn't be expanded correctly, but it seems to. On the other hand, I don't think any of the targets actually use it, and it gets overridden in |
As explained in the new comment, we trick the build system here to build its build tools for the host platform. To make this even more foolproof / reliable, stop adding CC_FOR_BUILD to the environment, so there can be no mix up.
|
@lopsided98 Thanks, you are right! Got confused by precisely that trick. I added an explanatory comment and removed |
ghost
left a comment
There was a problem hiding this comment.
LGTM but I'm currently unable to test this (beyond building it, which I did do).
Something in Binutils 2.39 or 2.40 broke arm-trusted-firmware's wake-from-sleep on RK3399. Nixpkgs aggressively deletes old binutils -- except for vendor toolchains, which I will probably be forced to switch to.
So I haven't been able to rebuild ATF for the last ~year 😡 . ATF is annoyingly fragile. I should probably just bite the bullet and accept that I have to use the vendor toolchains like normal people do. It's kinda sad that that is the only way to pin binutils on nixpkgs.
We could re-introduce a version in principle, although overriding the binutils version used to build something is a bit finnicky. |
I've always wondered why that is so difficult. Is there some fundamental reason why that is the case? Being able to |
|
I don't see a reason why it shouldn't be possible. It's just more finnicky since the bintools wrapper needs to be passed to the cc wrapper. |
Description of changes
We already did this for
stdenv.ccviaCROSS_COMPILE, but neglectedHOSTCC/CC_FOR_BUILDand thearm-embeddedtoolchain.Things done
sandbox = trueset 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/)