From: Kefu Chai Date: Sun, 15 Mar 2020 02:42:03 +0000 (+0800) Subject: admin/build-doc: drop --no-as-needed on Darwin X-Git-Tag: v16.0.0~20^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ea67a42f99ca3ed500e8814feebc8ed9c907dd0f;p=ceph-ci.git admin/build-doc: drop --no-as-needed on Darwin which is not supported by ld on OSX. also, pass the rpath argument as a new command line argument instead using -rpath=foo, which is not supported by llvm linker. Signed-off-by: Kefu Chai --- diff --git a/admin/build-doc b/admin/build-doc index f74a7d58673..225de0907ff 100755 --- a/admin/build-doc +++ b/admin/build-doc @@ -80,10 +80,14 @@ for bind in rados rbd cephfs rgw; do fi ln -sf lib${bind}.so.1 $vdir/lib/lib${bind}.so gcc -shared -o $vdir/lib/lib${bind}.so.1 -xc /dev/null + ld_flags="-Wl,-rpath,$vdir/lib" + if [ $(uname) != Darwin ]; then + ld_flags="${ld_flags},--no-as-needed" + fi BUILD_DOC=1 \ CFLAGS="-iquote$TOPDIR/src/include" \ CPPFLAGS="-iquote$TOPDIR/src/include" \ - LDFLAGS="-L$vdir/lib -Wl,--no-as-needed,-rpath=$vdir/lib" \ + LDFLAGS="-L$vdir/lib ${ld_flags}" \ $vdir/bin/pip install --upgrade $TOPDIR/src/pybind/${bind} # rgwfile_version(), librgw_create(), rgw_mount() # since py3.5, distutils adds postfix in between ${bind} and so