On Wed, Aug 22, 2007 at 11:10:29AM -0700, Andrew Morton wrote:
[...]
[...]
It seems that this is a problem caused by the way we check for
compiler options in x86_64. Each compiler flag is checked for
individually and if available added to cflags-y, later that is
added to CFLAGS. However, this means that each flag is checked
in total isolation. On x86_64 (on this compiler at least) the
-mpreferred-stack-boundary and -m{32,64} flags are actually mutually
dependant, the alignment constraints vary based on the word size.
This leads to the compile failure:
# gcc -mpreferred-stack-boundary=3 -S -xc /dev/null -o FOO
# echo $?
0
# gcc -m64 -mpreferred-stack-boundary=3 -S -xc /dev/null -o FOO
/dev/null:1: error: -mpreferred-stack-boundary=3 is not between 4 and 12
# echo $?
1
In the main Makefile we always add each flag directly to CFLAGS
which means we check them all in combination, perhaps this is
prudent here also? Either way I suspect that changing the -m64
check to add itself directly to CFLAGS will fix this us.
-apw
-