TARGET_CPU_DEFAULT broken in ppc
Aldy Hernandez
aldyh@redhat.com
Tue Dec 11 17:32:00 GMT 2001
> > 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.
More information about the Gcc
mailing list