On Sun, 2005-02-27 at 18:56 -0500, David Edelsohn wrote: > >>>>> Benjamin Herrenschmidt writes: > > Ben> Ok. What I need is -mcpu=power4 -maltivec > > Sorry, no. -maltivec means generate Altivec code, not just enable > Altivec instructions and registers. The above option is not different > than -mcpu=970. There is no DWIM option.
No, that's fine. What I need is - the entire kernel beeing built with -mcpu=power4 - the raid6 code only beeing built with the additional -maltivec That should work fine. The only problem I see is that the day we have a CPU, let's call it POWER8 for the sake of this demonstration, that has altivec and is different enough to justify a specific "optimize" option, we'll have to use -mcpu=POWER8 -mno-altivec for the whole kernel, which makes it difficult to enable altivec only for the raid6 file since the kenrel makefiles, afaik, can only add an option to a specific file. Unless -mcpu=POWER8 -mno-altivec -maltivec is legal ... Ben.