mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
ST: Simplify it, only Linux/Darwin, epoll/kqueue, single process. 5.0.2
commit f4872e528cad07f8ea683cc8cb26e34111bad1b5 Author: winlin <winlin@vip.126.com> Date: Fri Feb 26 09:13:21 2021 +0800 ST: For #2188: Remove sendmmsg from ST. commit aaeb8919bd4a026268e0600398cb1e9ad477663f Author: winlin <winlin@vip.126.com> Date: Thu Mar 11 08:09:54 2021 +0800 ST: Refine utest script. commit d1ac9da53060b6bfa82b5d041da4c2ad9bd6b90a Author: winlin <winlin@vip.126.com> Date: Wed Mar 3 11:02:25 2021 +0800 ST: Support fast utest and coverage commit 8400115b83c022e33f59422dbf6d85ee46fb9edb Author: winlin <winlin@vip.126.com> Date: Fri Feb 26 07:02:19 2021 +0800 ST: Always use unserialized accept for linux or darwin commit c3686f2bca80d2c139239b08975575b1bb981ffa Author: winlin <winlin@vip.126.com> Date: Fri Feb 26 06:54:05 2021 +0800 ST: Refine ARFLAGS by disable the verbose log commit aaa5c4f863eba278c4ed2b29a46297fb01a4ed63 Author: winlin <winlin@vip.126.com> Date: Thu Feb 25 08:58:46 2021 +0800 ST: Stack always grows from top to down. commit dddd466e5c2e418c6f4896cd8bf701130052b3d9 Author: winlin <winlin@vip.126.com> Date: Thu Feb 25 08:51:31 2021 +0800 ST: Ignore process fork, for single process only commit 7906cb5f6e78c916cb8b8d9522275bfc086bb6a3 Author: winlin <winlin@vip.126.com> Date: Thu Feb 25 08:50:59 2021 +0800 ST: Fix build warnings commit d94921b84a3b6cf88ace2c766cc2bfedb9c0602e Author: winlin <winlin@vip.126.com> Date: Thu Feb 25 07:27:45 2021 +0800 ST: Remove select and poll support, only epoll and kqueue commit 76d202514615f78d1a8f2b15778f3dac5abf4abb Author: winlin <winlin@vip.126.com> Date: Thu Feb 25 07:10:47 2021 +0800 ST: Remove multiple OS support, except Linux and Darwin. commit 13c4ba345c61170e86dde486a174378ca235f442 Author: winlin <winlin@vip.126.com> Date: Thu Feb 25 06:59:35 2021 +0800 ST: Remove __ia64__ CPU support commit 46c06e4a11879cfeb828382e44f11287782ce4b5 Author: winlin <winlin@vip.126.com> Date: Wed Feb 24 11:37:27 2021 +0800 ST: Remove unused files for ST
This commit is contained in:
parent
9709ca3b7e
commit
442cf615c0
37 changed files with 116 additions and 6176 deletions
|
@ -391,24 +391,34 @@ fi
|
|||
# state-threads
|
||||
#####################################################################################
|
||||
# check the cross build flag file, if flag changed, need to rebuild the st.
|
||||
_ST_MAKE=linux-debug && _ST_EXTRA_CFLAGS="-O0" && _ST_LD=${SRS_TOOL_LD} && _ST_OBJ="LINUX_`uname -r`_DBG"
|
||||
_ST_MAKE=linux-debug && _ST_LD=${SRS_TOOL_LD} && _ST_OBJ="LINUX_`uname -r`_DBG"
|
||||
# Always alloc on heap, @see https://github.com/ossrs/srs/issues/509#issuecomment-719931676
|
||||
_ST_EXTRA_CFLAGS="-DMALLOC_STACK"
|
||||
# For valgrind to detect memory issues.
|
||||
if [[ $SRS_VALGRIND == YES ]]; then
|
||||
_ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS -DMD_VALGRIND"
|
||||
fi
|
||||
# for osx, use darwin for st, donot use epoll.
|
||||
if [[ $SRS_OSX == YES ]]; then
|
||||
_ST_MAKE=darwin-debug && _ST_EXTRA_CFLAGS="-DMD_HAVE_KQUEUE" && _ST_LD=${SRS_TOOL_CC} && _ST_OBJ="DARWIN_`uname -r`_DBG"
|
||||
_ST_MAKE=darwin-debug && _ST_LD=${SRS_TOOL_CC} && _ST_OBJ="DARWIN_`uname -r`_DBG"
|
||||
fi
|
||||
# Whether enable debug stats.
|
||||
if [[ $SRS_DEBUG_STATS == YES ]]; then
|
||||
_ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS -DDEBUG_STATS"
|
||||
fi
|
||||
# Always alloc on heap, @see https://github.com/ossrs/srs/issues/509#issuecomment-719931676
|
||||
_ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS -DMALLOC_STACK"
|
||||
# Pass the global extra flags.
|
||||
if [[ $SRS_EXTRA_FLAGS != '' ]]; then
|
||||
_ST_EXTRA_CFLAGS="$_ST_EXTRA_CFLAGS $SRS_EXTRA_FLAGS"
|
||||
fi
|
||||
# Whether link as .so
|
||||
if [[ $SRS_SHARED_ST == YES ]]; then
|
||||
_ST_STATIC_ONLY=no;
|
||||
else
|
||||
_ST_STATIC_ONLY=yes;
|
||||
fi
|
||||
# The final args to make st.
|
||||
_ST_MAKE_ARGS="${_ST_MAKE} STATIC_ONLY=${_ST_STATIC_ONLY}"
|
||||
_ST_MAKE_ARGS="${_ST_MAKE_ARGS} CC=${SRS_TOOL_CC} AR=${SRS_TOOL_AR} LD=${_ST_LD} RANDLIB=${SRS_TOOL_RANDLIB}"
|
||||
# Patched ST from https://github.com/ossrs/state-threads/tree/srs
|
||||
if [[ -f ${SRS_OBJS}/${SRS_PLATFORM}/st-srs/${_ST_OBJ}/libst.a ]]; then
|
||||
echo "The state-threads is ok.";
|
||||
|
@ -420,19 +430,8 @@ else
|
|||
cd ${SRS_OBJS}/${SRS_PLATFORM}/st-srs && ln -sf ../../../3rdparty/st-srs .src &&
|
||||
# Link source files under .src
|
||||
_srs_link_file .src/ ./ ./ &&
|
||||
for dir in `(cd .src && find . -maxdepth 1 -type d|grep '\./')`; do
|
||||
dir=`basename $dir` && mkdir -p $dir && _srs_link_file .src/$dir/ $dir/ ../
|
||||
done &&
|
||||
# Link source files under .src/xxx, the first child dir.
|
||||
for dir in `(cd .src && find . -maxdepth 1 -type d|grep '\./'|grep -v Linux|grep -v Darwin)`; do
|
||||
mkdir -p $dir &&
|
||||
for file in `(cd .src/$dir && find . -maxdepth 1 -type f ! -name '*.o' ! -name '*.d')`; do
|
||||
ln -sf ../.src/$dir/$file $dir/$file;
|
||||
done;
|
||||
done &&
|
||||
# Build source code.
|
||||
make ${_ST_MAKE} EXTRA_CFLAGS="${_ST_EXTRA_CFLAGS}" \
|
||||
CC=${SRS_TOOL_CC} AR=${SRS_TOOL_AR} LD=${_ST_LD} RANDLIB=${SRS_TOOL_RANDLIB} &&
|
||||
env EXTRA_CFLAGS="${_ST_EXTRA_CFLAGS}" make ${_ST_MAKE_ARGS} &&
|
||||
cd .. && rm -rf st && ln -sf st-srs/${_ST_OBJ} st
|
||||
)
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue