This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: TARGET_CPU_DEFAULT broken in ppc
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Dale Johannesen <dalej at apple dot com>
- Cc: David Edelsohn <dje at watson dot ibm dot com>, gcc external <gcc at gcc dot gnu dot org>
- Date: 11 Dec 2001 17:30:10 -0800
- Subject: Re: TARGET_CPU_DEFAULT broken in ppc
- References: <EF389DF0-EE9C-11D5-8923-003065C86F94@apple.com>
> > otoh, if i enclose -mfoobar in quotes like this:
> >
> > target_cpu_default="'-mfoobar'"
> >
> > then compiling sysv4.h gets all confused:
> >
> > rs6000_file_start (FILE, TARGET_CPU_DEFAULT);
> >
> > /source/uber/devo/gcc/toplev.c:4488: character constant too long
> > /source/uber/devo/gcc/toplev.c:4488: warning: passing arg 2 of
> > `rs6000_file_start' makes pointer from integer without a cast
> > /source/uber/devo/gcc/toplev.c: In function `process_options':
> > /source/uber/devo/gcc/toplev.c:4775: character constant too long
> > /source/uber/devo/gcc/toplev.c:4775: warning: passing arg 1 of
> > `rs6000_override_options' makes pointer from integer without a cast
> > make: *** [toplev.o] Error 1\
>
> So presumably it was passed '-mfoobar' which isn't a string. Try
> '"-mfoobar"' or \"-mfoobar\"
oh whoops, yes, shell problem. dumb ass hat was on. ;-)
> > afaict, rs6000_override_options never gets passed any value in
> > default_cpu, so most of it's fancy code is useless.
>
> That doesn't follow; most of the processing doesn't involve default_cpu.
> This is where -mcpu gets parsed and it works.
however, i still don't see how rs6000_override_options gets anything but
null.
#define OVERRIDE_OPTIONS rs6000_override_options (TARGET_CPU_DEFAULT)
afaict, this is the only reference to override_options, and it gets
passed TARGET_CPU_DEFAULT. and target_cpu_default is never set in any
of the ppc entries in config.gcc.
--
Aldy Hernandez E-mail: aldyh@redhat.com
Professional Gypsy
Red Hat, Inc.