]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[PATCH] ppc64: fix gcc 4.0 vs CONFIG_ALTIVEC
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 3 May 2005 05:34:58 +0000 (15:34 +1000)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 3 May 2005 14:38:34 +0000 (07:38 -0700)
commit52292c9b8c16aa9024a65aaeeca434bb8fec7d24
tree59c7aae8cab7c4e1e557dd3a4fff6afbffab38e2
parent6628465e33ca694bd8fd5c3cf4eb7ff9177bc694
[PATCH] ppc64: fix gcc 4.0 vs CONFIG_ALTIVEC

gcc-4.0 generates altivec code implicitly when -mcpu indicates an
altivec capable CPU which is not suitable for the kernel.  However, we
used to set -mcpu=970 when CONFIG_ALTIVEC was set because a gcc-3.x bug
prevented from using -maltivec along with -mcpu=power4, thus prevented
building the RAID6 altivec code.

This patch fixes all of this by testing for the gcc version.  If 4.0 or
later, just normally use -mcpu=power4 and let the RAID6 code add
-maltivec to the few files it needs to be compiled with altivec support.
For 3.x, we still use -mcpu=970 to work around the above problem, which
is fine as 3.x will never implicitly generate altivec code.

The Makefile hackery may not be the most lovely, I welcome anybody more
skilled than me to improve it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc64/Makefile