From 4a13437b69c1f992ac14473dab8baf5b1e2dd7c5 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Fri, 13 Sep 2019 12:44:55 +0200 Subject: [PATCH] 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. --- scripts/build.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index c09ce966..fca95920 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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