X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fliblustre%2Fgenlib.sh;h=50598926bc7c7e9f5f4d634a8778b1ca550385cb;hb=a0b83ae3120e79fc6ea6eba7e6bff7e3720209d5;hp=ec69688e572e5d25ba8ca7f9363b1297ec73cd2d;hpb=113303973ec9f8484eb2355a1a6ef3c4c7fd6a56;p=fs%2Flustre-release.git diff --git a/lustre/liblustre/genlib.sh b/lustre/liblustre/genlib.sh index ec69688..5059892 100755 --- a/lustre/liblustre/genlib.sh +++ b/lustre/liblustre/genlib.sh @@ -12,7 +12,13 @@ set -e # AR=/usr/bin/ar -LD=/usr/bin/ld +# see http://osdir.com/ml/gmane.comp.gnu.binutils.bugs/2006-01/msg00016.php +ppc64_CPU=`uname -p` +if [ "x${ppc64_CPU}" = "xppc64" ]; then + LD="gcc -m64" +else + LD="gcc" +fi RANLIB=/usr/bin/ranlib CWD=`pwd` @@ -21,8 +27,8 @@ SYSIO=$1 LIBS=$2 LND_LIBS=$3 PTHREAD_LIBS=$4 -QUOTA_LIBS=$5 -CAP_LIBS=$6 +CAP_LIBS=$5 +ZLIB=$6 if [ ! -f $SYSIO/lib/libsysio.a ]; then echo "ERROR: $SYSIO/lib/libsysio.a dosen't exist" @@ -62,7 +68,10 @@ build_obj_list . libllite.a build_obj_list ../lov liblov.a build_obj_list ../obdecho libobdecho.a build_obj_list ../osc libosc.a +build_obj_list ../lmv liblmv.a build_obj_list ../mdc libmdc.a +build_obj_list ../fid libfid.a +build_obj_list ../fld libfld.a build_obj_list ../mgc libmgc.a build_obj_list ../ptlrpc libptlrpc.a build_obj_list ../obdclass liblustreclass.a @@ -70,7 +79,8 @@ build_obj_list ../lvfs liblvfs.a # 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 @@ -79,10 +89,6 @@ if $(echo "$LND_LIBS" | grep "ptllnd" >/dev/null) ; then fi build_obj_list ../../lnet/lnet liblnet.a -if [ "x$QUOTA_LIBS" != "x" ]; then - build_obj_list ../quota libquota.a -fi - # create static lib lsupport rm -f $CWD/liblsupport.a $AR -cru $CWD/liblsupport.a $ALL_OBJS @@ -102,10 +108,14 @@ $RANLIB $CWD/liblustre.a rm -f $CWD/liblustre.so OS=`uname` if test x$OS = xAIX; then -gcc -shared -o $CWD/liblustre.so $ALL_OBJS -lpthread -Xlinker -bnoipath ../../libsyscall.so +$LD -shared -o $CWD/liblustre.so $ALL_OBJS -lpthread -Xlinker -bnoipath ../../libsyscall.so else -$LD -shared -o $CWD/liblustre.so -init __liblustre_setup_ -fini __liblustre_cleanup_ \ - $ALL_OBJS $CAP_LIBS $PTHREAD_LIBS +# using -nostdlib on Ubuntu causes errors such as: +#./llite_lib.o: In function `liblustre_process_log': +#/home/brian/rpm/BUILD/lustre-1.8.2.50/lustre/liblustre/llite_lib.c:234: undefined reference to `__stack_chk_fail_local' +# due to the use of SSP +#$LD -shared -nostdlib -o $CWD/liblustre.so $ALL_OBJS $CAP_LIBS $PTHREAD_LIBS $ZLIB +$LD -shared -o $CWD/liblustre.so $ALL_OBJS $CAP_LIBS $PTHREAD_LIBS $ZLIB fi rm -rf $sysio_tmp