The build failed with:
--- install-ubsan_minimal-m64 ---
x86_64--netbsd-install: the last argument
(/.../libclang_rt.ubsan_minimal-x86_64.a.syms)
must name an existing directory
The cause of this is that the suffix transformation rule for .a.a.sym
was active even during 'make install'.
At that point, the make variable .ALLSRC for the target
${DESTDIR}/.../libclang_rt.ubsan_minimal-x86_64.a.sym included not only
the corresponding file from the source directory, but also the potential
source file from the transformation rule, in this case
libclang_rt.ubsan_minimal-x86_64.a.
This led to several file parameters for the command 'install', which is
only allowed if the last parameter names an existing directory.
The build failed with this error message:
x86_64--netbsd-install: the last argument (/.../emit.ln) must
name an existing directory
The cause for this message was that ${DESTDIR}/.../emit.ln has
${DESTDIR}/.../emit.c as implicit target, which is kind of correct but
unintended in this case. Because of this, the command 'install' was run
like this:
install ${NETBSDSRCDIR}/.../emit.ln ${DESTDIR}/.../emit.c \
${DESTDIR}/.../emit.ln
only in the interrupt service path by the owning CPU, at entry and exit.
Even if the r/m/w cycle of incrementing the value were interrupted, the
result would still be the same because the interrupting frame will have
completed its own symmetrical increment/decrement cycle upon return.
Rather than simply increment the interrupt depth for the clock interrupt,
we add 0x10. Why? Because while we only use a single Alpha IPL (4) for
IPL_{BIO,NET,TTY,VM}, technically the architecture specification suports
two in the OSF/1 PALcode (3 [low-pri] and 4 [high-pri]), meaning we could
conceiveably have intrdepth > 1 just for device interrupts.
Adding 0x10 here means that cpu_intr_p() can check for "intrdepth != 0" for
"in interrupt context" and CLKF_INTR() can check "(intrdepth & 0xf) != 0" for
"was processing interrupts when the clock interrupt happened".
This diagnostic was supposed to be an error, see ApplyModifier_IfElse.
When such an error occurs while the makefiles are read, make stops with
an error, as can be expected. But when such an error occurs later,
after all makefiles have been read, the message is printed but make does
not stop.
In lint mode (-dL), make stops in such a case. I didn't dare to make
this the default behavior, out of fear of breaking existing build
infrastructure, not only in NetBSD or pkgsrc, but also FreeBSD and other
operating systems that use the bmake distribution, generated from the
same source code.
dist/control.c:394:17: error: format string is not a string literal
[-Werror,-Wformat-nonliteral]
xvasprintf(&s, fmt, ap);
^~~
dist/status.c:436:33: error: format string is not a string literal
[-Werror,-Wformat-nonliteral]
xvasprintf(&c->message_string, fmt, ap);
^~~
If the environment variable TMPDIR is not set, make uses a default path
that includes a trailing '/'.
For extra correctness it always appended an extra '/', leading to paths
of the form '/tmp//makeXXXXXX'. This looked suspicious, as if there had
been a forgotten empty part between the two '/'. Avoid this ambiguity
by replacing '//' with '/'.
It's strange that GCC does not warn about the nonliteral format strings
in lint1/err.c, lint2/msg.c and lint2/read.c, despite -Wformat=2, but
Clang does.
The code generated by yacc already adheres to strict bool mode, in
default mode as well as in debug mode.
Running lint on the generated cgram.c as well avoids most of the
"declared but not used" warnings from lint2.
The code generated by lex does not adhere to strict bool mode though.
Suppressing the errors from strict bool mode works, but then lint1 runs
into an assertion failure:
assertion "tn != NULL || nerr != 0" failed
in expr at tree.c:3610 near scan.c:822
This leaves several warnings about "declared but not used" for the
functions from lex.c.
Even though the new test is quite large, it didn't find any bugs in the
code. The only thing I'm unsure about is why static functions are
exported as well, since they are supposed to be local to the translation
unit.