From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15169 invoked by alias); 15 Nov 2007 17:40:57 -0000 Received: (qmail 15120 invoked by uid 48); 15 Nov 2007 17:40:47 -0000 Date: Thu, 15 Nov 2007 17:40:00 -0000 Message-ID: <20071115174047.15119.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug other/19180] How to Add New GCC option In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "manu at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-11/txt/msg01418.txt.bz2 ------- Comment #4 from manu at gcc dot gnu dot org 2007-11-15 17:40 ------- >>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." -- manu at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19180