Hi, On Thu, Jul 21, 2011 at 07:37, Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote: > As described in the PR, the use of LANGUAGE_C in CLooG breaks C++ > bootstrap on IRIX 6.5. Both MIPS and Alpha C compilers predefine > LANGUAGE_C themselves, which clashes with the CLooG macro in > <cloog/pprint.h>. In a bootstrap with C++, LANGUAGE_C of course isn't > defined, so the symbol is missing. > > As a hack, I had renamed that to CLOOG_LANGUAGE_C in the installed > CLooG headers, not noticing the use of LANGUAGE_C in > graphite-clast-to-gimple.c. Since this macro name is obviously far too > generic, I propose renaming it to CLOOG_LANGUAGE_C upstream.
I forwarded this question to the cloog-dev mailing list and they like this change. > The current patch accounts for such a change in gcc and allows the > mips-sgi-irix6.5 bootstrap to continue. > > What's the best way forward from here? Could one of you propose that > upstream? Is the patch below ok for mainline? Your patch is ok for GCC, please commit. You can post a patch for CLooG on cloog-developm...@googlegroups.com Don't forget to update the documentation of CLooG as well. Thanks, Sebastian > > Thanks. > Rainer > > > 2011-07-20 Rainer Orth <r...@cebitec.uni-bielefeld.de> > > PR bootstrap/49797 > * graphite-clast-to-gimple.c (CLOOG_LANGUAGE_C): Provide if missing. > (set_cloog_options): Use it. > > diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c > --- a/gcc/graphite-clast-to-gimple.c > +++ b/gcc/graphite-clast-to-gimple.c > @@ -1,5 +1,5 @@ > /* Translation of CLAST (CLooG AST) to Gimple. > - Copyright (C) 2009, 2010 Free Software Foundation, Inc. > + Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. > Contributed by Sebastian Pop <sebastian....@amd.com>. > > This file is part of GCC. > @@ -40,6 +40,10 @@ along with GCC; see the file COPYING3. > #include "graphite-dependences.h" > #include "graphite-cloog-compat.h" > > +#ifndef CLOOG_LANGUAGE_C > +#define CLOOG_LANGUAGE_C LANGUAGE_C > +#endif > + > /* This flag is set when an error occurred during the translation of > CLAST to Gimple. */ > static bool gloog_error; > @@ -1306,7 +1310,7 @@ set_cloog_options (void) > /* Change cloog output language to C. If we do use FORTRAN instead, cloog > will stop e.g. with "ERROR: unbounded loops not allowed in FORTRAN.", if > we pass an incomplete program to cloog. */ > - options->language = LANGUAGE_C; > + options->language = CLOOG_LANGUAGE_C; > > /* Enable complex equality spreading: removes dummy statements > (assignments) in the generated code which repeats the > > > -- > ----------------------------------------------------------------------------- > Rainer Orth, Center for Biotechnology, Bielefeld University >