Install $prefix and $prefix/$target Directory Clarifications

Joseph Myers
Fri Mar 9 17:29:00 GMT 2018

On Thu, 8 Mar 2018, Kyle Burge wrote:

> Why exactly does binutils and GCC install one set of tools in the $prefix
> directory and another in the $prefix/$target directory? I seem to need both
> sets of tools.

$prefix/$target/bin is for internal use by GCC.  You should not use any 
tools there manually and should not add that directory to PATH.  The user 
interface is the $prefix/bin/$target-* tools.

> I've been trying to install my target packages in the $prefix/$target, is
> this correct?

$prefix/$target/bin contains executables that run on the host, not the 
target.  It's not correct to install anything there that runs on the 
target.  $prefix/$target/lib (and variants such as lib64) are for 
libraries that run on the target.  If you need executables that run on the 
target, those should go somewhere else (possibly a sysroot).

Joseph S. Myers

More information about the Binutils mailing list