Commit Graph

418 Commits

Author SHA1 Message Date
thorpej 90a3cb0405 Bump version. 2024-01-18 05:41:38 +00:00
thorpej e407e52763 With config(1) as it exists today, a kernel Makefile is able to implement
logic on kernel options so long as those options are not defflag'd or
defparam'd.  This works because such options are automatally added to the
IDENT var in the kernel Makefile as a preprocessor define, and the Makefile
can then do an operation like:

.if !empty(IDENT:M-DSOMECOOLCPUOPTION)
CFLAGS+= -mcpu=somecoolcpu
.endif

Unfortunately, this precludes making it possible to generate a compile-time
dependency on SOMECOOLCPUOPTION, or having SOMECOOLCPUOPTION imply another
kernel config option using the normal config(1) option dependency function.

Fix this by introducing a new option description keyword: mkflagvar.  This
keyword marks an already defflag'd option as wanting a kernel Makefile var
defined if that option is selected in the kernel config file.  So:

defflag opt_coolcpu.h SOMECOOLCPUOPTION ANOTHERCOOLCPUOPTION
mkflagvar SOMECOOLCPUOPTION ANOTHERCOOLCPUOPTION

will cause:

KERNEL_OPT_SOMECOOLCPUOPTION="1"
KERNEL_OPT_ANOTHERCOOLCPUOPTION="1"

...to be emitted into the kernel Makefile if those options are, in fact,
selected with "options ..." in the kernel config file, thus allowing for
a compile-time dependency on the option to be generated in addition to
Makefile logic, which now looks like:

.if !empty(KERNEL_OPT_SOMECOOLCPUOPTION)
CFLAGS+= -mcpu=somecoolcpu
.endif
2024-01-18 04:41:37 +00:00
lukem c4b7a9e794 bsd.own.mk: rename GCC_NO_* to CC_WNO_*
Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
2023-06-03 09:09:01 +00:00
andvar e82c4d9bb4 fix various typos, mainly in comments. 2022-04-04 19:33:44 +00:00
christos 02f8fe8f75 PR/56453: Wataru Ashihara: config(1): Assertion fails in config -L
Only compare pointers when one is found.
2021-10-12 17:14:10 +00:00
andvar e49c2d1bf9 remove duplicate the article in documentation. 2021-10-04 14:35:20 +00:00
andvar 207defd036 Add missing double p and d for stopped and overriden accordingly.
Fix few more typos along the way, mainly in copy-pasted comments.
2021-09-11 20:28:03 +00:00
rillig 133e932a29 usr.bin: remove unnecessary lint comment CONSTCOND
Since 2021-01-31, lint no longer warns about 'do ... while (0)'.

No functional change.
2021-09-10 21:52:17 +00:00
rillig c5c1184c32 config: remove unused local variable 2021-08-25 23:07:34 +00:00
andvar 077d1c0f36 fix various typos in comments and log messages. 2021-08-02 12:56:22 +00:00
andvar 7991f5a7b8 Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
2021-07-24 21:31:31 +00:00
mrg 28fe3b2bee ensure that pointer is filled in when used upon return. 2021-04-13 03:09:42 +00:00
msaitoh cccc3d1cb5 s/implicitely/implicitly/ 2020-09-29 03:02:18 +00:00
uwe eef82c7583 Minor formatting tweaks. 2020-08-01 00:35:36 +00:00
uwe 31cadc2f99 Swtich from -ohang to -tag lists.
-ohang lists are hard to read b/c long config directives are almost
impossible to tell from the following text.  Occasional multi-paragraph
descriptions were quite confusing too.
2020-07-31 23:55:57 +00:00
uwe 5329587af7 Missed formatting fixes for "no makeoptions". 2020-07-31 23:44:04 +00:00
uwe 57d0cb113c The tale of two makeoptions.
There are two forms that were both documented in the selections
section, but the form with the condition (and only that form) can be
used only in the descriptions section.  Move it to the appropriate .Ss
and add prominent notice to both.
2020-07-31 23:42:21 +00:00
uwe 0f7930473b Formatting improvements. 2020-07-31 23:30:23 +00:00
uwe f775a2ecc7 Minor tweak to list formatting.
Where necessary, use .Bl -ohang -compact and explicit .Pp to be able
to group multiple config directives (separate .It) by omitting .Pp
between them.

While here, add a .|" comment before .It to make them more visible
when editing.
2020-07-31 21:25:34 +00:00
uwe 20ad7fa1dc Formatting improvements.
Only comb through the first few pages (OBJECTS AND NAMES) for now.

