mobile version

How to build a GCC cross compiler?

Building a GCC cross compiler from scratch is a very tedious task. The process consists of a quite high number of undocumented steps, and mostly relies on the users' experience. Fortunately a community sharing its experience, the crossgcc mailing list, actively supports a tool, crosstool-NG, that considerably simplifies the process of building a GCC cross compiler.

1. Get crosstool-NG

Download the crosstool-NG archive (e.g crosstool-ng-1.13.2.tar.bz2) from this page.

2. Uncompress crosstool-NG archive

$ tar jxvf crosstool-ng-1.13.2.tar.bz2

3. Configure crosstool-NG

$ cd crosstool-ng-1.13.2
$ ./configure --local

4. Compile crosstool-NG

$ make

5. Customize your own gcc cross compiler build

$ ./ct-ng menuconfig
The crosstool-NG user interface enables customizing the cross-tool chain to build. It means that you can choose and configure:
  • the C/C++ compiler,
  • the C Library (either glibc, eglibc, newlib),
  • the target processor (e.g. PowerPC or ARM),
  • the operating system (e.g. Linux),
  • the debug facilities (e.g. a debugger),
  • etc.
On exit, at the question "Do you wish to save your new crosstool-NG configuration?", answer "Yes". This will create a file named ".config" within the crosstool-NG directory.

6. Build your custom gcc cross compiler

$ ./ct-ng build

What's new ?

The web site has been migrated to a new server. Please note that contact mails have changed too. More to come…stay tuned!

Virtual Platforms

Highlights

Acknowledgments

Digiteo
We would like to thank Digiteo that supported us in making the UNISIM virtual platforms available to the community.

Exhibition

HiPEAC
We presented a poster at the poster sessions of the HiPEAC'12 conference, January 23-25, 2012, Paris, France. The HiPEAC conference provides a forum for experts in computer architecture, programming models, compilers, and operating systems for embedded and general-purpose systems. The conference aims at the dissemination of advanced scientific knowledge and the promotion of international contacts among scientists from academia and industry.

On-going evaluation

OPEES
A UNISIM virtual platform of a Xilinx Virtex-5 FXT is being evaluated by project partners in the context of OPEES (Open Platform for the Engineering of Embedded Systems), a European project that aims to ensure long-term availability of critical / embedded systems engineering technologies to secure industry competitiveness and development.