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: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: drow at mvista dot com (Daniel Jacobowitz)
- Cc: Richard dot Earnshaw at arm dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Aug 2002 14:39:45 -0400 (EDT)
- Subject: Re: RFC: New approach to --with-cpu
> On Thu, Aug 01, 2002 at 11:15:10AM -0400, John David Anglin wrote:
> > > + hppa*-*-* | parisc*-*-*)
> > > + if test x$gas = xyes
> > > + then
> > > + target_cpu_default2="MASK_GAS|MASK_JUMP_IN_DELAY"
> > > + fi
> > > + case $machine in
> > > + hppa1* | parisc1*)
> > > + with_cpu=7100LC
> > ^^^^^^^^
> >
> > I believe that this should be "with_schedule". I was also wondering
> > if a comment should be added to indicate that the default scheduling
> > model is "8000".
>
> And you're completely correct on both counts. I've added that to my
> working copy.
I enclose below an update to above code. I have attempted to
bullet proof it so that it handles error conditions gracefully
and only overrides the PA8000 default based on the target
cpu when the user doesn't specify --with-schedule.
I have run through partial builds checking most of the option
permutations and the patch seems to be working well. I like
the ease with which the scheduling model can now be specified.
The only additional wish is for an easy way to print the target
defaults.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
--- config.gcc.orig 2002-08-01 09:36:20.000000000 -0700
+++ config.gcc 2002-08-01 11:19:24.000000000 -0700
@@ -2908,9 +2908,21 @@
then
target_cpu_default2="MASK_GAS|MASK_JUMP_IN_DELAY"
fi
- case $machine in
- hppa1* | parisc1*)
- with_cpu=7100LC
+ case ".$with_schedule" in
+ .700 | .7100 | .7100LC | .7200 | .7300 | .8000)
+ ;;
+ .)
+ case $machine in
+ hppa1* | parisc1*)
+ # Override default PA8000
+ # scheduling model.
+ with_schedule=7100LC
+ ;;
+ esac
+ ;;
+ *)
+ echo "Unknown cpu used with --with-schedule=$with_schedule" 1>&2
+ exit 1
;;
esac
;;