Building GNAT for ARM

How to build an Ada compiler from the source.

Moderators: dhowells, RobertKleczek, Lucretia

Building GNAT for ARM

Postby dhowells » Mon Oct 13, 2014 9:45 pm

Please see: https://github.com/Lucretia/tamp for additional instructions.

As of 18 October 2014, this is still not working. Most likely an issue with paths/versions/? Problem is that I'm unable to build a fresh binutils/gcc and thus not able to progress to building the GNAT compiler for the ARM.

As of 16 October 2014, the instructions below work up until the point that gcc is expected to create an executable (paragraph 2.a) - which for some currently unknown reason it won't :-(. It's probably something to do with the version of ld being used.

0. First make sure you have git and subversion
Code: Select all
sudo apt-get install git
sudo apt-get install subversion
sudo apt-get install g++
sudo apt-get install m4


1. Clone Luke's git repository into a suitable directory
Code: Select all
cd ~
git clone https://github.com/Lucretia/tamp.git


2. Build a native GCC 4.6.1

First enter the `thirdparty' directory and copy config-master to config.inc.
Code: Select all
cd tamp
cd thirdparty
cp config-master.inc config.inc


Edit config.inc (if need be). You may wish to simply change then number of BITS the native machine uses from 64 to 32, or where the compiler will be installed to.
Code: Select all
vi config.inc


2.a Finally build the native GCC 4.6.1
Code: Select all
./build-tools.sh -t native


This might take some while!

3. Build a GCC 4.6.1 for the target device
When the native compiler has been built, begin building a compiler for the target machine:
Code: Select all
/build-tools.sh -t arm-none-eabi


To be concluded...
dhowells
Site Admin
 
Posts: 11
Joined: Tue Sep 02, 2014 1:04 am

Re: Building GNAT for ARM

Postby Lucretia » Tue Oct 14, 2014 3:56 pm

The config.inc has all the lib/tool version information and can be changed. Some archives are a pain, binutils, where they might have a different directory name from the archive name, it's happened.

Luke.
Lucretia
 
Posts: 2
Joined: Tue Oct 14, 2014 3:54 pm


Return to Tool Building

Who is online

Users browsing this forum: No registered users and 1 guest

cron