diff --git a/build/autoconf/lustre-build-linux.m4 b/build/autoconf/lustre-build-linux.m4
index f434e0ce0cfa065b107bbffc0f5ce6ad1a42e9b6..71ee36cd0881ed9cfe41bfd78eff7f0ac514e8ae 100644
--- a/build/autoconf/lustre-build-linux.m4
+++ b/build/autoconf/lustre-build-linux.m4
@@ -462,6 +462,11 @@ AC_DEFUN([LB_PROG_LINUX],
 LB_LINUX_ARCH
 LB_LINUX_SYMVERFILE
 
+#if test $LINUX_ARCH == "powerpc64"; then
+#	AC_MSG_WARN([set compiler with -m64])
+#	CFLAGS="$CFLAGS -m64"
+#	CC="$CC -m64"
+#fi
 
 LB_LINUX_CONFIG([MODULES],[],[
 	AC_MSG_ERROR([module support is required to build Lustre kernel modules.])
diff --git a/lustre/liblustre/genlib.sh b/lustre/liblustre/genlib.sh
index 406c235dc07000d53ef8445440e90a0757f9f3ad..4cbef251729e7551526505f54535ad74beb0eb1d 100755
--- a/lustre/liblustre/genlib.sh
+++ b/lustre/liblustre/genlib.sh
@@ -13,7 +13,12 @@ set -e
 
 AR=/usr/bin/ar
 # see http://osdir.com/ml/gmane.comp.gnu.binutils.bugs/2006-01/msg00016.php
-LD=gcc
+ppc64_CPU=`uname -p`
+if [ ${ppc64_CPU} == "ppc64" ]; then
+  LD="gcc -m64"
+else
+  LD="gcc"
+fi
 RANLIB=/usr/bin/ranlib
 
 CWD=`pwd`