scripts/build.sh: Additional options for epoll and small stack

* Passing EPOLL=no disables the epoll interface usage. Other values
  default to yes, i.e. epoll is used if available.
* Passing SMALL_STACK=yes enables some values stored in static
variables instead pushing on the stack. This usually requires
mutex support in the operating system.
This commit is contained in:
Olaf Bergmann committed 2019-09-13 12:44:55 +02:00
1 parent 45b5d23665
commit 4a13437b69
1 file changed
+12 -1
+12 -1
View File
@@ -31,6 +31,17 @@ case "x${DOCS}" in
;;
esac
# Building with epoll support can be disabled by setting EPOLL=no.
# Otherwise, it is enabled by default and used if available.
if test "x$EPOLL" = "xno" ; then
OTHER_OPTS="$OTHER_OPTS --without-epoll"
fi
# Enable constrained stack build when SMALL_STACK is set to yes.
if test "x$SMALL_STACK" = "xyes" ; then
OTHER_OPTS="$OTHER_OPTS --enable-small-stack"
fi
config() {
echo "./configure $SILENT $*"
./configure $SILENT $* || cat config.log
@@ -43,7 +54,7 @@ case "${PLATFORM}" in
lwip) config "--disable-tests $WITH_DOCS --disable-examples $WITH_TLS" && \
make -C examples/lwip
;;
posix|*) config "$WITH_TESTS $WITH_DOCS --enable-examples $WITH_TLS" && \
posix|*) config "$WITH_TESTS $WITH_DOCS --enable-examples $WITH_TLS $OTHER_OPTS" && \
make && make check
;;
esac