diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2007-05-07 17:02:52 -0700 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2007-05-08 15:03:25 +0900 |
commit | 536dd73ce38cb68828d362b0cca1a8e8b377b97e (patch) | |
tree | db0781d6c7f75a99bb6ced60587d137951869233 | |
parent | 1f5e46311bc9f00449f1ffb4fef4901664d3061e (diff) |
kexec improve build for ppc64
Powerpc 64 bit platforms support both 64 bit and 32 bit runtimes. Allow
ARCH= to be specified on the command line to separate the processor arch
from the compiler machine. This also helps cross-builds with non-standard
compiler names.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | configure.ac | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index c6e3cd6..6b95f83 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,12 @@ case $host_cpu in AC_MSG_ERROR([ unsupported architecture $host_cpu]) ;; esac -ARCH=$host_cpu + +dnl Try to guess the kernel ARCH based on the autoconf host_cpu variable. + +if ! test "${ARCH}" ; then + ARCH=$host_cpu +fi dnl ---Options @@ -59,10 +64,14 @@ BUILD_CFLAGS='-O2 -Wall $(CPPFLAGS)' # Check whether ppc64. Add -m64 for building 64-bit binary # Add -mcall-aixdesc to generate dot-symbols as in gcc 3.3.3 -if test "$ARCH" = ppc64; then +if test "$host_cpu" = ppc64; then EXTRA_CFLAGS="$EXTRA_CFLAGS -m64 -mcall-aixdesc" fi; +if test "$host_cpu" = ppc; then + EXTRA_CFLAGS="$EXTRA_CFLAGS -m32" +fi; + AC_ARG_WITH([objdir], AC_HELP_STRING([--with-objdir=<dir>],[select directory for object files]), [ OBJDIR="$withval" ], [ OBJDIR="$OBJDIR" ]) |