Cross Compiling: Difference between revisions

imported>AleXoundOS
m fix typo: Stack linking -> Static linking
imported>AleXoundOS
m fix some punctuation
Line 110: Line 110:


* If it is used at build-time it's <code>depsBuildXXX</code>
* If it is used at build-time it's <code>depsBuildXXX</code>
** compiler producing native binaries go to <code>depsBuildBuild</code>
** compiler producing native binaries go to <code>depsBuildBuild</code>;
** compiler producing cross binaries, all setup hooks and programs executed by the builder go to <code>depsBuildHost</code>
** compiler producing cross binaries, all setup hooks and programs executed by the builder go to <code>depsBuildHost</code>:
*** common examples: <code>pkg-config, autoreconfHook, makeWrapper, intltool, bison, flex</code>
*** common examples: <code>pkg-config, autoreconfHook, makeWrapper, intltool, bison, flex</code>.
* If it is used at run-time it's <code>depsHostXXX</code>. [Static linking doesn't effect this, even if it allows us to forget where things came from.]
* If it is used at run-time it's <code>depsHostXXX</code>. [Static linking doesn't effect this, even if it allows us to forget where things came from.]
** if it’s an interpreter that will be needed by an installed script, it should go in <code>depsHostTarget</code>.  
** if it’s an interpreter that will be needed by an installed script, it should go in <code>depsHostTarget</code>.  
** otherwise it is probably only needed at build time and can go in <code>depsBuildHost</code>
** otherwise it is probably only needed at build time and can go in <code>depsBuildHost</code>
* If it is a tool and "acts" (e.g. helps build) on build-time stuff, then it's <code>depsXXXBuild</code>
* If it is a tool and "acts" (e.g. helps build) on build-time stuff, then it's <code>depsXXXBuild</code>.
* If it is a tool and "acts" on run-time stuff, then it's <code>depsXXXHost</code>
* If it is a tool and "acts" on run-time stuff, then it's <code>depsXXXHost</code>.
* if it is not a tool, it's <code>depsXXX(XXX+1)</code>(build + 1 == host, host +1 == target) for backwards compatibility, use <code>nativeBuildInputs</code> instead of <code>depsBuildHost</code> and <code>buildInputs</code> instead of <code>depsHostTarget</code>.
* If it is not a tool, it's <code>depsXXX(XXX+1)</code>(build + 1 == host, host +1 == target). For backwards compatibility use <code>nativeBuildInputs</code> instead of <code>depsBuildHost</code> and <code>buildInputs</code> instead of <code>depsHostTarget</code>.


Source: https://github.com/NixOS/nixpkgs/pull/50881#issuecomment-440772499
Source: https://github.com/NixOS/nixpkgs/pull/50881#issuecomment-440772499