[Revised] Fix PR 36502/plugins

Submitted by Jack Howarth on Sept. 26, 2010, 3:11 p.m.

Details

Message ID 20100926151105.GA16345@bromo.med.uc.edu
State New
Headers show

Commit Message

Jack Howarth Sept. 26, 2010, 3:11 p.m.
The following patch restores plugin support for darwin which
was broken by the changes replacing translate_options with the
.opt option alias facility and handling variants in r164531.
Bootstrap and regression tested on x86_64-apple-darwin10. Okay
for gcc trunk?
            Jack
ps Corrected PR number and changed component from plugins
to target.

2010-09-26  Joseph Myers  <joseph@codesourcery.com>
	    Jack Howarth <howarth@bromo.med.uc.edu>

	PR 45787/target

	* gcc/config/darwin.opt: Add "undefined Driver Separate"

Comments

Steven Bosscher Sept. 26, 2010, 3:27 p.m.
>        PR 45787/target

Nit: PR target/45787

i.e. component comes first.

Ciao!
Steven
Mike Stump Sept. 26, 2010, 6:54 p.m.
On Sep 26, 2010, at 8:11 AM, Jack Howarth wrote:
>   The following patch restores plugin support for darwin which
> was broken by the changes replacing translate_options with the
> .opt option alias facility and handling variants in r164531.
> Bootstrap and regression tested on x86_64-apple-darwin10. Okay
> for gcc trunk?

Barring someone wanting to fix it some other way (a generic, non-darwin type patch), Ok.

> 2010-09-26  Joseph Myers  <joseph@codesourcery.com>
> 	    Jack Howarth <howarth@bromo.med.uc.edu>
> 
> 	PR 45787/target
> 
> 	* gcc/config/darwin.opt: Add "undefined Driver Separate"
Joseph S. Myers Sept. 29, 2010, 2:31 p.m.
On Sun, 26 Sep 2010, Mike Stump wrote:

> On Sep 26, 2010, at 8:11 AM, Jack Howarth wrote:
> >   The following patch restores plugin support for darwin which
> > was broken by the changes replacing translate_options with the
> > .opt option alias facility and handling variants in r164531.
> > Bootstrap and regression tested on x86_64-apple-darwin10. Okay
> > for gcc trunk?
> 
> Barring someone wanting to fix it some other way (a generic, non-darwin 
> type patch), Ok.

I don't really see what could make sense here as a generic patch.  A 
principle of my option-handling patches is that in the end all options the 
compiler knows about should be described in .opt files - SWITCH_TAKES_ARG 
and WORD_SWITCH_TAKES_ARG (presently used to work out whether an unknown 
option, that might be handled by specs, takes arguments, and to process 
options generated by specs modifying the driver's own command line) should 
go away (as should the possibility of defining an option that doesn't take 
arguments solely in specs).  So adding any option not presently included 
in the .opt files to those files is a move in the correct direction.

> > 2010-09-26  Joseph Myers  <joseph@codesourcery.com>
> > 	    Jack Howarth <howarth@bromo.med.uc.edu>
> > 
> > 	PR 45787/target
> > 
> > 	* gcc/config/darwin.opt: Add "undefined Driver Separate"
>
Jack Howarth Sept. 29, 2010, 4:15 p.m.
On Wed, Sep 29, 2010 at 02:31:04PM +0000, Joseph S. Myers wrote:
> On Sun, 26 Sep 2010, Mike Stump wrote:
> 
> > On Sep 26, 2010, at 8:11 AM, Jack Howarth wrote:
> > >   The following patch restores plugin support for darwin which
> > > was broken by the changes replacing translate_options with the
> > > .opt option alias facility and handling variants in r164531.
> > > Bootstrap and regression tested on x86_64-apple-darwin10. Okay
> > > for gcc trunk?
> > 
> > Barring someone wanting to fix it some other way (a generic, non-darwin 
> > type patch), Ok.
> 
> I don't really see what could make sense here as a generic patch.  A 
> principle of my option-handling patches is that in the end all options the 
> compiler knows about should be described in .opt files - SWITCH_TAKES_ARG 
> and WORD_SWITCH_TAKES_ARG (presently used to work out whether an unknown 
> option, that might be handled by specs, takes arguments, and to process 
> options generated by specs modifying the driver's own command line) should 
> go away (as should the possibility of defining an option that doesn't take 
> arguments solely in specs).  So adding any option not presently included 
> in the .opt files to those files is a move in the correct direction.
> 

Joseph,
   In that case, could you go ahead and commit the revised patch...

http://gcc.gnu.org/ml/gcc-patches/2010-09/msg02054.html

My concern is that darwin be able to build plugin support for gcc 4.6
so that the dragonegg developers can continue to work on the darwin target.
            Jack

> > > 2010-09-26  Joseph Myers  <joseph@codesourcery.com>
> > > 	    Jack Howarth <howarth@bromo.med.uc.edu>
> > > 
> > > 	PR 45787/target
> > > 
> > > 	* gcc/config/darwin.opt: Add "undefined Driver Separate"
> > 
> 
> -- 
> Joseph S. Myers
> joseph@codesourcery.com
Mike Stump Sept. 29, 2010, 4:56 p.m.
On Sep 29, 2010, at 7:31 AM, Joseph S. Myers wrote:
> I don't really see what could make sense here as a generic patch.


Oh, sorry, I had -undef on the brain...  -undef isn't darwin specific.  This patch is fine as -undefined is a darwin linker flag.
Mike Stump Sept. 29, 2010, 5:04 p.m.
On Sep 26, 2010, at 8:11 AM, Jack Howarth wrote:
> +
> +undefined
> +Driver Separate

Oh, one last question, should there be a third line for documentation here?
Joseph S. Myers Sept. 29, 2010, 5:10 p.m.
On Wed, 29 Sep 2010, Mike Stump wrote:

> On Sep 26, 2010, at 8:11 AM, Jack Howarth wrote:
> > +
> > +undefined
> > +Driver Separate
> 
> Oh, one last question, should there be a third line for documentation here?

I haven't converted the driver's --help handling to be based on .opt files 
so documentation for driver options in the .opt files is currently 
ignored.  I don't expect driver --help improvements to be part of my 
present patch series; if someone does wish to work on it it would be a 
nice improvement (and a few options that are presently in .opt files with 
non-Driver markings and help text, but are actually only processed by the 
driver, such as -shared and -pie, could then be marked Driver as they 
should be).
Mike Stump Sept. 29, 2010, 5:34 p.m.
On Sep 29, 2010, at 9:15 AM, Jack Howarth wrote:
>   In that case, could you go ahead and commit the revised patch...

I checked it in....

Patch hide | download patch | download mbox

Index: gcc/config/darwin.opt
===================================================================
--- gcc/config/darwin.opt	(revision 164620)
+++ gcc/config/darwin.opt	(working copy)
@@ -45,3 +45,6 @@ 
 iframework
 Target RejectNegative C ObjC C++ ObjC++ Joined Separate 
 -iframework <dir>	Add <dir> to the end of the system framework include path
+
+undefined
+Driver Separate