1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Upgrade gperftools to 2.9 for GCP/GMC/GMP/GMD. (#2247)

This commit is contained in:
winlin 2021-12-12 15:38:30 +08:00
parent 63da0dca92
commit 44e9dc83e9
346 changed files with 169666 additions and 78 deletions

View file

@ -815,21 +815,21 @@ fi
#####################################################################################
if [ $SRS_GPERF = YES ]; then
if [[ -f ${SRS_OBJS}/${SRS_PLATFORM}/gperf/bin/pprof ]]; then
echo "The gperftools-2.1 is ok.";
echo "The gperftools-2-fit is ok.";
else
echo "Build gperftools-2.1";
echo "Build gperftools-2-fit";
(
rm -rf ${SRS_OBJS}/${SRS_PLATFORM}/gperftools-2.1 && cd ${SRS_OBJS}/${SRS_PLATFORM} &&
unzip -q ../../3rdparty/gperftools-2.1.zip && cd gperftools-2.1 &&
rm -rf ${SRS_OBJS}/${SRS_PLATFORM}/gperftools-2-fit && cd ${SRS_OBJS}/${SRS_PLATFORM} &&
cp -R ../../3rdparty/gperftools-2-fit . && cd gperftools-2-fit &&
./configure --prefix=`pwd`/_release --enable-frame-pointers && make ${SRS_JOBS} && make install &&
cd .. && rm -rf gperf && ln -sf gperftools-2.1/_release gperf &&
cd .. && rm -rf gperf && ln -sf gperftools-2-fit/_release gperf &&
rm -rf pprof && ln -sf gperf/bin/pprof pprof
)
fi
# check status
ret=$?; if [[ $ret -ne 0 ]]; then echo "Build gperftools-2.1 failed, ret=$ret"; exit $ret; fi
ret=$?; if [[ $ret -ne 0 ]]; then echo "Build gperftools-2-fit failed, ret=$ret"; exit $ret; fi
# Always update the links.
(cd ${SRS_OBJS} && rm -rf pprof && ln -sf ${SRS_PLATFORM}/gperf/bin/pprof pprof)
(cd ${SRS_OBJS} && rm -rf gperf && ln -sf ${SRS_PLATFORM}/gperftools-2.1/_release gperf)
if [ ! -f ${SRS_OBJS}/pprof ]; then echo "Build gperftools-2.1 failed."; exit -1; fi
(cd ${SRS_OBJS} && rm -rf gperf && ln -sf ${SRS_PLATFORM}/gperftools-2-fit/_release gperf)
if [ ! -f ${SRS_OBJS}/pprof ]; then echo "Build gperftools-2-fit failed."; exit -1; fi
fi