This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: New approach to --with-cpu
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Richard dot Earnshaw at arm dot com
- Cc: Richard Sandiford <rsandifo at redhat dot com>,John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>,gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Aug 2002 09:25:23 -0400
- Subject: Re: RFC: New approach to --with-cpu
- References: <20020801125224.GA5374@nevyn.them.org> <200208011303.OAA20776@cam-mail2.cambridge.arm.com>
On Thu, Aug 01, 2002 at 02:03:26PM +0100, Richard Earnshaw wrote:
> > On Thu, Aug 01, 2002 at 11:56:17AM +0100, Richard Earnshaw wrote:
> > > > Daniel Jacobowitz <drow@mvista.com> writes:
> > > > > +#ifdef TARGET_DEFAULT_OPTION_CPU
> > > > > + if (TARGET_DEFAULT_CPU_P ())
> > > > > + add_option (argcp, argvp, "-mcpu=" XSTRING (TARGET_DEFAULT_OPTION_CPU));
> > > > > +#endif
> > > >
> > > > Sorry, didn't notice first time. Is it OK to use string
> > > > concatenation in gcc.c?
> > >
> > > No, I don't think so. It isn't available (that way) in K+R C.
> >
> > You're right, I should be using concat(). Before I fix that, does
> > anyone know whether XSTRING() works in K&R C, or whether I need to do
> > this with some extra quoting from configure?
>
> I would have said that XSTRING was OK. It would be a rather perverse K+R
> compiler that didn't support either
>
> #define STRINGX(s) "s"
> or
> #define STRINGX(s) #s
>
> to get stringification.
I know that STRINGX works; I'm just not sure how K&R compilers handle
the extra level of indirection in XSTRING. Don't have one to test
with, and README.Portability is silent.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer