Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): extend the documentation for the test ...



details:   https://anonhg.NetBSD.org/src/rev/797ad6350f4c
branches:  trunk
changeset: 938040:797ad6350f4c
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Aug 31 18:57:41 2020 +0000

description:
make(1): extend the documentation for the test variants

diffstat:

 usr.bin/make/test-variants.sh |  30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diffs (71 lines):

diff -r 7c3c1bf512fb -r 797ad6350f4c usr.bin/make/test-variants.sh
--- a/usr.bin/make/test-variants.sh     Mon Aug 31 17:54:18 2020 +0000
+++ b/usr.bin/make/test-variants.sh     Mon Aug 31 18:57:41 2020 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $NetBSD: test-variants.sh,v 1.2 2020/08/31 17:25:29 rillig Exp $
+# $NetBSD: test-variants.sh,v 1.3 2020/08/31 18:57:41 rillig Exp $
 #
 # Build several variants of make and run the tests on them.
 #
@@ -72,7 +72,9 @@
 
 testcase USER_CPPFLAGS="-DDEBUG_REALPATH_CACHE"
 
-testcase USER_CPPFLAGS="-DDEBUG_SRC"
+# Produces lots of debugging output.
+#
+#testcase USER_CPPFLAGS="-DDEBUG_SRC"
 
 #testcase USER_CPPFLAGS="-UGMAKEEXPORT"
 
@@ -82,6 +84,8 @@
 #  #define MAXPATHLEN PATH_MAX
 #testcase USER_CPPFLAGS="-DMAXPATHLEN=20"
 
+# In this variant, the unit tests that use the :C modifier obviously fail.
+#
 testcase USER_CPPFLAGS="-DNO_REGEX"
 
 # NetBSD 8.0 x86_64 says:
@@ -104,6 +108,12 @@
 
 testcase USER_CFLAGS="-O0 -ggdb"
 
+# The make source code is _intended_ to be compatible with C90.
+# It uses some C99 features though.
+# To really port it to C90, it would have to be in a C90 environment
+# in which the system headers don't aggressively depend on C99.
+#
+# NetBSD 8.0 x86_64:
 # /usr/include/sys/cdefs.h:618:22: error: ISO C90 does not support 'long long' [-Werror=long-long]
 # /usr/include/sys/endian.h:205:1: error: use of C99 long long integer constant [-Werror=long-long]
 # /usr/include/pthread_types.h:128:3: error: ISO C90 doesn't support unnamed structs/unions [-Werror=pedantic]
@@ -112,6 +122,7 @@
 # var.c:1574:15: error: ISO C90 does not support the 'z' gnu_printf length modifier [-Werror=format=]
 # var.c:137:33: error: anonymous variadic macros were introduced in C99 [-Werror=variadic-macros]
 # parse.c:2473:22: error: format '%p' expects argument of type 'void *', but argument 7 has type 'char * (*)(void *, size_t *) {aka char * (*)(void *, long unsigned int *)}' [-Werror=format=]
+#
 #testcase USER_CFLAGS="-std=c90 -ansi -pedantic" USER_CPPFLAGS="-Dinline="
 
 # Ensure that every inline function is declared as MAKE_ATTR_UNUSED.
@@ -144,4 +155,19 @@
 #
 #testcase USE_COVERAGE="yes" USER_CFLAGS="-O0 -ggdb"
 
+testcase USE_FORT="yes"
+
+# This test is the result of reading through the GCC "Warning Options"
+# documentation, noting down everything that sounded interesting.
+#
+testcase USE_GCC10=yes GCC10BASE=$HOME/pkg/gcc10 USER_CFLAGS="\
+-Wmisleading-indentation -Wmissing-attributes -Wmissing-braces \
+-Wextra -Wnonnull -Wnonnull-compare -Wnull-dereference -Wimplicit \
+-Wimplicit-fallthrough=4 -Wignored-qualifiers -Wunused \
+-Wunused-but-set-variable -Wunused-parameter -Wduplicated-branches \
+-Wduplicated-cond -Wunused-macros -Wcast-function-type -Wconversion \
+-Wenum-compare -Wmissing-field-initializers -Wredundant-decls \
+-Wno-error=conversion -Wno-error=sign-conversion -Wno-error=unused-macros \
+-Wno-error=unused-parameter -Wno-error=duplicated-branches"
+
 test "$failed" = "no"



Home | Main Index | Thread Index | Old Index