C: Difference between revisions
imported>Fricklerhandwerk specify documentation type |
imported>Mic92 No edit summary |
||
Line 267: | Line 267: | ||
} | } | ||
</syntaxHighlight> | </syntaxHighlight> | ||
<syntaxHighlight lang=console> | <syntaxHighlight lang=console> | ||
Line 272: | Line 273: | ||
gcc (GCC) 8.3.0 | gcc (GCC) 8.3.0 | ||
</syntaxHighlight> | </syntaxHighlight> | ||
Those stdenv instances can be also constructed using the <code>overrideCC</code> function: | |||
Here we are creating a shell environment that will always have the latest available gcc: | |||
<syntaxHighlight lang=nix> | |||
(overrideCC stdenv gcc_latest).mkDerivation { | |||
name = "env"; | |||
} | |||
</syntaxHighlight> | |||
Note that this will only affect compiler and not the used linker. To overwrite the linker and maybe also the used libc | |||
Check out the <code>wrapCCWith</code> example in the next section. | |||
See also: [[Using Clang instead of GCC]] | See also: [[Using Clang instead of GCC]] |