i960 egcs 970901 problem

meissner@cygnus.com meissner@cygnus.com
Wed Sep 3 20:40:00 GMT 1997


| 	* 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?

What Joel is doing is using the new -specs <file> option that I wrote to add
extra switches without modifing the base compiler.  In the embedded world, you
often times have lots of differeent boards that have differences that you
encapsulate in a library, etc.  You don't necessarily want to modify the
compiler to add new -m options (for instance the board may be unique to a
particular user site).

The -q<option> is currently being used because GCC doesn't use a switch
beginning with -q.  I eventually want to add a way that you could use the more
natural -m<option> and strip out certain options from being passed on the cc1.

The specs language is documented in the large comment in gcc.c.  At some point,
this should go in the regular documentation.

To give a more concrete example, if I had not added either -myellowknife or
-mads to the PowerPC, the same functionality could have been added for
-qyellowknife or -qads, by putting the following into a file and using
-specs <file> (note, due to the way specs are currently parsed, there must be
one blank line at the end of the file, also each of the lines must be one
physical line):

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

*cpp:
%(old_cpp) %{qads: -D__ADS__} %{qyellowknife: -D__YELLOWKNIFE__}

*lib:
%{!qyellowknife: %{!qads: %(old_lib)}} %{qads: --start-group -lads -lc --end-group} %{qyellowknife: --start-group -lyk -lc --end-group}

*endfile:
%{!qyellowknife: %{!qads: %(old_endfile)}} %{qads: ecrtn.o%s} %{qyellowknife: ecrtn.o%s}

*startfile:
%{!qyellowknife: %{!qads: %(old_startfile)}} %{qads: ecrti.o%s crt0.o%s} %{qyellowknife: ecrti.o%s crt0.o%s}

*link:
%{!qyellowknife: %{!qads: %(old_link)}} %{qads: -T ads.ld%s} %{qyellowknife: -T yellowknife.ld%s}

--
Michael Meissner, Cygnus Solutions (East Coast)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA
meissner@cygnus.com,	617-354-5416 (office),	617-354-7161 (fax)



More information about the Gcc mailing list