[arm-gnu] how to add new command line option for arm gcc

Mark Mitchell mark@codesourcery.com
Tue Dec 28 16:33:00 GMT 2004


aramvalartha.bharathi@wipro.com wrote:
> hi,
>    i like to add a new command line option for gcc. i asked this same 
> question two weeks later. the answer i got from you is file which 
> contains the <getopt.h> header will have the corresponding options. but 
> i checked in the gcc/config/arm directory ( i am developing a cross 
> compiler for arm). but not even a single file includes the header file. 
> which file is the correct place for me to add this option.

The primary topic for this list is using CodeSourcery's ARM compiler 
releases (and reporting problems with them), not modifying the compiler. 
  If you want to make a lot of modifications, you might want to visit 
http://gcc.gnu.org, and look at the mailing lists there.

But, we can certainly give a few hints.  First, the command-line 
processing for GCC is somewhat complicated.  The way that you add a 
processor-independent option is different from the way that you add a 
processor-dependent option.  To add a processor-dependent option, which 
is what it sounds like you are trying to do, you can look at 
gcc/config/arm/arm.h and modify TARGET_SWITCHES.  However, as you'll see 
when you look at that, you'll have to make changes elsewhere too. 
There's no step-by-step guide.

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304



More information about the Gcc mailing list