[patch 2/5] kexec improve build for ppc64
Geoff Levand
geoffrey.levand at am.sony.com
Mon May 7 20:02:52 EDT 2007
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 at am.sony.com>
---
configure.ac | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
--- kexec-tools-hacked.orig/configure.ac
+++ kexec-tools-hacked/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" ])
--
More information about the kexec
mailing list