Commit Graph

287243 Commits

Author SHA1 Message Date
skrll fd9a2ad443 Do previous differently as the API is different. 2021-04-21 16:23:47 +00:00
christos a32fdb6548 Put things back, emit.ln it was meant to be there. 2021-04-21 14:04:26 +00:00
christos 2730ab42e6 remove emit.ln; looks like an accident and breaks the build. 2021-04-21 13:41:42 +00:00
rillig be94027e4e tests/lint: fix the hack for emit.ln to also work if MKUPDATE != "no" 2021-04-21 13:26:16 +00:00
jakllsch f1bae0bb42 regenerate 2021-04-21 13:12:42 +00:00
jakllsch e14bb724aa Fix Realtek RTL8125 description 2021-04-21 13:09:33 +00:00
hannken a2c5994a36 Prevent blocking l2arc_feed_thread() forever, skip the
cv_timedwait() for negative or zero ticks.
2021-04-21 10:02:34 +00:00
ryo ea089466ac added more attributes of PTE displayed by "ddb>machine pte" 2021-04-21 09:52:20 +00:00
skrll b5c783f5b6 Provide some more operations that are part of compiler lse.S. This is
incomplete, but at least covers all the atomic_swap ops and allows the
aa64 kernel to link with gcc 10.
2021-04-21 07:31:37 +00:00
rillig 97ccd8d967 tests/lint: fix inconsistent operator for emit.ln
The build failed with:

	nbmake[8]: "/.../src/share/mk/bsd.files.mk" line 47:
	    Inconsistent operator for /.../emit.ln
2021-04-20 23:30:35 +00:00
rillig 296378dbd5 clang: fix build for installing libclang_rt.ubsan_minimal-x86_64.a
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.
2021-04-20 23:19:53 +00:00
christos 38e22eb187 Add common attribute 2021-04-20 21:48:39 +00:00
christos c510facea2 Instead of compiling files with -fcommon, create an include file and declare
the 3 symbols that need to be common using an attribute. Put all the 3 symbol
definitions in libc in one place (initfini.c). Reviewed by joerg@
2021-04-20 21:42:31 +00:00
rillig 105b25615a tests/lint1: fix build error "must name 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
2021-04-20 21:20:24 +00:00
rillig e05bae9cb6 tmux: move __printflike to the declaration in the header
Noted by Akihiko HAYASHI.
2021-04-20 17:42:31 +00:00
mrg 307da2e47a give a structure a name.
it makes GCC 10 less unhappy about building arm64 GCC 10.
2021-04-20 10:39:58 +00:00
skrll b8baaa4b67 KNF 2021-04-20 10:15:34 +00:00
skrll 8272934fce compile fixes 2021-04-20 10:01:37 +00:00
thorpej 37f32593c4 Don't use atomics to manipulate cpu_info::ci_intrdepth: it's modified
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.
2021-04-20 01:29:40 +00:00
thorpej 3a56ffacac Slight tweak to previous changes:
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".
2021-04-20 00:09:45 +00:00
rillig 24fb524bea make: do not complain when skipping the condition 'no >= 10'
Seen in external/bsd/tmux when building with Clang.  See
varmod-ifelse.mk for the detailed story.
2021-04-19 23:51:42 +00:00
rillig a12d67d575 tests/make: add another example for parsing of the modifier ':?' 2021-04-19 23:43:14 +00:00
rillig 2427b79c7f tests/make: add detailed explanation for error message in conditional 2021-04-19 23:27:17 +00:00
rillig 97e91d60e6 make: use straight quotes for error 'Bad conditional expression'
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.
2021-04-19 22:22:27 +00:00
rillig d23762c055 tests/make: demonstrate unexpected behavior of the modifier ':?' 2021-04-19 22:05:29 +00:00
rillig bc7a89052f tmux: fix -Wformat-nonliteral for Clang
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);
                                       ^~~
2021-04-19 21:52:17 +00:00
christos f1b2d7493d Fix weekday parsing; only reset the string when parsing fail and only set
the weekday when parsing succeeds (Steffen Nurpmeso)
2021-04-19 17:49:28 +00:00
rillig 9c24f7ff27 make: avoid double slash in name of temporary directory
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 '/'.
2021-04-19 16:35:11 +00:00
christos f4a8719e32 new OpenSSH 2021-04-19 14:42:18 +00:00
christos ad44f2cb8b bump libssh 2021-04-19 14:41:18 +00:00
christos e8c0841bec Merge local changes between 8.5 and 8.6 2021-04-19 14:40:15 +00:00
christos d91dbd0bd5 Force user to specify source dir. Too dangerous to run in random places. 2021-04-19 14:07:36 +00:00
rillig d6126ccc75 lint: add debug logging for reachability 2021-04-19 13:18:43 +00:00
mrg 12037e2a81 hppa switched. sh3el seems ready. m68k atf wasn't fail.. 2021-04-19 08:40:15 +00:00
dholland bb5b0eea67 Make the riscv disassembler work, as best as I can test from amd64 userspace. 2021-04-19 07:55:59 +00:00
wiz 1f94b32954 openssh-8.6 out 2021-04-19 06:29:13 +00:00
simonb 9eee6d14e7 Add CVS ID line. 2021-04-19 01:12:10 +00:00
rillig f1cc514d7d tests/lint: record all files from FILES in distrib/sets/lists/tests/mi 2021-04-18 23:05:26 +00:00
rillig 34039a4026 tests/lint: add emit.ln to the release files 2021-04-18 23:02:16 +00:00
rillig 5bf56b009b lint: remove WARNS=3, falling back to the default WARNS=5
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.
2021-04-18 22:51:24 +00:00
rillig 4b2703ba02 lint: fix strict bool mode errors in cgram.y
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.
2021-04-18 21:53:37 +00:00
rillig 063d68d52b lint: reduce duplicate code for parsing .ln files 2021-04-18 21:12:50 +00:00
rillig 8edef9ff6a lint: fix error message in lint2 for missing record type in .ln file 2021-04-18 20:40:51 +00:00
skrll eea8ca29ae Switch hppa to gcc 10 2021-04-18 20:32:49 +00:00
rillig fd674c8ffb lint: clean up option parsing 2021-04-18 20:15:17 +00:00
rillig 3f5e7494f3 lint: test emitting of symbol information in the .ln files
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.
2021-04-18 20:02:56 +00:00
maya 1b70e4604b The -n flag is useless with -g, don't mention it.
From rudolf in PR misc/36243
2021-04-18 19:56:09 +00:00
rillig 9941f15572 lint: rename parameter to expr
That parameter used to be used for a single purpose, later it got used
for checking the reachability as well, which made the name misleading.
2021-04-18 17:54:33 +00:00
rillig dd5ca14fc1 lint: remove redundant CONSTCOND
In do-while-0 loops, these are no longer needed since tree.c 1.202 from
2021-01-31.
2021-04-18 17:47:32 +00:00
rillig 6de49ab08a lint: pass pos_t via const pointer
Thanks for the suggestion, christos@.
2021-04-18 17:36:18 +00:00