diff mbox

[Revised] Fix PR 36502/plugins

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

Commit Message

Jack Howarth Sept. 26, 2010, 3:11 p.m. UTC
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. UTC | #1
>        PR 45787/target

Nit: PR target/45787

i.e. component comes first.

Ciao!
Steven
Mike Stump Sept. 26, 2010, 6:54 p.m. UTC | #2
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 Myers Sept. 29, 2010, 2:31 p.m. UTC | #3
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. UTC | #4
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. UTC | #5
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. UTC | #6
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 Myers Sept. 29, 2010, 5:10 p.m. UTC | #7
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. UTC | #8
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....
diff mbox

Patch

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