Libgloss tree and diference between "architecture" and "platform".

Jeff Johnston
Sat Jan 22 00:09:00 GMT 2005

Paul Chavent wrote:
> Jeff Johnston a écrit :
>> [...]
>> In this case I am talking about build configuration.  To add your bsp, 
>> you only have to modify and add your files to the 
>> directory.  It is very straightforward to modify by 
>> copying and modifying an existing bsp that is already built there.  
>> You can prefix all your added files to keep them distinguished from 
>> the rest of the files if that is your wish.  If you add a 
>> subdirectory, you have to do extra work so configuration of libgloss 
>> will know to build your library in the subdirectory.  This means you 
>> will have to edit the file libgloss/arm/ in addition to 
>> libgloss/arm/
>> -- Jeff J.
> And an other problem, sorry.
> For example
> If i compile for the host "arm-myboard-elf"
>   i would like that the makefile copy my myboard-crt0.s to crt0.S (so it 
> is the default one used by gcc).
> else
>   the make file can copy my myboard-crt0.s to myboard-crt0.S (that i can 
> use with a specs file for example...)
> I would like to use the same variables (${host} for example) that those 
> which are in newlib/ . Is it possible, and how it should 
> be done ?

It would be possible, but it would require some knowledge of configuration on 
your part.  Essentially, you would set variables based on the configuration and 
use those variables in the Makefile to determine which object file was used to 
install crt0.o in the install directory.  Similarly with the library that was 
going to be used by default by the compiler.  If you look at the top-level 
libgloss, you will see it sets configdirs based on the target.

Another avenue to accomplish the same goal is simply to have a .ld script that 
specifies both the library and crt0 to use and have gcc generate the appropriate 
-Txxx.ld command when compiling for your platform.  If that takes a while, your 
end-users simply specify -Txxx.ld on the compile/link.

-- Jeff J.

> Thank you.

More information about the Newlib mailing list