Commit Graph

5 Commits

Author SHA1 Message Date
rillig ec77a15a7f sys/conf/link.mk: clean up
The modifier ':C' did not need the modifier 'g', as there couldn't ever
be more than one match per word. Using the modifier ':from=to' is easier
to read.

Align the variable assignments. There was no point in having 3 different
alignment styles in the same file.

Remove underscore from .for iteration variable, as it is not needed.

No functional change.
2022-08-27 21:49:33 +00:00
rillig f0bd455f32 sys/conf/lint.mk: fix order of command line options
The option -o must come before the first filename.

Now it is possible to lint kern_exec.c at least.  The next failure is in
netbsd32_machdep.c:

	netbsd32_machdep.c(395): error: illegal bit-field size: 255 [36]

That line in netbsd32_process_read_fpregs reads:

	__CTASSERT(sizeof(*regs) == sizeof(struct save87));

This is probably a bug in lint.  The struct save87 contains 3 uint16_t,
followed by a union containing a uint64_t, followed by a packed struct
with size 10.  The combination of packed and padding is suspicious.
2021-05-02 20:11:43 +00:00
rillig 0286d007d2 sys/conf/lint.mk: allow GCC extensions in the kernel
The syntax errors due to the __asm statements are now gone.  The file
kern_exec.c only produces a few warnings now.  But after running that
file through lint1, the main lint complains about wrong usage.  This is
due to this call:

	${LINT} ... -i $< -o $@

The main lint has never supported -o after the first filename, so it
complains.  It would have been helpful if lint had given any hint as to
which option was invalid.  Anyway, the next step is to reorder the
arguments.  As it is now, the code can never have worked.
2021-05-02 19:51:57 +00:00
rillig 09e420f981 sys/conf/lint.mk: a small step for linting the kernel
Due to the missing path, the following commands had failed:

	$ cd src/sys/arch/amd64/compile/GENERIC
	$ nbmake-amd64-lint kern_exec.ln
	nbmake: don't know how to make kern/kern_exec.c. Stop

After fixing the path, "make kern_exec.ln" fails with:

	sys/kern/kern_exec.c(65): error: syntax error '"' [249]

The affected line contains:

	__KERNEL_RCSID(0, "...");

The macro __KERNEL_RCSID expands to __asm("some strings").  Since
KERNLINTFLAGS is missing the -g, lint does not recognize __asm as
keyword and tries to parse it as an identifier instead, expecting a
variable or function declaration.
2021-05-02 19:29:30 +00:00
uebayasi 3f77c79895 Move less important part out of Makefile.kern.inc. 2015-08-29 16:27:07 +00:00