Whamcloud - gitweb
Branch HEAD
authoryangsheng <yangsheng>
Wed, 22 Oct 2008 06:12:46 +0000 (06:12 +0000)
committeryangsheng <yangsheng>
Wed, 22 Oct 2008 06:12:46 +0000 (06:12 +0000)
b=16437
i=cliff.white, brian

Enable the '-m64' flag for powerpc64 patchless build.

build/autoconf/lustre-build-linux.m4
lustre/liblustre/genlib.sh

index f434e0c..71ee36c 100644 (file)
@@ -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.])
index 406c235..4cbef25 100755 (executable)
@@ -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`