X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fliblustre%2Fgenlib.sh;h=c2168a4d044721cbd70e8dc86ffb88c24f760b5b;hb=89152041a924dcd24c841f47936302cee775c686;hp=dbe849fe659fdd8473d2677e29f953f1bb7cbfcc;hpb=10d49b6e200bb4234a2611e2882e646bf811cd68;p=fs%2Flustre-release.git diff --git a/lustre/liblustre/genlib.sh b/lustre/liblustre/genlib.sh index dbe849f..c2168a4 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 [ "x${ppc64_CPU}" = "xppc64" ]; then + LD="gcc -m64" +else + LD="gcc" +fi RANLIB=/usr/bin/ranlib CWD=`pwd` @@ -64,10 +69,7 @@ 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 @@ -109,7 +111,12 @@ OS=`uname` if test x$OS = xAIX; then $LD -shared -o $CWD/liblustre.so $ALL_OBJS -lpthread -Xlinker -bnoipath ../../libsyscall.so else -$LD -shared -nostdlib -o $CWD/liblustre.so $ALL_OBJS $CAP_LIBS $PTHREAD_LIBS $ZLIB +# 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