Patchwork PATCH RFA: Fix --enable-build-with-cxx

login
register
mail settings
Submitter Jack Howarth
Date Nov. 16, 2010, 1:41 p.m.
Message ID <20101116134132.GA19504@bromo.med.uc.edu>
Download mbox | patch
Permalink /patch/71398/
State New
Headers show

Comments

Jack Howarth - Nov. 16, 2010, 1:41 p.m.
On Mon, Nov 15, 2010 at 09:56:59PM -0800, Ian Lance Taylor wrote:
> Jack Howarth <howarth@bromo.med.uc.edu> writes:
> 
> > With this patch and the additional change of...
> >
> > Index: gcc/config/darwin-protos.h
> > ===================================================================
> > --- gcc/config/darwin-protos.h	(revision 166790)
> > +++ gcc/config/darwin-protos.h	(working copy)
> > @@ -18,6 +18,8 @@
> >  along with GCC; see the file COPYING3.  If not see
> >  <http://www.gnu.org/licenses/>.  */
> >  
> > +#include "c-family/c-format.h"
> > +
> >  extern void darwin_init_sections (void);
> >  extern int name_needs_quotes (const char *);
> >  
> > @@ -101,6 +103,7 @@
> >  extern void darwin_check_cfstring_format_arg (tree, tree);
> >  extern tree darwin_build_constant_cfstring (tree);
> >  extern void darwin_enter_string_into_cfstring_table (tree);
> > +extern const format_kind_info darwin_additional_format_types[];
> >  
> >  extern void darwin_asm_output_anchor (rtx symbol);
> >  extern bool darwin_kextabi_p (void);
> >
> > x86_64-apple-darwin10 successfully bootstraps with --enable-build-with-cxx.
> 
> Thanks.  That's actually not the right fix.  The right fix is to leave
> darwin-protos.h unchanged, and to change this line in darwin-c.c:
> 
> const format_kind_info darwin_additional_format_types[] = {
> 
> It needs to be
> 
> EXPORTED_CONST format_kind_info darwin_additional_format_types[] = {
> 
> I can't really test that change, but if it works for you I'll preapprove
> it.  Thanks.
> 
> Ian

Ian,
  I can confirm that...


solves the remaining bootstrap issues with --enable-build-with-cxx on x86_64-apple-darwin10.
Thanks.
          Jack

Patch

Index: gcc/config/darwin-c.c
===================================================================
--- gcc/config/darwin-c.c	(revision 166794)
+++ gcc/config/darwin-c.c	(working copy)
@@ -706,7 +706,7 @@ 
 }
 
 /* The extra format types we recognize.  */
-const format_kind_info darwin_additional_format_types[] = {
+EXPORTED_CONST format_kind_info darwin_additional_format_types[] = {
   { "CFString",   NULL,  NULL, NULL, NULL, 
     NULL, NULL, 
     FMT_FLAG_ARG_CONVERT|FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL, 0, 0, 0, 0, 0, 0,