Use .Em for emphasis, not .Ar (both look the same in text output, but
.Ar is very confusing in PostScript).  Reduce emphasis - don't
highlight every usage of a term.  Where everything is emphasized
nothing is.

Fix PS formatting of locator syntax examples so that square brackets
are literal and don't look meta-syntactic.  Explicitly show optional
locator syntax (in literal square brackets).
2020-07-31 20:01:42 +00:00
uwe 016b4f04fa Add debug output for ENDDEFS.
This makes it more clear in the debug output where config switched
from definitions to selections.
2020-07-26 22:40:52 +00:00
uwe 61a3ba024d Don't print the location of the include directive twice.
cfgdbg() already prints the current file and line number, so don't
print the same information ourselves in the message too.
2020-07-26 22:25:47 +00:00
joerg 9d91b80ed9 Avoid depending on common symbols. 2020-04-03 19:53:41 +00:00
christos 180ab6e0aa Add an enabled bit to keep track of the parent state (if we are ignoring
or parsing). Idea from uwe.
2020-03-09 17:27:03 +00:00
christos eb23c9a273 Add debugging, no functional change. 2020-03-08 17:38:37 +00:00
christos 782c9b9101 Recognize {if{,n}def,elfif{,n}def,else,endif} only at the beginning of the
line or after whitespace.
2020-03-08 00:04:11 +00:00
christos c2ac5ba400 PR/55057: Paul Goyette: Don't use % 6 arithmetic that hurts the brain for
the ifdef state machine, use bits and shifts instead. Also don't forget to
restore the state once an include file ends.
2020-03-07 22:35:16 +00:00
christos 202553924e Keep track where more objects are declared so that we can print where things
have been redefined.
2020-03-07 19:26:13 +00:00
wiz 80e58ff06c genric -> generic 2020-03-05 22:44:19 +00:00
fox 8d874901c0 usr.bin/config: Suppress -Werror=stringop-truncation error.
Add GCC_NO_STRINGOP_TRUNCATION to scan.c to prevent build failure.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.
gcc version 8.3.0

Reviewed by: kamil@
2020-02-07 20:17:48 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
christos 2763409dc3 yydebug is now defined only if YYDEBUG is 2018-12-24 02:07:44 +00:00
riastradh 3432a2eb7f Bump config(5) version for OPT.foo.c variables. 2018-08-27 16:04:45 +00:00
riastradh 72c36f8199 Tag each .c file with the options that might have brought it in. 2018-08-27 05:35:00 +00:00
christos aa6e79d158 Keep previous location of device definitions so we can print them in error
messages.
2018-04-09 17:46:56 +00:00
christos 3ee01a2ea9 - make the level computation consistent
- keep going only if things changed.
2017-11-28 15:31:33 +00:00
christos dd0971df99 use a reference count to avoid deleting psrefs still in use. 2017-11-27 00:25:46 +00:00
christos e4a9783186 - Instead of checking the recursion level before we recurse, check in on
function entry.
- Always decrement the level and reset levelparent on exit.
2017-11-24 23:42:36 +00:00
christos 0daba4343e Tidy up error messages, line wraps, initialization. NFC. 2017-11-24 18:45:59 +00:00
christos 536abc0958 Don't print instances we've already printed. 2017-11-19 01:46:29 +00:00
kre b83cb69bb5 Remove a stray left over debug printf that crashes the builds (ab==NULL). 2017-11-19 00:41:10 +00:00
christos 3011cfe714 Allow multiple attachments methods to the same child+parent combination:
foo* at bar? with baz
    foo* at bar? with barf

Do this by scanning the list of iba's and allocating a new cfparent for
each. Keep track of the shared parent+child combinations by using the
same id for them.
2017-11-18 18:44:20 +00:00
christos 3434d2c82b - Factor out the remove_pspec code into a function.
- Avoid NULL pointer when printing an error.
2017-11-18 18:41:44 +00:00
christos 021dbaa0a1 add more debugging, no functional change. 2017-11-18 18:39:16 +00:00
christos de334c4e67 avoid creating infinite loops. 2017-11-18 01:11:05 +00:00
christos f4a905f0b8 When deleting orphans detect parent<->child loops and break them.
"active" is not a boolean, use the right comparison.
2017-11-16 17:08:07 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
christos c8eb41c615 un-c99 2017-06-16 02:01:10 +00:00
christos 8090156fb8 Bump for quoting makeoptions with multiple lines. 2017-06-16 00:10:09 +00:00
christos f3bbdc592c Allow multiline makeoptions to work by quoting the newline.. 2017-06-15 23:52:15 +00:00