編譯安裝 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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM