This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [arm-gnu] how to add new command line option for arm gcc
- From: Mark Mitchell <mark at codesourcery dot com>
- To: aramvalartha dot bharathi at wipro dot com
- Cc: gcc at gcc dot gnu dot org, arm-gnu at codesourcery dot com
- Date: Tue, 28 Dec 2004 08:30:51 -0800
- Subject: Re: [arm-gnu] how to add new command line option for arm gcc
- Organization: CodeSourcery, LLC
- References: <E510FB445DDFFB4F9F580344A6E521A63BB0C9@chn-snr-msg02.wipro.com>
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