default). This is where the cross-compilation toolchain will be
installed. If you want to use the same cross-compilation toolchain for
other purposes, such as compiling third-party applications, you can add
- <code>build_ARCH/staging_dir/bin</code> to your PATH, and then use
+ <code>build_ARCH/staging_dir/usr/bin</code> to your PATH, and then use
<code>arch-linux-gcc</code> to compile your application. In order to
setup this staging directory, it first removes it, and then it creates
various subdirectories and symlinks inside it.</li>
<p>The toolchain generated by Buildroot by default is located in
<code>build_ARCH/staging_dir/</code>. The simplest way to use it
- is to add <code>build_ARCH/staging_dir/bin/</code> to your PATH
+ is to add <code>build_ARCH/staging_dir/usr/bin/</code> to your PATH
environnement variable, and then to use
<code>arch-linux-gcc</code>, <code>arch-linux-objdump</code>,
<code>arch-linux-ld</code>, etc.</p>
<code>~/buildroot/</code>) :</p>
<pre>
-export PATH="$PATH:~/buildroot/build_mips/staging_dir/bin/"
+export PATH="$PATH:~/buildroot/build_mips/staging_dir/usr/bin/"
</pre>
<p>Then you can simply do :</p>
mips-linux-gcc -o foo foo.c
</pre>
- <p><b>Important</b> : do not try to move the toolchain to an other
+ <p><b>Important</b> : do not try to move a gcc-3.x toolchain to an other
directory, it won't work. There are some hard-coded paths in the
<i>gcc</i> configuration. If the default toolchain directory
doesn't suit your needs, please refer to the <a
href="#toolchain_standalone">Using the uClibc toolchain outside of
buildroot</a> section.</p>
+ <p>If you are using a current gcc-4.x, then use --sysroot and -isysroot
+ since these toolchains have fully functional sysroot support. No
+ hardcoded paths do exist in these configurations.</p>
<h2><a name="toolchain_standalone" id="toolchain_standalone"></a>Using the
uClibc toolchain outside of buildroot</h2>
<code>build_ARCH/staging_dir/</code>. But sometimes, it may be useful to
install it somewhere else, so that it can be used to compile other programs
or by other users. Moving the <code>build_ARCH/staging_dir/</code>
- directory elsewhere is <b>not possible</b>, because they are some hardcoded
- paths in the toolchain configuration.</p>
+ directory elsewhere is <b>not possible if using gcc-3.x</b>, because they are some hardcoded
+ paths in the toolchain configuration. This works, thanks to sysroot support, with current,
+ stable gcc-4.x toolchains, of course.</p>
- <p>If you want to use the generated toolchain for other purposes,
+ <p>If you want to use the generated gcc-3.x toolchain for other purposes,
you can configure Buildroot to generate it elsewhere using the
option of the configuration tool : <code>Build options ->
Toolchain and header file location</code>, which defaults to