编译安装 gperftools

64 位的程序通常需要链接 libuwind,但是很多时候并不想链接这个lib,因此我们需要禁用这个lib
使用 configure 的方式

./autogen.sh
/configure --prefix=$TP_INSTALL_DIR/gperftools --disable-shared --enable-static --disable-libunwind --with-pic --enable-frame-pointers

使用cmake的方式

如果需要用cmake的方式并且不想链接libwind,需要打一个 patch https://github.com/gperftools/gperftools/pull/1260

mkdir build
cd build && cmake .. -Dgperftools_enable_libunwind=OFF -Dgperftools_enable_frame_pointers=ON
原文地址:https://www.cnblogs.com/stdpain/p/14528294.html