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`
PTHREAD_LIBS=$4
QUOTA_LIBS=$5
CAP_LIBS=$6
+ZLIB=$7
if [ ! -f $SYSIO/lib/libsysio.a ]; then
echo "ERROR: $SYSIO/lib/libsysio.a dosen't exist"
# lnet components libs
build_obj_list ../../lnet/utils libuptlctl.a
-build_obj_list ../../lnet/libcfs libcfs.a
+build_obj_list ../../libcfs/libcfs libcfs.a
+build_obj_list ../../libcfs/libcfs libcfsutil.a
if $(echo "$LND_LIBS" | grep "socklnd" >/dev/null) ; then
build_obj_list ../../lnet/ulnds/socklnd libsocklnd.a
fi
if test x$OS = xAIX; then
$LD -shared -o $CWD/liblustre.so $ALL_OBJS -lpthread -Xlinker -bnoipath ../../libsyscall.so
else
-$LD -shared -o $CWD/liblustre.so $ALL_OBJS $CAP_LIBS $PTHREAD_LIBS
+$LD -shared -nostdlib -o $CWD/liblustre.so $ALL_OBJS $CAP_LIBS $PTHREAD_LIBS $ZLIB
fi
rm -rf $sysio_tmp