mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
13 lines
400 B
Nix
13 lines
400 B
Nix
|
{ lib, targetPlatform }:
|
||
|
|
||
|
let
|
||
|
p = targetPlatform.platform.gcc or {};
|
||
|
in lib.concatLists [
|
||
|
(lib.optional (p ? arch) "--with-arch=${p.arch}")
|
||
|
(lib.optional (p ? cpu) "--with-cpu=${p.cpu}")
|
||
|
(lib.optional (p ? abi) "--with-abi=${p.abi}")
|
||
|
(lib.optional (p ? fpu) "--with-fpu=${p.fpu}")
|
||
|
(lib.optional (p ? float) "--with-float=${p.float}")
|
||
|
(lib.optional (p ? mode) "--with-mode=${p.mode}")
|
||
|
]
|