i960 egcs 970901 problem

Joel Sherrill joel@OARcorp.com
Thu Sep 4 06:08:00 GMT 1997


On Wed, 3 Sep 1997, Stephen Williams wrote:

> 	* i960/i960.h: Added default for SUBTARGET_SWITCHES macro.
> 
> I've seen you mention the subtarget switches and -qNAME several times
> now, but I don't know what they are. They look like something I want to
> know about. Are these things described anywhere?

AFAIK there is no formal user documentation on them right now.  I have
picked the brains of Michael Meissner and Rob Savoye to get my specs
extensions working.  I felt guilty everytime I emailed them for help but I
did and still do appreciate it.

The idea is that you can have a user defined extensions to the specs file. 
RTEMS uses this to allow per-board information to be passed to each
invocation of gcc without requiring this information to be merged into gcc
distributions.  As there are lots of boards (RTEMS has suport for > 20),
many embedded baords are proprietary, and merging this into gcc is too
complex for what you really want to do, the specs file way is nice.  

For RTEMS, we invoke gcc with this set of arguments:

   -B<BOARD_SPECIFIC_DIRECTORY> -specs bsp_specs -qrtems

Then each board support package (BSP) provides a bsp_specs file like this
one:

%rename cpp old_cpp
%rename lib old_lib
%rename endfile old_endfile
%rename startfile old_startfile
%rename link old_link

*cpp:
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)

*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group -lc -lrtemsall -lgcc
--end-group}

*startfile: 
%{!qrtems: %(old_startfile)} %{qrtems: start.o%s}

*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -T linkcmds%s -e start}


There must be a blank line at the end of the bsp_specs file.  Also each
rule line must be on a single line.  Violating either gives some ugly
errors.  

The above one is not all that interesting but you can see the idea.  

The example Michael Meissner sent me provided for multiple "BOARD" options
in a single specs extensions file.

The -specs option was added past gcc 2.7.2.x.

This is cursory but might be a useful start for something in the manual.
Figuring this out from the description of each specs was too tough for me.

--joel




More information about the Gcc mailing list