Bug 19180 - Improve documentation on How to Add New GCC option
Summary: Improve documentation on How to Add New GCC option
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.0.0
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: documentation
: 26168 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-28 18:41 UTC by Devang Patel
Modified: 2019-09-08 16:47 UTC (History)
6 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-02-20 18:39:47


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Devang Patel 2004-12-28 18:41:16 UTC
This is an enhancement request to document step-by-step "How to Add New GCC options" guide.
Another request : Need "Documentation" component in Bugzilla.

Reference : http://gcc.gnu.org/ml/gcc/2004-12/msg01147.html
Comment 1 Andrew Pinski 2004-12-28 18:44:24 UTC
Confirmed, adding a target independent option is easy but adding a target dependent is where the 
problem comes in.
Comment 2 Steven Bosscher 2005-03-13 17:45:00 UTC
http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01297.html would help. 
 
Comment 3 Jim Wilson 2005-04-04 21:38:12 UTC
See also a thread on the gcc list
    http://gcc.gnu.org/ml/gcc/2005-03/msg00234.html
Comment 4 Manuel López-Ibáñez 2007-11-15 17:40:46 UTC
From bug 26168:

"gcc/gcc.c has a comment at the top that's a guide to adding a command line
option.  It's incomplete: it should say to add the new option to c.opt and
rebuild the compiler, and then describe how the variable OPT_whatever gets
created by the awk scripts during the build process, so you can then check for
the option elsewhere in the compiler.  That mechanism doesn't appear documented
at all, and took me a while to figure out through code tracing.  Some
description in the comment would have been a big help.

Also, the comment at the top of the automatically-generated options.c file says
it's generated by "opts.sh" rather than by those awk scripts.  That's a minor
thing but updating it wouldn't hurt."

Comment 5 Manuel López-Ibáñez 2007-11-15 17:41:02 UTC
*** Bug 26168 has been marked as a duplicate of this bug. ***
Comment 6 Eric Gallager 2018-09-08 02:55:31 UTC
(In reply to Manuel López-Ibáñez from comment #4)
> From bug 26168:
> 
> Also, the comment at the top of the automatically-generated options.c file
> says it's generated by "opts.sh" rather than by those awk scripts.

This part is fixed at least.
Comment 7 Andrew Pinski 2019-09-08 04:29:13 UTC
Things have improved so much since this bug report was written and when I confirmed it.  Devang left Apple back in 2012.
Comment 8 Eric Gallager 2019-09-08 16:47:35 UTC
(In reply to Andrew Pinski from comment #7)
> Things have improved so much since this bug report was written and when I
> confirmed it.  Devang left Apple back in 2012.

OK I guess it can be closed as FIXED then.