From: Kefu Chai Date: Sun, 15 Mar 2020 03:08:47 +0000 (+0800) Subject: admin/build-doc: add optional "_" prefix before function names to match X-Git-Tag: v16.0.0~20^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c20e074efa2d3b982e5190bc99d1909937df7f9b;p=ceph.git admin/build-doc: add optional "_" prefix before function names to match as compilers targeting ELF does not add the leading "_" to symbol names, while clang on OSX always do this. and remove the underscore from the symbol name when generating the function name, as the compiler will add it back for us. Signed-off-by: Kefu Chai --- diff --git a/admin/build-doc b/admin/build-doc index 225de0907ff6..b69c0aceb129 100755 --- a/admin/build-doc +++ b/admin/build-doc @@ -100,8 +100,8 @@ for bind in rados rbd cephfs rgw; do else func_prefix="(lib)?${bind}" fi - nm $lib_fn | grep -E "U ${func_prefix}" | \ - awk '{ print "void "$2"(void) {}" }' | \ + nm $lib_fn | grep -E "U (_)?${func_prefix}" | \ + awk '{ gsub(/^_/,"",$2); print "void "$2"(void) {}" }' | \ gcc -shared -o $vdir/lib/lib${bind}.so.1 -xc - if [ ${bind} != rados ]; then rm -f $TOPDIR/src/pybind/${bind}/rados.pxd