This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TARGET_CPU_DEFAULT broken in ppc



> > 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]