mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
lib.systems.elaborate.canExecute: handle different gcc.arch
This commit is contained in:
parent
330fdc9943
commit
1802f697e4
1 changed files with 15 additions and 1 deletions
|
@ -97,7 +97,21 @@ let
|
||||||
platform:
|
platform:
|
||||||
final.isAndroid == platform.isAndroid
|
final.isAndroid == platform.isAndroid
|
||||||
&& parse.isCompatible final.parsed.cpu platform.parsed.cpu
|
&& parse.isCompatible final.parsed.cpu platform.parsed.cpu
|
||||||
&& final.parsed.kernel == platform.parsed.kernel;
|
&& final.parsed.kernel == platform.parsed.kernel
|
||||||
|
&& (
|
||||||
|
# Only perform this check when cpus have the same type;
|
||||||
|
# assume compatible cpu have all the instructions included
|
||||||
|
final.parsed.cpu == platform.parsed.cpu
|
||||||
|
->
|
||||||
|
# if both have gcc.arch defined, check whether final can execute the given platform
|
||||||
|
(
|
||||||
|
(final ? gcc.arch && platform ? gcc.arch)
|
||||||
|
-> architectures.canExecute final.gcc.arch platform.gcc.arch
|
||||||
|
)
|
||||||
|
# if platform has gcc.arch defined but final doesn't, don't assume it can be executed
|
||||||
|
|| (platform ? gcc.arch -> !(final ? gcc.arch))
|
||||||
|
);
|
||||||
|
|
||||||
isCompatible =
|
isCompatible =
|
||||||
_:
|
_:
|
||||||
throw "2022-05-23: isCompatible has been removed in favor of canExecute, refer to the 22.11 changelog for details";
|
throw "2022-05-23: isCompatible has been removed in favor of canExecute, refer to the 22.11 changelog for details";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue