summaryrefslogtreecommitdiffhomepage
path: root/auto
diff options
context:
space:
mode:
Diffstat (limited to 'auto')
-rw-r--r--auto/atomic81
-rw-r--r--auto/cc/deps12
-rw-r--r--auto/cc/test93
-rw-r--r--auto/fuzzing75
-rw-r--r--auto/help4
-rw-r--r--auto/make127
-rw-r--r--auto/modules/java14
-rw-r--r--auto/modules/java_jar.sha51226
-rw-r--r--auto/modules/perl14
-rw-r--r--auto/modules/php6
-rw-r--r--auto/modules/python8
-rw-r--r--auto/modules/ruby8
-rw-r--r--auto/modules/wasm11
-rw-r--r--auto/modules/wasm-wasi-component17
-rw-r--r--auto/njs8
-rw-r--r--auto/options4
-rw-r--r--auto/sched19
-rw-r--r--auto/shmem7
-rw-r--r--auto/sources10
-rw-r--r--auto/summary4
20 files changed, 304 insertions, 244 deletions
diff --git a/auto/atomic b/auto/atomic
index f99adf7e..08061e9a 100644
--- a/auto/atomic
+++ b/auto/atomic
@@ -33,87 +33,6 @@ nxt_feature_test="int main(void) {
. auto/feature
-# Solaris 10 builtin atomic operations.
-
-if [ $nxt_found = no ]; then
-
- nxt_feature="Solaris builtin atomic operations"
- nxt_feature_name=NXT_HAVE_SOLARIS_ATOMIC
- nxt_feature_run=yes
- nxt_feature_incs=
- nxt_feature_libs=
- nxt_feature_test="#include <atomic.h>
-
- int main(void) {
- ulong_t n = 0;
-
- if (atomic_cas_ulong(&n, 0, 3) != 0)
- return 1;
- if (atomic_add_long_nv(&n, 1) != 4)
- return 1;
- if (atomic_swap_ulong(&n, 5) != 4)
- return 1;
- if (n != 5)
- return 1;
- if (atomic_or_ulong_nv(&n, 2) != 7)
- return 1;
- if (atomic_and_ulong_nv(&n, 5) != 5)
- return 1;
- return 0;
- }"
- . auto/feature
-fi
-
-
-# AIX xlC builtin atomic operations.
-
-if [ $nxt_found = no ]; then
-
- if [ $NXT_64BIT = 1 ]; then
- nxt_feature_test="int main(void) {
- long n = 0;
- long o = 0;
-
- if (!__compare_and_swaplp(&n, &o, 3))
- return 1;
- if (__fetch_and_addlp(&n, 1) != 3)
- return 1;
- if (__fetch_and_swaplp(&n, 5) != 4)
- return 1;
- if (n != 5)
- return 1;
- __isync();
- __lwsync();
- return 0;
- }"
- else
- nxt_feature_test="int main(void) {
- int n = 0;
- int o = 0;
-
- if (!__compare_and_swap(&n, &o, 3))
- return 1;
- if (__fetch_and_add(&n, 1) != 3)
- return 1;
- if (__fetch_and_swap(&n, 5) != 4)
- return 1;
- if (n != 5)
- return 1;
- __isync();
- __lwsync();
- return 0;
- }"
- fi
-
- nxt_feature="xlC builtin atomic operations"
- nxt_feature_name=NXT_HAVE_XLC_ATOMIC
- nxt_feature_run=yes
- nxt_feature_incs=
- nxt_feature_libs=
- . auto/feature
-fi
-
-
if [ $nxt_found = no ]; then
$echo
$echo $0: error: no atomic operations found.
diff --git a/auto/cc/deps b/auto/cc/deps
index 11429788..8b4deca7 100644
--- a/auto/cc/deps
+++ b/auto/cc/deps
@@ -1,18 +1,6 @@
case "$NXT_CC_NAME" in
- SunC):
- nxt_gen_dep_flags() {
- $echo "-xMMD -xMF $NXT_BUILD_DIR/$nxt_dep.tmp"
- }
-
- nxt_gen_dep_post() {
- $echo -n "@sed -e 's#^.*:#$NXT_BUILD_DIR/$nxt_obj:#' "
- $echo -n "$NXT_BUILD_DIR/$nxt_dep.tmp > $NXT_BUILD_DIR/$nxt_dep"
- $echo " && rm -f $NXT_BUILD_DIR/$nxt_dep.tmp"
- }
- ;;
-
*)
nxt_gen_dep_flags() {
$echo "-MMD -MF $NXT_BUILD_DIR/$nxt_dep -MT $NXT_BUILD_DIR/$nxt_obj"
diff --git a/auto/cc/test b/auto/cc/test
index 9c9602db..34e4379e 100644
--- a/auto/cc/test
+++ b/auto/cc/test
@@ -46,45 +46,9 @@ then
$echo " + $NXT_CC_VERSION"
else
-if `/bin/sh -c "($CC -V)" 2>&1 | grep "Sun C" >> $NXT_AUTOCONF_ERR 2>&1`
-then
- NXT_CC_NAME=SunC
- $echo " + using Sun C compiler"
- NXT_CC_VERSION=`/bin/sh -c "($CC -V)" 2>&1 | grep "Sun C" 2>&1`
- $echo " + $NXT_CC_VERSION"
-
-else
-if `/bin/sh -c "($CC -qversion)" 2>&1 \
- | grep "^IBM XL" >> $NXT_AUTOCONF_ERR 2>&1`
-then
- NXT_CC_NAME=xlC
- $echo " + using AIX xlC compiler"
- NXT_CC_VERSION=`/bin/sh -c "($CC -qversion)" 2>&1 | grep "IBM XL" 2>&1`
- $echo " + $NXT_CC_VERSION"
-
-else
-if `/bin/sh -c "($CC -V)" 2>&1 | grep "Intel(R) C" >> $NXT_AUTOCONF_ERR 2>&1`
-then
- NXT_CC_NAME=ICC
- $echo " + using Intel C++ compiler"
- NXT_CC_VERSION=ICC
-
-else
-if `/bin/sh -c "($CC -v)" 2>&1 \
- | grep "Microsoft (R) 32-bit C/C" >> $NXT_AUTOCONF_ERR 2>&1`
-then
- NXT_CC_NAME=MSVC
- $echo " + using MS Visual C++ compiler"
- NXT_CC_VERSION=MSVC
-
-else
NXT_CC_NAME=cc
NXT_CC_VERSION=cc
-fi # MSVC
-fi # ICC
-fi # xlC
-fi # SunC
fi # Apple LLVM clang
fi # clang
fi # gcc
@@ -101,12 +65,12 @@ case $NXT_CC_NAME in
# Do not export symbols except explicitly marked with NXT_EXPORT.
NXT_CFLAGS="$NXT_CFLAGS -fvisibility=hidden"
- # c99/gnu99 conflict with Solaris XOPEN.
- #NXT_CFLAGS="$NXT_CFLAGS -std=gnu99"
+ NXT_CFLAGS="$NXT_CFLAGS -fno-strict-overflow"
+
+ NXT_CFLAGS="$NXT_CFLAGS -std=gnu11"
NXT_CFLAGS="$NXT_CFLAGS -O"
- #NXT_CFLAGS="$NXT_CFLAGS -O0"
- NXT_CFLAGS="$NXT_CFLAGS -W -Wall -Wextra"
+ NXT_CFLAGS="$NXT_CFLAGS -Wall -Wextra"
#NXT_CFLAGS="$NXT_CFLAGS -Wunused-result"
NXT_CFLAGS="$NXT_CFLAGS -Wno-unused-parameter"
@@ -115,12 +79,14 @@ case $NXT_CC_NAME in
# -O2 enables -fstrict-aliasing and -fstrict-overflow.
#NXT_CFLAGS="$NXT_CFLAGS -O2"
- #NXT_CFLAGS="$NXT_CFLAGS -Wno-strict-aliasing"
+ NXT_CFLAGS="$NXT_CFLAGS -fno-strict-aliasing"
#NXT_CFLAGS="$NXT_CFLAGS -fomit-frame-pointer"
#NXT_CFLAGS="$NXT_CFLAGS -momit-leaf-frame-pointer"
- # -Wstrict-overflow is supported by GCC 4.2+.
+ # While -Wstrict-overflow is supported by GCC 4.2+,
+ # at level 3 and above it is prone to give false
+ # positives.
#NXT_CFLAGS="$NXT_CFLAGS -Wstrict-overflow=5"
NXT_CFLAGS="$NXT_CFLAGS -Wmissing-prototypes"
@@ -141,17 +107,22 @@ case $NXT_CC_NAME in
# Do not export symbols except explicitly marked with NXT_EXPORT.
NXT_CFLAGS="$NXT_CFLAGS -fvisibility=hidden"
+ NXT_CFLAGS="$NXT_CFLAGS -fno-strict-overflow"
+
+ NXT_CFLAGS="$NXT_CFLAGS -std=gnu11"
+
NXT_CFLAGS="$NXT_CFLAGS -O"
- #NXT_CFLAGS="$NXT_CFLAGS -O0"
- NXT_CFLAGS="$NXT_CFLAGS -W -Wall -Wextra"
+ NXT_CFLAGS="$NXT_CFLAGS -Wall -Wextra"
#NXT_CFLAGS="$NXT_CFLAGS -Wunused-result"
NXT_CFLAGS="$NXT_CFLAGS -Wno-unused-parameter"
#NXT_CFLAGS="$NXT_CFLAGS -Wshorten-64-to-32"
NXT_CFLAGS="$NXT_CFLAGS -Wwrite-strings"
#NXT_CFLAGS="$NXT_CFLAGS -O2"
+ # strict-aliasing is always enabled by default in clang
+ NXT_CFLAGS="$NXT_CFLAGS -fno-strict-aliasing"
+
#NXT_CFLAGS="$NXT_CFLAGS -fomit-frame-pointer"
- NXT_CFLAGS="$NXT_CFLAGS -fstrict-aliasing"
NXT_CFLAGS="$NXT_CFLAGS -Wstrict-overflow=5"
NXT_CFLAGS="$NXT_CFLAGS -Wmissing-prototypes"
@@ -168,38 +139,6 @@ case $NXT_CC_NAME in
fi
;;
- SunC)
- nxt_have=NXT_SUNC . auto/have
-
- NXT_CFLAGS="$NXT_CFLAGS -fPIC"
- # Optimization.
- NXT_CFLAGS="$NXT_CFLAGS -O -fast"
- # Stop on warning.
- NXT_CFLAGS="$NXT_CFLAGS -errwarn=%all"
- # Debug.
- NXT_CFLAGS="$NXT_CFLAGS -g"
- ;;
-
- xlC)
- nxt_have=NXT_XLC . auto/have
-
- #NXT_CFLAGS="$NXT_CFLAGS -qalloca"
- # alloca support.
- NXT_CFLAGS="$NXT_CFLAGS -qlanglvl=extc99"
- # __thread support.
- NXT_CFLAGS="$NXT_CFLAGS -qtls"
- # Suppress warning
- # 1506-159 (E) Bit field type specified for XXX is not valid.
- # Type unsigned assumed.
- NXT_CFLAGS="$NXT_CFLAGS -qsuppress=1506-159"
- ;;
-
- ICC)
- ;;
-
- MSVC)
- ;;
-
*)
;;
diff --git a/auto/fuzzing b/auto/fuzzing
new file mode 100644
index 00000000..f792941b
--- /dev/null
+++ b/auto/fuzzing
@@ -0,0 +1,75 @@
+# Copyright (C) NGINX, Inc.
+
+
+if [ -n "$NXT_FUZZ" ]; then
+
+ # Fuzz-Test object files list.
+
+ $echo "NXT_FUZZ_OBJS = \\" >> $NXT_MAKEFILE
+
+ for nxt_src in $NXT_FUZZ_SRCS
+ do
+ nxt_obj=${nxt_src%.c}.o
+ $echo " $NXT_BUILD_DIR/$nxt_obj \\" >> $NXT_MAKEFILE
+ done
+
+
+ # Fuzz-Test executables.
+
+ cat << END >> $NXT_MAKEFILE
+
+.PHONY: fuzz
+fuzz: $NXT_BUILD_DIR/fuzz_basic \\
+ $NXT_BUILD_DIR/fuzz_http_controller \\
+ $NXT_BUILD_DIR/fuzz_http_h1p \\
+ $NXT_BUILD_DIR/fuzz_http_h1p_peer \\
+ $NXT_BUILD_DIR/fuzz_json
+
+$NXT_BUILD_DIR/fuzz_basic: \$(NXT_FUZZ_OBJS) \\
+ $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/fuzz_basic \\
+ \$(CFLAGS) $NXT_BUILD_DIR/fuzzing/nxt_basic_fuzz.o \\
+ $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
+ $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS \\
+ $NXT_FUZZ
+
+$NXT_BUILD_DIR/fuzz_http_controller: \$(NXT_FUZZ_OBJS) \\
+ $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/fuzz_http_controller \\
+ \$(CFLAGS) $NXT_BUILD_DIR/fuzzing/nxt_http_controller_fuzz.o \\
+ $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
+ $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS \\
+ $NXT_FUZZ
+
+$NXT_BUILD_DIR/fuzz_http_h1p: \$(NXT_FUZZ_OBJS) \\
+ $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/fuzz_http_h1p \\
+ \$(CFLAGS) $NXT_BUILD_DIR/fuzzing/nxt_http_h1p_fuzz.o \\
+ $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
+ $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS \\
+ $NXT_FUZZ
+
+$NXT_BUILD_DIR/fuzz_http_h1p_peer: \$(NXT_FUZZ_OBJS) \\
+ $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/fuzz_http_h1p_peer \\
+ \$(CFLAGS) $NXT_BUILD_DIR/fuzzing/nxt_http_h1p_peer_fuzz.o \\
+ $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
+ $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS \\
+ $NXT_FUZZ
+
+$NXT_BUILD_DIR/fuzz_json: \$(NXT_FUZZ_OBJS) \\
+ $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/fuzz_json \\
+ \$(CFLAGS) $NXT_BUILD_DIR/fuzzing/nxt_json_fuzz.o \\
+ $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
+ $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS \\
+ $NXT_FUZZ
+
+END
+
+fi
diff --git a/auto/help b/auto/help
index d23c67ed..6a6aee19 100644
--- a/auto/help
+++ b/auto/help
@@ -50,10 +50,12 @@ cat << END
--openssl enable OpenSSL library usage
- --njs enable NJS library usage
+ --njs enable njs library usage
--debug enable debug logging
+ --fuzz=ENGINE enable fuzz testing
+
python OPTIONS configure Python module
run "./configure python --help" to see available options
diff --git a/auto/make b/auto/make
index abfd41ad..f21a2dfc 100644
--- a/auto/make
+++ b/auto/make
@@ -10,10 +10,18 @@ $echo "creating $NXT_MAKEFILE"
cat << END > $NXT_MAKEFILE
+# Pretty print compiler etc actions...
+PP_CC := @echo ' CC '
+PP_AR := @echo ' AR '
+PP_LD := @echo ' LD '
+PP_VER := @echo ' VER '
+PP_SED := @echo ' SED '
+
CC = $CC
AR = $AR
-CFLAGS = $NXT_CFLAGS $NXT_CC_OPT $CFLAGS
+EXTRA_CFLAGS =
+CFLAGS = $NXT_CFLAGS $NXT_CC_OPT $CFLAGS \$(EXTRA_CFLAGS)
NXT_EXEC_LINK = $NXT_EXEC_LINK $NXT_LD_OPT
NXT_SHARED_LOCAL_LINK = $NXT_SHARED_LOCAL_LINK $NXT_LD_OPT
@@ -28,6 +36,47 @@ manpage: $NXT_BUILD_DIR/share/man/man8/unitd.8
END
+NXT_OS=$(uname -s)
+NXT_GNU_MAKE=$(make --version | grep GNU || true)
+
+# Requires GNU make. On OpenIndiana at least we have to use gmake
+if [ -n "$NXT_GNU_MAKE" ] || [ $NXT_OS = "SunOS" ]; then
+
+ cat << END >> $NXT_MAKEFILE
+# By default compiler etc output is hidden, use
+# make V=1 ...
+# to show it.
+V := 0
+
+v := @
+ifeq (\$V,1)
+ v :=
+endif
+
+# Optionally enable debugging builds with
+# make D=1 ...
+# -g is always used, this just changes the optimisation level.
+# On GCC this would be -Og, however according to the clang(1)
+# man page, -O0 'generates the most debuggable code'.
+D := 0
+
+ifeq (\$D,1)
+ CFLAGS += -O0
+endif
+
+# Optionally disable -Werror with
+# make E=0 ...
+E := 1
+
+ifeq (\$E,0)
+ CFLAGS += -Wno-error
+endif
+
+END
+
+fi
+
+
# The include paths list.
$echo -n "NXT_LIB_INCS =" >> $NXT_MAKEFILE
@@ -75,8 +124,10 @@ cat << END >> $NXT_MAKEFILE
include version
$NXT_VERSION_H: version
- $echo '#define NXT_VERSION "\$(NXT_VERSION)"' > $NXT_VERSION_H
- $echo '#define NXT_VERNUM \$(NXT_VERNUM)' >> $NXT_VERSION_H
+ \$(PP_VER) \$@ \(NXT_VERSION\)
+ \$(v)$echo '#define NXT_VERSION "\$(NXT_VERSION)"' > $NXT_VERSION_H
+ \$(PP_VER) \$@ \(NXT_VERNUM\)
+ \$(v)$echo '#define NXT_VERNUM \$(NXT_VERNUM)' >> $NXT_VERSION_H
END
@@ -88,23 +139,26 @@ cat << END >> $NXT_MAKEFILE
libnxt: $NXT_BUILD_DIR/lib/$NXT_LIB_SHARED $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
$NXT_BUILD_DIR/lib/$NXT_LIB_SHARED: \$(NXT_LIB_OBJS)
- \$(NXT_SHARED_LOCAL_LINK) -o \$@ \$(NXT_LIB_OBJS) \\
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_SHARED_LOCAL_LINK) -o \$@ \$(NXT_LIB_OBJS) \\
$NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC: \$(NXT_LIB_OBJS)
- $NXT_STATIC_LINK \$@ \$(NXT_LIB_OBJS)
+ \$(PP_AR) \$@
+ \$(v)$NXT_STATIC_LINK \$@ \$(NXT_LIB_OBJS)
$NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC: \$(NXT_LIB_UNIT_OBJS) \\
$NXT_BUILD_DIR/share/pkgconfig/unit.pc \\
$NXT_BUILD_DIR/share/pkgconfig/unit-uninstalled.pc
- $NXT_STATIC_LINK \$@ \$(NXT_LIB_UNIT_OBJS)
+ \$(PP_AR) \$@
+ \$(v)$NXT_STATIC_LINK \$@ \$(NXT_LIB_UNIT_OBJS)
END
# Object files.
-for nxt_src in $NXT_LIB_SRCS $NXT_TEST_SRCS $NXT_LIB_UNIT_SRCS \
+for nxt_src in $NXT_LIB_SRCS $NXT_TEST_SRCS $NXT_FUZZ_SRCS $NXT_LIB_UNIT_SRCS \
src/test/nxt_unit_app_test.c \
src/test/nxt_unit_websocket_chat.c \
src/test/nxt_unit_websocket_echo.c
@@ -116,7 +170,8 @@ do
cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H
- \$(CC) -c \$(CFLAGS) \$(NXT_LIB_INCS) $NXT_LIB_AUX_CFLAGS \\
+ \$(PP_CC) \$@
+ \$(v)\$(CC) -c \$(CFLAGS) \$(NXT_LIB_INCS) $NXT_LIB_AUX_CFLAGS \\
-o $NXT_BUILD_DIR/$nxt_obj \\
$nxt_dep_flags \\
$nxt_src
@@ -136,7 +191,8 @@ nxt_dep_post=`nxt_gen_dep_post`
cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H
- \$(CC) -c \$(CFLAGS) -DNXT_NCQ_TEST=1 \$(NXT_LIB_INCS) $NXT_LIB_AUX_CFLAGS \\
+ \$(PP_CC) \$@
+ \$(v)\$(CC) -c \$(CFLAGS) -DNXT_NCQ_TEST=1 \$(NXT_LIB_INCS) $NXT_LIB_AUX_CFLAGS \\
-o $NXT_BUILD_DIR/$nxt_obj \\
$nxt_dep_flags \\
$nxt_src
@@ -154,7 +210,8 @@ nxt_dep_post=`nxt_gen_dep_post`
cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H
- \$(CC) -c \$(CFLAGS) -DNXT_NCQ_TEST=0 \$(NXT_LIB_INCS) $NXT_LIB_AUX_CFLAGS \\
+ \$(PP_CC) \$@
+ \$(v)\$(CC) -c \$(CFLAGS) -DNXT_NCQ_TEST=0 \$(NXT_LIB_INCS) $NXT_LIB_AUX_CFLAGS \\
-o $NXT_BUILD_DIR/$nxt_obj \\
$nxt_dep_flags \\
$nxt_src
@@ -192,14 +249,16 @@ tests: $NXT_BUILD_DIR/tests $NXT_BUILD_DIR/utf8_file_name_test \\
$NXT_BUILD_DIR/tests: \$(NXT_TEST_OBJS) \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
- \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/tests \\
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/tests \\
\$(CFLAGS) \$(NXT_TEST_OBJS) \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
$NXT_BUILD_DIR/utf8_file_name_test: $NXT_LIB_UTF8_FILE_NAME_TEST_SRCS \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
- \$(CC) \$(CFLAGS) \$(NXT_LIB_INCS) $NXT_LIB_AUX_CFLAGS \\
+ \$(PP_LD) \$@
+ \$(v)\$(CC) \$(CFLAGS) \$(NXT_LIB_INCS) $NXT_LIB_AUX_CFLAGS \\
-o $NXT_BUILD_DIR/utf8_file_name_test \\
$NXT_LIB_UTF8_FILE_NAME_TEST_SRCS \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
@@ -207,21 +266,24 @@ $NXT_BUILD_DIR/utf8_file_name_test: $NXT_LIB_UTF8_FILE_NAME_TEST_SRCS \\
$NXT_BUILD_DIR/ncq_test: $NXT_BUILD_DIR/src/test/nxt_ncq_test.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
- \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/ncq_test \\
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/ncq_test \\
\$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_ncq_test.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
$NXT_BUILD_DIR/vbcq_test: $NXT_BUILD_DIR/src/test/nxt_vbcq_test.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
- \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/vbcq_test \\
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/vbcq_test \\
\$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_vbcq_test.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
$NXT_BUILD_DIR/unit_app_test: $NXT_BUILD_DIR/src/test/nxt_unit_app_test.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC
- \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/unit_app_test \\
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/unit_app_test \\
\$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_unit_app_test.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
@@ -229,7 +291,8 @@ $NXT_BUILD_DIR/unit_app_test: $NXT_BUILD_DIR/src/test/nxt_unit_app_test.o \\
$NXT_BUILD_DIR/unit_websocket_chat: \\
$NXT_BUILD_DIR/src/test/nxt_unit_websocket_chat.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC
- \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/unit_websocket_chat \\
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/unit_websocket_chat \\
\$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_unit_websocket_chat.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
@@ -237,7 +300,8 @@ $NXT_BUILD_DIR/unit_websocket_chat: \\
$NXT_BUILD_DIR/unit_websocket_echo: \\
$NXT_BUILD_DIR/src/test/nxt_unit_websocket_echo.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC
- \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/unit_websocket_echo \\
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/unit_websocket_echo \\
\$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_unit_websocket_echo.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
@@ -296,7 +360,8 @@ cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/sbin/$NXT_DAEMON: $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
\$(NXT_OBJS)
- \$(NXT_EXEC_LINK) -o \$@ \$(CFLAGS) \\
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_EXEC_LINK) -o \$@ \$(CFLAGS) \\
\$(NXT_OBJS) $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
@@ -309,7 +374,8 @@ cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/share/man/man8/unitd.8: docs/man/man8/unitd.8.in \\
$NXT_BUILD_DIR/include/nxt_auto_config.h
- sed -e "s|%%ERROR_LOG_PATH%%|$NXT_LOG|" \\
+ \$(PP_SED) \$@
+ \$(v)sed -e "s|%%ERROR_LOG_PATH%%|$NXT_LOG|" \\
-e "s|%%PID_PATH%%|$NXT_PID|" \\
-e "s|%%SOCKET_PATH%%|$NXT_CONTROL|" \\
< docs/man/man8/unitd.8.in > \$@
@@ -328,7 +394,8 @@ do
cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H
- \$(CC) -c \$(CFLAGS) \$(NXT_INCS) \\
+ \$(PP_CC) \$@
+ \$(v)\$(CC) -c \$(CFLAGS) \$(NXT_INCS) \\
$NXT_LIB_AUX_CFLAGS \\
-o $NXT_BUILD_DIR/$nxt_obj \\
$nxt_dep_flags \\
@@ -367,8 +434,6 @@ ${NXT_DAEMON}-install: $NXT_DAEMON install-check
|| install -d \$(DESTDIR)$NXT_STATEDIR
test -d \$(DESTDIR)$NXT_LOGDIR \
|| install -d \$(DESTDIR)$NXT_LOGDIR
- test -d \$(DESTDIR)$NXT_RUNSTATEDIR \
- || install -d \$(DESTDIR)$NXT_RUNSTATEDIR
manpage-install: manpage install-check
test -d \$(DESTDIR)$NXT_MANDIR/man8 \
@@ -441,7 +506,8 @@ END
cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/share/pkgconfig/unit.pc: src/unit.pc.in
- sed -e "s|@PREFIX@|$NXT_PREFIX|" \\
+ \$(PP_SED) \$@
+ \$(v)sed -e "s|@PREFIX@|$NXT_PREFIX|" \\
-e "s|@LIBDIR@|$NXT_LIBDIR|" \\
-e "s|@CFLAGS@|-I$NXT_INCLUDEDIR|" \\
-e "s|@VERSION@|\$(NXT_VERSION)|" \\
@@ -451,7 +517,8 @@ $NXT_BUILD_DIR/share/pkgconfig/unit.pc: src/unit.pc.in
< src/unit.pc.in > \$@
$NXT_BUILD_DIR/share/pkgconfig/unit-uninstalled.pc: src/unit.pc.in
- sed -e "s|@PREFIX@|$(pwd)/$NXT_BUILD_DIR|" \\
+ \$(PP_SED) \$@
+ \$(v)sed -e "s|@PREFIX@|$(pwd)/$NXT_BUILD_DIR|" \\
-e "s|@LIBDIR@|$(pwd)/$NXT_BUILD_DIR/lib|" \\
-e "s|@CFLAGS@|-I$(pwd)/src -I$(pwd)$NXT_BUILD_DIR/include|" \\
-e "s|@VERSION@|\$(NXT_VERSION)|" \\
@@ -472,4 +539,16 @@ include $NXT_MAKEFILE
clean:
rm -rf $NXT_BUILD_DIR *.dSYM Makefile
+.PHONY: help
+help:
+ @echo "Variables to control make/build behaviour:"
+ @echo
+ @echo " make V=1 ... - Enables verbose output"
+ @echo " make D=1 ... - Enables debug builds (-O0)"
+ @echo " make E=0 ... - Disables -Werror"
+ @echo
+ @echo " make EXTRA_CFLAGS= ... - Add extra compiler options"
+ @echo
+ @echo " Variables can be combined."
+
END
diff --git a/auto/modules/java b/auto/modules/java
index b5c8d70a..4bb34ae7 100644
--- a/auto/modules/java
+++ b/auto/modules/java
@@ -238,7 +238,7 @@ cat << END > $NXT_JAVA_JARS
static const char *nxt_java_system_jars[] = {
END
-NXT_TOMCAT_VERSION=9.0.86
+NXT_TOMCAT_VERSION=9.0.93
NXT_JAR_VERSION=$NXT_TOMCAT_VERSION
@@ -284,7 +284,7 @@ static const char *nxt_java_unit_jars[] = {
"$NXT_UNIT_JAR",
END
-NXT_JAR_VERSION=9.4.54.v20240208
+NXT_JAR_VERSION=9.4.56.v20240826
NXT_JAR_NAMESPACE=org/eclipse/jetty/
NXT_JAR_NAME=jetty-util
@@ -297,7 +297,7 @@ NXT_JAR_NAME=jetty-http
. auto/modules/java_get_jar
NXT_JAR_NAME=classgraph
-NXT_JAR_VERSION=4.8.165
+NXT_JAR_VERSION=4.8.175
NXT_JAR_NAMESPACE=io/github/classgraph/
. auto/modules/java_get_jar
@@ -371,8 +371,9 @@ for nxt_src in $NXT_JAVA_MODULE_SRCS; do
cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H
- mkdir -p $NXT_BUILD_DIR/src/java
- \$(CC) -c \$(CFLAGS) -DNXT_JAVA_MOUNTS_H=\"$NXT_JAVA_MOUNTS_HEADER\" \\
+ \$(v)mkdir -p $NXT_BUILD_DIR/src/java
+ \$(PP_CC) \$@
+ \$(v)\$(CC) -c \$(CFLAGS) -DNXT_JAVA_MOUNTS_H=\"$NXT_JAVA_MOUNTS_HEADER\" \\
\$(NXT_INCS) $NXT_JAVA_INCLUDE \\
$nxt_dep_flags \\
-o $NXT_BUILD_DIR/$nxt_obj $nxt_src
@@ -525,7 +526,8 @@ ${NXT_JAVA_MODULE}: $NXT_BUILD_DIR/lib/unit/modules/${NXT_JAVA_MODULE}.unit.so \
$NXT_BUILD_DIR/$NXT_WS_API_JAR
$NXT_BUILD_DIR/lib/unit/modules/${NXT_JAVA_MODULE}.unit.so: $nxt_objs
- \$(NXT_MODULE_LINK) -o \$@ $nxt_objs $NXT_JAVA_LDFLAGS $NXT_LD_OPT
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_MODULE_LINK) -o \$@ $nxt_objs $NXT_JAVA_LDFLAGS $NXT_LD_OPT
install: ${NXT_JAVA_MODULE}-install
diff --git a/auto/modules/java_jar.sha512 b/auto/modules/java_jar.sha512
index a689b901..14516b8c 100644
--- a/auto/modules/java_jar.sha512
+++ b/auto/modules/java_jar.sha512
@@ -1,14 +1,14 @@
-d0c17607eee55e181baa03f1abb2cf77f50e5114c471c2031607206768d8549c74ebb0a276d87dd3f8ea44db5e54e56087311c229ba18ad6013c388fc861beed classgraph-4.8.165.jar
+75eb34c016ce4eb4c7a8413ed06570b491f9f2fb852b19097d0e7692c746052da466d6e86810a9c899890a87f49d5c94cffd724b15d47b006e34e7c334437efc classgraph-4.8.175.jar
ab441acf5551a7dc81c353eaccb3b3df9e89a48987294d19e39acdb83a5b640fcdff7414cee29f5b96eaa8826647f1d5323e185018fe33a64c402d69c73c9158 ecj-3.26.0.jar
-6e1d6fdffcb2acf8daa9ce5b3ad973526a30b3556dc8e950254c68c64cd70e101b28a8acac41b3bd74de6b9c8eac10676afdc3c58ccb1f61a74323721592e0b5 jetty-http-9.4.54.v20240208.jar
-780ee47a8722bdfb4b159f440acbfb69afdb73cc329906392b10eba8d30c564aa6377fab129e61b85a56945f01c4403913c80b6ce3158d108d88a3ad64527f06 jetty-server-9.4.54.v20240208.jar
-fbe9cf7efeba9f29297f75de3f1c2d98f0e02816a1dc9e6eaddcabb84c3a699a9332218c532017a3707ec57f4f99066bc671708bde4ec84dd873b8403422d7e9 jetty-util-9.4.54.v20240208.jar
-1aa9024f49f74b44252f7c90d00bbfdd6aae4e96866708a0c2325def0314c8b7e5ad2fd17bb6b4b135eb2c513fe74b5b591d4b0fe3d1921192cfecadf140b7fa tomcat-api-9.0.86.jar
-60a9991ff7b95ef4edfac57cd7c18b6c5177d9aee4f775b5794b5833246b928e1a685b80785babd2f450e3cd18383c58b843b0b5e742252a37044494bc90d608 tomcat-el-api-9.0.86.jar
-b09cbfb834564cc7025ffad7bf069569989d3efa3bd176696045aea08bfb53622aa1aece5c84ea4371f0193d4fd477b9179999399e75d04205b219a3ab19bb66 tomcat-jasper-9.0.86.jar
-1431469e91debc0ffcf820df2973782221be955dac0739a77d9030ac619cde96320970cb27eb2ff9de1e6bde3227a70b1645d1934da8e10fe2b32c069d33afec tomcat-jasper-el-9.0.86.jar
-1ad9ebc1c49beb243c18ab2c459dbd54cab9514223c44b5c7e05d53d290c64c49990fc0fe276c66b1f6f6625acca651fdcb4b7df9e23fb0cc43bc05ad3900798 tomcat-jsp-api-9.0.86.jar
-d30055aabf5d45ad350e01702ed0ff4bfbcdd14bee40e1e8a9a7690719816aff019ca961b7970234eaba673c3c13f5cea5dbf1bc0612ce4e8f7de795af2f170d tomcat-juli-9.0.86.jar
-d7fa7d7bf35b35b7bb925cce6284e2f750e8e94ee54057daff4e369a32b361e6044e9011048a9dff54b12371ee785d34e82306b60ffae8add76602071e5fc9c5 tomcat-servlet-api-9.0.86.jar
-b4a268b79fbfcd610ea5d14446ef71ad5f2ad3da247ae148669e3082ff5fd7f7256a2ecdf2529e4280ed393f53c3a7f6d09a5c38d5653b30b25ab3c4b74ed732 tomcat-util-9.0.86.jar
-f2086356c8eca5cfe890232056ce30378422d3994c499845f52ec8641453af02041ae31ffdcb567bb998f0f24465d1ab65456b23e8f781058efdc01658c7252d tomcat-util-scan-9.0.86.jar
+48d5512d378d58c3df93bbe1c68d5a4b097e2dc7466992393e0731414dc0fe449312e067d0874e503dd27cb9b6a1f2da0d1f1569a7b484c1f12bd533afbe2723 jetty-http-9.4.56.v20240826.jar
+dc0d1f05a7f8477e1f7f57adb307224aadcb1e1fed6f7e5df72d9b84437bf75276c3b0f13da9d079c541ad94601bdbd7314c61477b224dbbdc93a6d5b9f98478 jetty-server-9.4.56.v20240826.jar
+025751c45cd8a23f1b436eaa1849af2421f78a2a82bc07c4175df8b4ec5dfc15247036194156897aafb8b0ec83406bbaa25e4092fea5ddd3b900da0ffdfaae19 jetty-util-9.4.56.v20240826.jar
+9ea72285b395592dbee58339e3a2a9a8e9d9b623f9c37eace3cb45842107469880d3556a18023f870ef4fcad007705652ff300c12f57fa13af9a8cd666f545de tomcat-api-9.0.93.jar
+3a91b9dda9d015aaf0c931847ba40a17bd77102ec0b596a1406142dfac556ab95fa5e0fe554743757d80f28436bcd05f28d2716ca62204bded81f0ed98ac2bf8 tomcat-el-api-9.0.93.jar
+d50a0d26c6b8ee2b855df54e7a2647f423181f7fa45fe67daf33b8828122b891cacc7bd8312ae72c05a20708f2b405053045d71939427e1526796b02432db72d tomcat-jasper-9.0.93.jar
+4886719cbe70ec7bd9190f691d0a85bc84a343ecdb969eb946b0718f0a8bd670f9bc771a309d2d90b23dae06be1f51d3049df7ed157c90b8f4d724a1064eb21b tomcat-jasper-el-9.0.93.jar
+17696c91cb90c71dbebac36cebd5205c001a4ebd4df22eeef0762d818dde16f8b6e8ccfa28301ea2fa6efb001ea2f428a813a2aea1b593f08c7c62d31884571c tomcat-jsp-api-9.0.93.jar
+cf9582e6fbc3dae8bdc55e4e687fd2dbc6f44d1bfce77e2117f8673b011d69c07ade7f715493e1d14e205d122284114edc2fe9f19888933645931a093dd26a01 tomcat-juli-9.0.93.jar
+280c000ec81893a87feaf7db46702d0b13599e82aedf1540597f69c609bd20a48d04f887131bc464c7f715911aa8c3b44a3502e1c736e5c7575765c419fdb064 tomcat-servlet-api-9.0.93.jar
+55a47b7bc9cc3dc47d93f7850d60375d900f7aac3a7b16bdd06e01e4523672ea93cdac8660825307c6699bda8bb5e4f668b2d1d42967194dddceeb56b1acc004 tomcat-util-9.0.93.jar
+db933442c1cbbc1e277cce2a374b17b37aea14b3a7f1a42f1bf7152af8edc0d876ee25ae5087f31e0b06474d1e2a134de36f3e3eaca0f04dac734deeecfd773e tomcat-util-scan-9.0.93.jar
diff --git a/auto/modules/perl b/auto/modules/perl
index 3c88ef0e..86232adc 100644
--- a/auto/modules/perl
+++ b/auto/modules/perl
@@ -67,6 +67,12 @@ if /bin/sh -c "$NXT_PERL -MConfig -e 'print \"Perl version: \",
| sed -e 's/-arch i386//' -e 's/-arch x86_64//'`
fi
+ if [ "$NXT_CC_NAME" = "clang" ]; then
+ # Perl's CFLAGS has -fwrapv which under clang discards our
+ # -fno-strict-overflow resulting in an unused argument error
+ NXT_PERL_CFLAGS="$NXT_PERL_CFLAGS -Qunused-arguments"
+ fi
+
nxt_feature="Perl"
nxt_feature_name=""
nxt_feature_run=no
@@ -165,8 +171,9 @@ for nxt_src in $NXT_PERL_MODULE_SRCS; do
cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H
- mkdir -p $NXT_BUILD_DIR/src/perl
- \$(CC) -c \$(CFLAGS) $NXT_PERL_CFLAGS \$(NXT_INCS) $NXT_PERL_INCLUDE \\
+ \$(v)mkdir -p $NXT_BUILD_DIR/src/perl
+ \$(PP_CC) \$@
+ \$(v)\$(CC) -c \$(CFLAGS) $NXT_PERL_CFLAGS \$(NXT_INCS) $NXT_PERL_INCLUDE \\
$nxt_dep_flags \\
-o $NXT_BUILD_DIR/$nxt_obj $nxt_src
$nxt_dep_post
@@ -188,7 +195,8 @@ all: ${NXT_PERL_MODULE}
${NXT_PERL_MODULE}: $NXT_BUILD_DIR/lib/unit/modules/${NXT_PERL_MODULE}.unit.so
$NXT_BUILD_DIR/lib/unit/modules/${NXT_PERL_MODULE}.unit.so: $nxt_objs
- \$(NXT_MODULE_LINK) -o \$@ $nxt_objs $NXT_PERL_LDOPTS $NXT_LD_OPT
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_MODULE_LINK) -o \$@ $nxt_objs $NXT_PERL_LDOPTS $NXT_LD_OPT
install: ${NXT_PERL_MODULE}-install
diff --git a/auto/modules/php b/auto/modules/php
index a0f5379c..5bc7401b 100644
--- a/auto/modules/php
+++ b/auto/modules/php
@@ -244,7 +244,8 @@ for nxt_src in $NXT_PHP_MODULE_SRCS; do
cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H
- \$(CC) -c \$(CFLAGS) $NXT_PHP_ADDITIONAL_FLAGS \$(NXT_INCS) \\
+ \$(PP_CC) \$@
+ \$(v)\$(CC) -c \$(CFLAGS) $NXT_PHP_ADDITIONAL_FLAGS \$(NXT_INCS) \\
$NXT_PHP_INCLUDE -DNXT_ZEND_SIGNAL_STARTUP=$NXT_ZEND_SIGNAL_STARTUP \\
$nxt_dep_flags \\
-o $NXT_BUILD_DIR/$nxt_obj $nxt_src
@@ -268,7 +269,8 @@ all: ${NXT_PHP_MODULE}
${NXT_PHP_MODULE}: $NXT_BUILD_DIR/lib/unit/modules/${NXT_PHP_MODULE}.unit.so
$NXT_BUILD_DIR/lib/unit/modules/${NXT_PHP_MODULE}.unit.so: $nxt_objs
- \$(NXT_MODULE_LINK) -o \$@ \\
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_MODULE_LINK) -o \$@ \\
$nxt_objs ${NXT_PHP_LIB} ${NXT_PHP_LDFLAGS} $NXT_LD_OPT
diff --git a/auto/modules/python b/auto/modules/python
index dfd632a1..05dc5132 100644
--- a/auto/modules/python
+++ b/auto/modules/python
@@ -191,8 +191,9 @@ for nxt_src in $NXT_PYTHON_MODULE_SRCS; do
cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H
- mkdir -p $NXT_BUILD_DIR/src/python
- \$(CC) -c \$(CFLAGS) -DNXT_PYTHON_MOUNTS_H=\"$NXT_PYTHON_MOUNTS_HEADER\" \\
+ \$(v)mkdir -p $NXT_BUILD_DIR/src/python
+ \$(PP_CC) \$@
+ \$(v)\$(CC) -c \$(CFLAGS) -DNXT_PYTHON_MOUNTS_H=\"$NXT_PYTHON_MOUNTS_HEADER\" \\
\$(NXT_INCS) $NXT_PYTHON_INCLUDE \\
$nxt_dep_flags \\
-o $NXT_BUILD_DIR/$nxt_obj $nxt_src
@@ -216,7 +217,8 @@ all: ${NXT_PYTHON_MODULE}
${NXT_PYTHON_MODULE}: $NXT_BUILD_DIR/lib/unit/modules/${NXT_PYTHON_MODULE}.unit.so
$NXT_BUILD_DIR/lib/unit/modules/${NXT_PYTHON_MODULE}.unit.so: $nxt_objs
- \$(NXT_MODULE_LINK) -o \$@ \\
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_MODULE_LINK) -o \$@ \\
$nxt_objs $NXT_PYTHON_LIBS $NXT_PYTHON_LDFLAGS $NXT_LD_OPT
diff --git a/auto/modules/ruby b/auto/modules/ruby
index 7a7c9bd3..331e2085 100644
--- a/auto/modules/ruby
+++ b/auto/modules/ruby
@@ -230,8 +230,9 @@ for nxt_src in $NXT_RUBY_MODULE_SRCS; do
cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H
- mkdir -p $NXT_BUILD_DIR/src/ruby
- \$(CC) -c \$(CFLAGS) $NXT_RUBY_CFLAGS -DNXT_RUBY_MOUNTS_H=\"$NXT_RUBY_MOUNTS_HEADER\" \\
+ \$(v)mkdir -p $NXT_BUILD_DIR/src/ruby
+ \$(PP_CC) \$@
+ \$(v)\$(CC) -c \$(CFLAGS) $NXT_RUBY_CFLAGS -DNXT_RUBY_MOUNTS_H=\"$NXT_RUBY_MOUNTS_HEADER\" \\
\$(NXT_INCS) $NXT_RUBY_INCPATH \\
$nxt_dep_flags \\
-o \$@ $nxt_src
@@ -254,7 +255,8 @@ all: ${NXT_RUBY_MODULE}
${NXT_RUBY_MODULE}: $NXT_BUILD_DIR/lib/unit/modules/${NXT_RUBY_MODULE}.unit.so
$NXT_BUILD_DIR/lib/unit/modules/${NXT_RUBY_MODULE}.unit.so: $nxt_objs
- \$(NXT_MODULE_LINK) -o \$@ $nxt_objs $NXT_RUBY_LIBS $NXT_LD_OPT
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_MODULE_LINK) -o \$@ $nxt_objs $NXT_RUBY_LIBS $NXT_LD_OPT
install: ${NXT_RUBY_MODULE}-install
diff --git a/auto/modules/wasm b/auto/modules/wasm
index 1f388de6..ad672a1e 100644
--- a/auto/modules/wasm
+++ b/auto/modules/wasm
@@ -63,8 +63,7 @@ NXT_WASM_LDFLAGS=
if [ "$NXT_WASM_RUNTIME" = "wasmtime" ]; then
NXT_WASM_LDFLAGS=-lwasmtime
fi
-NXT_WASM_ADDITIONAL_FLAGS="-fno-strict-aliasing \
- -Wno-missing-field-initializers \
+NXT_WASM_ADDITIONAL_FLAGS="-Wno-missing-field-initializers \
-DNXT_HAVE_WASM_$(echo ${NXT_WASM_RUNTIME} | tr 'a-z' 'A-Z') \
"
@@ -161,8 +160,9 @@ for nxt_src in $NXT_WASM_MODULE_SRCS; do
cat << END >> $NXT_MAKEFILE
$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H
- mkdir -p $NXT_BUILD_DIR/src/wasm
- \$(CC) -c \$(CFLAGS) $NXT_WASM_ADDITIONAL_FLAGS \$(NXT_INCS) \\
+ \$(v)mkdir -p $NXT_BUILD_DIR/src/wasm
+ \$(PP_CC) \$@
+ \$(v)\$(CC) -c \$(CFLAGS) $NXT_WASM_ADDITIONAL_FLAGS \$(NXT_INCS) \\
-I$NXT_WASM_INCLUDE_PATH \\
$nxt_dep_flags \\
-o $NXT_BUILD_DIR/$nxt_obj $nxt_src
@@ -186,7 +186,8 @@ all: ${NXT_WASM_MODULE}
${NXT_WASM_MODULE}: $NXT_BUILD_DIR/lib/unit/modules/${NXT_WASM_MODULE}.unit.so
$NXT_BUILD_DIR/lib/unit/modules/${NXT_WASM_MODULE}.unit.so: $nxt_objs
- \$(NXT_MODULE_LINK) -o \$@ \\
+ \$(PP_LD) \$@
+ \$(v)\$(NXT_MODULE_LINK) -o \$@ \\
$nxt_objs -L${NXT_WASM_LIB_PATH} ${NXT_WASM_LDFLAGS} $NXT_LD_OPT
diff --git a/auto/modules/wasm-wasi-component b/auto/modules/wasm-wasi-component
index bfb6ffcb..287d2707 100644
--- a/auto/modules/wasm-wasi-component
+++ b/auto/modules/wasm-wasi-component
@@ -82,15 +82,22 @@ fi
$echo " + $NXT_WCM_MODULE module: $NXT_WCM_MOD_NAME"
-NXT_OS=$(uname -o)
+NXT_OS=$(uname -s)
if [ $NXT_OS = "Darwin" ]; then
- NXT_CARGO_CMD="cargo rustc --release --manifest-path src/wasm-wasi-component/Cargo.toml -- --emit link=target/release/libwasm_wasi_component.so -C link-args='-undefined dynamic_lookup'"
+ NXT_CARGO_CMD="cargo rustc --release --manifest-path src/wasm-wasi-component/Cargo.toml -- --emit link=target/release/libwasm_wasi_component.so -C link-args='-undefined dynamic_lookup'"
else
- NXT_CARGO_CMD="cargo build --release --manifest-path src/wasm-wasi-component/Cargo.toml"
+ NXT_CARGO_CMD="cargo build --release --manifest-path src/wasm-wasi-component/Cargo.toml"
fi
+NXT_WCM_DEPS=" \
+ build/src/nxt_unit.o \
+ src/wasm-wasi-component/build.rs \
+ src/wasm-wasi-component/wrapper.h \
+ src/wasm-wasi-component/src/lib.rs \
+"
+
cat << END >> $NXT_MAKEFILE
.PHONY: ${NXT_WCM_MODULE}
@@ -101,8 +108,10 @@ all: ${NXT_WCM_MODULE}
${NXT_WCM_MODULE}: ${NXT_WCM_MOD_CARGO}
-${NXT_WCM_MOD_CARGO}: build/src/nxt_unit.o
+${NXT_WCM_MOD_CARGO}: ${NXT_WCM_DEPS}
$NXT_CARGO_CMD
+ @install -p $NXT_WCM_MOD_CARGO \\
+ build/lib/unit/modules/${NXT_WCM_MOD_NAME}
install: ${NXT_WCM_MODULE}-install
diff --git a/auto/njs b/auto/njs
index c54a27c7..0a911ec2 100644
--- a/auto/njs
+++ b/auto/njs
@@ -18,15 +18,15 @@ else
NXT_NJS_LIBS="-lnjs"
fi
-nxt_feature="NJS"
+nxt_feature="njs"
nxt_feature_name=NXT_HAVE_NJS
nxt_feature_run=no
nxt_feature_incs="$NXT_NJS_CFLAGS $NXT_NJS_AUX_CFLAGS"
nxt_feature_libs="$NXT_NJS_LIBS $NXT_NJS_AUX_LIBS"
nxt_feature_test="#include <njs.h>
- #if NJS_VERSION_NUMBER < 0x000800
- # error NJS < 0.8.0 is not supported.
+ #if NJS_VERSION_NUMBER < 0x000803
+ # error njs < 0.8.3 is not supported.
#endif
int main(void) {
@@ -44,7 +44,7 @@ nxt_feature_test="#include <njs.h>
if [ $nxt_found = no ]; then
$echo
- $echo $0: error: no NJS library \>= 0.8.0 found.
+ $echo $0: error: no njs library \>= 0.8.3 found.
$echo
exit 1;
fi
diff --git a/auto/options b/auto/options
index 0550c699..5be1ebe1 100644
--- a/auto/options
+++ b/auto/options
@@ -42,6 +42,8 @@ NXT_TEST_BUILD_HPUX_SENDFILE=NO
NXT_TESTS=NO
+NXT_FUZZ=
+
NXT_HELP=NO
for nxt_option
@@ -125,6 +127,8 @@ do
--tests) NXT_TESTS=YES ;;
+ --fuzz=*) NXT_FUZZ="$value" ;;
+
--help)
. auto/help
exit 0
diff --git a/auto/sched b/auto/sched
new file mode 100644
index 00000000..a6a4499b
--- /dev/null
+++ b/auto/sched
@@ -0,0 +1,19 @@
+# Copyright (C) Andrew Clayton
+# Copyright (C) NGINX, Inc.
+
+
+nxt_feature="Linux sched_getaffinity()"
+nxt_feature_name=NXT_HAVE_LINUX_SCHED_GETAFFINITY
+nxt_feature_run=no
+nxt_feature_incs=
+nxt_feature_libs=
+nxt_feature_test="#define _GNU_SOURCE
+ #include <sched.h>
+
+ int main(void) {
+ cpu_set_t set;
+
+ sched_getaffinity(0, sizeof(set), &set);
+ return 0;
+ }"
+. auto/feature
diff --git a/auto/shmem b/auto/shmem
index c434a58f..cc85d140 100644
--- a/auto/shmem
+++ b/auto/shmem
@@ -24,8 +24,7 @@ nxt_feature_test="#include <sys/mman.h>
shm_unlink(name);
- int fd = shm_open(name, O_CREAT | O_EXCL | O_RDWR,
- S_IRUSR | S_IWUSR);
+ int fd = shm_open(name, O_CREAT | O_EXCL | O_RDWR, 0600);
if (fd == -1)
return 1;
@@ -68,7 +67,7 @@ if [ $nxt_found = no ]; then
shm_unlink(name);
int fd = shm_open(name, O_CREAT | O_EXCL | O_RDWR,
- S_IRUSR | S_IWUSR);
+ 0600);
if (fd == -1)
return 1;
@@ -95,7 +94,7 @@ nxt_feature_test="#include <sys/mman.h>
#include <sys/stat.h>
int main(void) {
- int fd = shm_open(SHM_ANON, O_RDWR, S_IRUSR | S_IWUSR);
+ int fd = shm_open(SHM_ANON, O_RDWR, 0600);
if (fd == -1)
return 1;
diff --git a/auto/sources b/auto/sources
index 6ee4d87b..dfabf7cf 100644
--- a/auto/sources
+++ b/auto/sources
@@ -41,7 +41,6 @@ NXT_LIB_SRCS=" \
src/nxt_murmur_hash.c \
src/nxt_lvlhsh.c \
src/nxt_array.c \
- src/nxt_vector.c \
src/nxt_list.c \
src/nxt_buf.c \
src/nxt_buf_pool.c \
@@ -308,6 +307,15 @@ if [ $NXT_TESTS = YES ]; then
fi
+NXT_FUZZ_SRCS=" \
+ fuzzing/nxt_basic_fuzz.c \
+ fuzzing/nxt_http_controller_fuzz.c \
+ fuzzing/nxt_http_h1p_fuzz.c \
+ fuzzing/nxt_http_h1p_peer_fuzz.c \
+ fuzzing/nxt_json_fuzz.c \
+"
+
+
NXT_SRCS=" \
src/nxt_main.c \
"
diff --git a/auto/summary b/auto/summary
index 3aa41669..b6caee6c 100644
--- a/auto/summary
+++ b/auto/summary
@@ -29,11 +29,13 @@ Unit configuration summary:
Unix domain sockets support: $NXT_UNIX_DOMAIN
TLS support: ............... $NXT_OPENSSL
Regex support: ............. $NXT_REGEX
- NJS support: ............... $NXT_NJS
+ njs support: ............... $NXT_NJS
process isolation: ......... $NXT_ISOLATION
cgroupv2: .................. $NXT_HAVE_CGROUP
debug logging: ............. $NXT_DEBUG
+ fuzz engine: ............... "$NXT_FUZZ"
+
END