Subject: Re: -mstrict-align on powerpc
To: None <tech-toolchain@netbsd.org>
From: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
List: tech-toolchain
Date: 03/16/2003 17:53:34
On Sun, Mar 16, 2003 at 08:44:40AM -0800, Jason Thorpe wrote:
>
> On Sunday, March 16, 2003, at 04:05 AM, Juergen Hannken-Illjes wrote:
>
> >I understand. What about
> >
> > #define CC1_SPEC "-mno-multiple %{!mcpu*: -mstrict-align}"
> >
> >to set this flag only when there is no -mXXX?
>
> I don't think that's quite right, either. You want this to be enabled
> if e.g. -mcpu=403, right? :-)
I didn't get any problems using -mcpu=403, no -mstrict-align while
compiling the explora kernel. I got this problem only in userland.
> Maybe something like:
>
> #define CC1_SPEC \
> "-mno-multiple \
> %{mstrict-align: -mstrict-align} \
> %{mno-strict-align: -mno-strict-align} \
> %{!mstrict-align: \
> %{!mno-strict-align: \
> %{!mcpu=60*: \
> %{!mcpu=74*: \
> %{!mcpu=75*: -mstrict-align}}}}}"
>
> (I think I got the logic right there :-)
>
> Also note that this should be done in the NetBSD-specific rs6000 config
> file, not in the generic rs6000.h.
rs6000.h lists also these -mcpu=XXX:
mcpu=common
mcpu=power
mcpu=power2
mcpu=powerpc
mcpu=rios
mcpu=rios1
mcpu=rios2
mcpu=rsc
mcpu=rsc1
mcpu=505
mcpu=801
mcpu=821
mcpu=823
mcpu=860
Another idea: If someone want's specific flags for his userland let him
specify both (-mcpu=XXX -mno-strict-align) in the hope the -mno-strict-align
overrides the implicit -mstrict-align.
--
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)