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


On Tue, Dec 11, 2001 at 04:36:14PM -0800, Aldy Hernandez wrote:
> [including list]
> 
> [background: what i want to do is add configury magic so when i
> configure for, say powerpc-elfaltivec, i get a gcc that automatically
> has "-maltivec".]
> 
> > 	Can you use -mabi=altivec as the string?  It seems that what the
> > processing at the bottom of config.gcc might allow.
> > 
> > David
> 
> hi david.
> 
> i can't see how TARGET_CPU_DEFAULT can work at all on the ppc.
> 
> the rest of the ports have stuff like:
> 
> 	target_cpu_default="TARGET_BLAH | TARGET_FOO"
> 
> the ppc backend uses TARGET_CPU_DEFAULT as a string, not as a set of
> flags.  it uses it as a string to pass override_options:
> 
> #define OVERRIDE_OPTIONS rs6000_override_options (TARGET_CPU_DEFAULT)
> 
> but if you set it to any string, ala:
> 
> 	target_cpu_default="-mfoobar"
> 
> the config .h files have this definition:
> 
> 	#define TARGET_CPU_DEFAULT (-mfoobar)
> 
> which obviously won't work when passed to override_options.
> 
> otoh, if i enclose -mfoobar in quotes like this:
> 
> 	target_cpu_default="'-mfoobar'"

Shell quoting, as said elsewhere.  But not the problem.

> am i missing something or is TARGET_CPU_DEFAULT broken and unused in
> ppc?

I got this fixed to be usable again recently.  You use it like
--with-cpu=750, and the string "750" should end up in
TARGET_CPU_DEFAULT.  The branch I had to submit a patch for in July;
see:
	http://gcc.gnu.org/ml/gcc-patches/2001-07/msg01207.html

That's how to do the appropriate quoting.  It's also the only thing the
PPC checks for right now.  This works (though the list has gotten out
of date.  Need to add 7400/7450/405 at least.).

Converting this to the standard MASK model that other ports use would
be very useful.  It would also help at bashing --without-fp into
submission without creation of softfloat.h headers, which is a little
disgusting.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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