RE: How to add a new option to gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I followed the manual
Define a common option like that:

common-instr
Common Var(common_instr_flag) Init(0)
Outputing common instrumentation code

Then I use the flag if(common_instr_flag) in sparc.c to enable my code.

When I use gcc -common-instr=1, I just got 
unrecognized option '-common-instr=1'

Then I tried to modify c-opts.c , function c_common_handle_option
To handle the case OPT_common-instr.
And I tried
gcc -common-instr,

same error " unrecognized option '-common-instr "

What else should I do to use the option?

 




-----Original Message-----
From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
Behalf Of David Daney
Sent: Thursday, October 02, 2008 3:34 PM
To: ORC_developer
Cc: gcc-help@xxxxxxxxxxx
Subject: Re: How to add a new option to gcc

ORC_developer wrote:
> I wonder if there is any document about adding a new architecture-related
> option to gcc?
> I'm porting gcc to a new arch
>   
It is generally done by modifying the gcc/config/arch/arch.opt file.

http://gcc.gnu.org/onlinedocs/gccint/Options.html

David Daney



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux