The Build Process: of (GNU Tools For ARM Embedded Processors) 2013-12
The Build Process: of (GNU Tools For ARM Embedded Processors) 2013-12
The Build Process: of (GNU Tools For ARM Embedded Processors) 2013-12
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Preface
This manual provides a step-by-step guide to help you build ‘GNU Tools
for ARM Embedded Processors’ on a newly installed Ubuntu 8.10 operating
system. But some of the steps can be ignored,
• If you don’t want to build the package running on windows, please ignore
Section 1.2.4 [Install MinGW and InstallJammer], page 4.
• It is possible to have the package built successfully if you skip Section 1.4
[Build new native gcc], page 7, but we suggest you not skip the step.
Note that the steps below may most likely also work on an Ubuntu which is
not newly installed or version other than 8.10, but it is not guaranteed. In
this case please go through hundefinedi [Known Issues], page hundefinedi be-
fore you go, and you need to solve any other problems you may encounter by
yourself. We highly appreciate if you could share the problems and solutions
with us.
Chapter 1: Build GNU Tools on Ubuntu 8.10 2
* mingw32_4.2.1.dfsg.orig.tar.gz
https://answers.launchpad.net/ubuntu/+archive/primary
/+files/mingw32_4.2.1.dfsg.orig.tar.gz
* mingw32_4.2.1.dfsg-2ubuntu1.dsc
https://answers.launchpad.net/ubuntu/+archive/primary
/+files/mingw32_4.2.1.dfsg-2ubuntu1.dsc
Save these files in ‘~/tools/mingw32/’ directory. Download the mingw32-
binutils source and patch from following links:
* mingw32-binutils_2.20-0.1.diff.gz
https://launchpad.net/ubuntu/+archive/primary/+files
/mingw32-binutils_2.20-0.1.diff.gz
* mingw32-binutils_2.20-0.1.dsc
https://launchpad.net/ubuntu/+archive/primary/+files
/mingw32-binutils_2.20-0.1.dsc
* mingw32-binutils_2.20.orig.tar.gz
https://launchpad.net/ubuntu/+archive/primary/+files
/mingw32-binutils_2.20.orig.tar.gz
Save these files in ‘~/tools/mingw32-binutils/’ directory. Download the
mingw32-runtime source and patch from following links:
* mingw32-runtime_3.15.2-0ubuntu1.diff.gz
https://launchpad.net/ubuntu/+archive/primary/+files
/mingw32-runtime_3.15.2-0ubuntu1.diff.gz
* mingw32-runtime_3.15.2-0ubuntu1.dsc
https://launchpad.net/ubuntu/+archive/primary/+files
/mingw32-runtime_3.15.2-0ubuntu1.dsc
* mingw32-runtime_3.15.2.orig.tar.gz
https://launchpad.net/ubuntu/+archive/primary/+files
/mingw32-runtime_3.15.2.orig.tar.gz
Save these files in ‘~/tools/mingw32-runtime/’ directory.
Note: In this step, the ‘*.diff.gz’ files are compressed patch files.
But if you download these packages using internet explorer (such
as IE, FireFox, etc.), it might automatically help you unzip these
files. Please check the downloaded files using following commands:
#Here using mingw32_4.2.1.dfsg-2ubuntu1.diff.gz as an example,
#the same story stands for all *.diff.gz files
$ cd ~/tools/mingw32/
$ file mingw32_4.2.1.dfsg-2ubuntu1.diff.gz
mingw32_4.2.1.dfsg-2ubuntu1.diff.gz: ASCII English text
It says that ‘mingw32_4.2.1.dfsg-2ubuntu1.diff.gz’ is an
ASCII text file, though file name has ‘gz’ suffix. In this case, you
could choose either following methods:
Chapter 1: Build GNU Tools on Ubuntu 8.10 6
$ cd ~/tools/native-gcc/src
$ mkdir -p ~/tools/native-gcc/obj/gcc && mkdir ~/tools/native-gcc/target
$ tar -xjf gcc-4.3.6.tar.bz2
$ cd ../obj/gcc
$ ../../src/gcc-4.3.6/configure \
--build=i686-linux-gnu \
--host=i686-linux-gnu \
--target=i686-linux-gnu \
--enable-languages=c,c++ \
--enable-shared \
--enable-threads=posix \
--disable-decimal-float \
--disable-libffi \
--disable-libgomp \
--disable-libmudflap \
--disable-libssp \
--disable-libstdcxx-pch \
--disable-multilib \
--disable-nls \
--with-gnu-as \
--with-gnu-ld \
--enable-libstdcxx-debug \
--enable-targets=all \
--enable-checking=release \
--prefix=/home/build/tools/native-gcc/target \
--with-host-libstdcxx="-static-libgcc -L /usr/lib/gcc/i486-linuxgnu/4.3.2/ -
lstdc++ -lsupc++ -lm"
$ make
$ make install
After this, add path ‘/home/build/tools/native-gcc/target/bin’ into
your PATH environment, make sure to use the new gcc/g++ to compile our
arm toolchain. You can do this by appending following line at the end of
‘~/.bashrc’ file:
export PATH=/home/build/tools/native-gcc/target/bin:$PATH
Then re-start or re-login the system.
Chapter 1: Build GNU Tools on Ubuntu 8.10 9