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