[home] :: Building a Cross-Compiler (GCC for example) :: [building-a-cross-compiler-gcc-for-example-1]
0 products in your
4. Download glibc (or alternate libc) and build it with the bootstrap compiler GCC, the build of the library works best when you configure and make outside the source tree:
$ tar xzf glibc- --target=$TARGET --prefix=$INSTALLAT --enableadd-ons --disable-sanity-checks
$ CC=$INSTALLAT/bin/$TARGET-gcc make
$ CC=$INSTALLAT/bin/$TARGET-gcc make install
5. Build the final GCC.
Till now the cross-compiler has been built and located at $INSTALLAT/bin.
For those who need a specially configured GCC, a recommended strategy is to use the Crosstool or buildroot to download and patch the source files and then interrupt the process.
$ tar xzf glibc- --target=$TARGET --prefix=$INSTALLAT --enableadd-ons --disable-sanity-checks
$ CC=$INSTALLAT/bin/$TARGET-gcc make
$ CC=$INSTALLAT/bin/$TARGET-gcc make install
5. Build the final GCC.
$ cd ~/$TARGET-gcc
$../gcc-/configure --target=$TARGET --prefix=$INSTALLAT
--with-headers=$INSTALLAT/include --enable-languages="c"
$ make all ; make install
Till now the cross-compiler has been built and located at $INSTALLAT/bin.
For those who need a specially configured GCC, a recommended strategy is to use the Crosstool or buildroot to download and patch the source files and then interrupt the process.