]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
admin/build-doc: drop --no-as-needed on Darwin
authorKefu Chai <kchai@redhat.com>
Sun, 15 Mar 2020 02:42:03 +0000 (10:42 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 15 Mar 2020 04:50:45 +0000 (12:50 +0800)
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 <kchai@redhat.com>
admin/build-doc

index f74a7d5867336b3331806d558521496089071db2..225de0907ff6ebfb4efc5b6778204a36c2f222c9 100755 (executable)
@@ -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