Commit Graph

306105 Commits

Author SHA1 Message Date
riastradh 716bb5516e xdebug/shl.mi: Delete libXxf86misc.so.2.0.debug.
Loading existing applications that linked against this into a
debugger should continue to work, so it shouldn't be obsoleted, but
the file is no longer installed.
2024-05-10 12:24:08 +00:00
riastradh cd6bc63f92 xbase/shl.mi: Delete, rather than obsolete, libXxf86misc.so.M(.N).
Obsolete lines here will lead postinstall to delete the shlib, which
will break any existing applications linked against it.  Deleting the
lines has no effect on postinstall.

(We should maybe have a different way to mark them instead, as
suggested in PR 57581, but we don't, so this is what we do for now.)

However, keep the obsolete line for libXxf86misc.so, since the .so
symlink itself is only used when linking new applications.
2024-05-10 12:21:49 +00:00
riastradh d318e69575 xbase/shl.mi: Copy comment about delete vs obsolete from base/shl.mi. 2024-05-10 12:18:16 +00:00
rillig 328250ee47 sys/ktrace.h: fix off-by-one error in snprintb for ktrace flags 2024-05-10 09:30:47 +00:00
rillig d5c41e0169 error: disable lint's strict bool mode when building with Clang
The Clang preprocessor does not mark sections from system headers.
Lint's strict bool mode relies on these markers to allow the functions
from <ctype.h> to be used as 'bool', even though their declared return
type is 'int'. Without these markers, lint complains that the "right
operand of '&&' must be bool, not 'int'". Until this is fixed in lint,
disable strict bool mode.
2024-05-10 09:27:27 +00:00
wiz 0168e31e24 doc: mention install(1) -v 2024-05-10 09:15:27 +00:00
wiz 30bb22f9da nstall(1): add support for -v
Reviewed by rillig@ and thorpej@, thanks!
2024-05-10 09:14:52 +00:00
skrll 40dd220a53 Use __BIT and fix FE_INEXACT 2024-05-10 08:20:37 +00:00
nia f8e40d2640 recent changes 2024-05-10 08:09:54 +00:00
riastradh 2173c07c84 tests/usr.bin/mtree/t_sets: Add base32, base64, debug32, debug64. 2024-05-10 03:29:47 +00:00
riastradh 27df239d91 tests/lib/libc/stdio/t_printf: Fix another rounding error.
Noted by kre.

This doesn't break a passing test or fix a failed test, at least on
x86 -- our printf produces `0x1.533p+3' for the double case and
`0xa.99ap+0' for the long double case.  But of the hexadecimal number
literals that that start with 0x5 having three hexadigits to the
right of the fractional point, 0x5.4cdp+1 closest to the IEEE 754
binary64, VAX D, x86 extended precision, and IEEE 754 binary128
floating-point numbers closest to 10.6.

The reason is that the number 10.6 (or the nearest floating-point
number in any format with enough precision) is:

101.0100 1100 1100|1100... * 2^1 = 0x5.4cc|c...p+1

If we round at the vertical bar to the _nearest_ output with three
hexadigits of precision, the result is:

101.0100 1100 1101 * 2^1 = 0x5.4cdp+1
2024-05-09 22:38:29 +00:00
wiz 598b1af8b9 Document that freeaddrinfo(NULL) dumps core.
A source code comment already said this, but it's easier to
find in a man page.
2024-05-09 21:28:00 +00:00
rillig 64ab641533 lint: in C23 mode, allow storage classes in compound literals 2024-05-09 20:56:41 +00:00
rillig 2d37fed27b lint: add details to message about too many initializers 2024-05-09 20:53:13 +00:00
rillig 98b1d3b32e lint: sync grammar rule names with C11 and C23 2024-05-09 20:22:20 +00:00
rillig 2389db7096 lint: sort grammar rules according to the order they appear in C23 2024-05-09 20:15:05 +00:00
riastradh 9aa4064b35 libm: No divtc3.c or multc3.c in sparc64's compat sparc library.
compat/sparc64/sparc/bsd.sparc.mk doesn't define LIBC_MACHINE_CPU,
only LIBC_MACHINE_ARCH, so when the compat build gets to this
conditional, LIBC_MACHINE_CPU is just MACHINE_CPU, i.e., sparc64.

Since there's no `sparc64el' or `sparc64hf-el' that we need to
canonicalize by MACHINE_ARCH -> MACHINE_CPU, just use
LIBC_MACHINE_ARCH here.
2024-05-09 19:54:38 +00:00
christos d2d9aaf4f8 Remove the -xx, now we have the list of 20 platforms that have incomplete
fspecs. Instead of augmenting the platform spec with an autogenerated one,
we should understand why we have missing entries in the first place.
2024-05-09 16:09:03 +00:00
mrg 40a4e0d1da fix gcc 12 builds. 2024-05-09 15:54:58 +00:00
tsutsui 27f0c68149 Add a preliminary CD boot support to uboot for preparation of PR/54455.
Briefly tested on mame, but not enalbed yet.
2024-05-09 15:11:11 +00:00
riastradh 9bda463035 tests/lib/libc/gen/t_fpclassify: Test fpclassify on non-IEEE754 too.
Just exclude the subnormal parts on non-IEEE754 architectures
according to __FLT/DBL/LDBL_HAS_DENORM__.
2024-05-09 14:44:39 +00:00
riastradh 210c9d72b1 libm: Add frexpf and frexpl on VAX.
These are trivial subroutines, not symbol aliases, for separate
reasons:

- frexpf has a different ABI from frexp (float vs double argument)

- frexp is defined in libc, not libm, so although long double is the
  same as double, frexpl can't be an alias in libm of a symbol
  defined in libc
2024-05-09 14:42:09 +00:00
riastradh 22479c33fe tests/lib/libc/gen/t_fpclassify: Spruce this up a bit.
Provide more useful diagnostics when tests fail.
2024-05-09 14:13:08 +00:00
riastradh ed2e8e1562 tests/lib/libm/t_infinity: Remove broken long double conditional.
LDBL_MAX is always defined, so this branch is dead.  (If LDBL_MAX is
not defined, that's a bug in the architecture's float.h, not a reason
to skip a test.)
2024-05-09 14:00:58 +00:00
pho 0a668ec7ec kern/58195: arm: Support drvctl -d and -r for cpufeaturebus
This is required for detaching and re-attaching the vmt(4) driver on aarch64.
2024-05-09 12:41:08 +00:00
riastradh 12802f72f7 Revert various broken changes to printf %La (hldtoa).
This reverts:

hdtoa.c 1.12 (PR/56247: Greg A. Woods: printf("%La", LDBL_MIN) dumps core)
hdtoa.c 1.11 (fix tyop)
hdtoa.c 1.10 (Via enh at google dot com in tech-userlevel. Fix handling of
    EXT_FRAC{H,L}BITS (although we don't need to since we don't have them).)

The underlying motivation for this change was that when ld128 is
decomposed into 4x32 words, this hldtoa logic is broken.

But we don't decompose ld128 into 4x32 words; we decompose it into
6x64 words.

And the change, which was supposed to be a noop in our case of 2x64
words (or similar for x87 80-bit floating-point), broke it to the
point of causing buffer overruns (PR 56247) which when worked around
led to just incorrect output output (PR 56937).

If we want to make the #ifdefs for 4x32 words work, that's fine, but
we absolutely must have automatic test cases to detect this kind of
regression because %La formatting is extremely important for
diagnosing details of floating-point data since it doesn't involve
rounding in binary formats.  For now I've added some trivial tests;
there is a more extensive test suite inside gdtoa that we need to
wire up before anyone tries any other shenanigans in this code.

PR lib/56937: printf(3) long double %a formatting is broken
2024-05-09 12:24:24 +00:00
riastradh decd27dde2 tests/lib/libm/t_ilogb: Expand and tidy.
1. Instead of calling out VAX by name, use #ifdef NAN and
   isinf(INFINITY).  (VAX defines INFINITY even though it's not an
   infinity, not sure if there's a better compile-time test.)

2. Verify ilogbl works on long double on all architectures, not just
   those with __HAVE_LONG_DOUBLE which means long double is _larger_
   than double.
2024-05-09 12:23:21 +00:00
riastradh 08858db306 libm: Define ilogbl as alias for ilogb on vax.
PR 57881
2024-05-09 12:18:48 +00:00
riastradh 20b05e74e4 tests/lib/libm/t_fe_round.c: Tidy.
nextafter/nexttoward tests didn't make much sense, and are now
supplanted by t_next.

PR misc/58054
2024-05-09 12:18:28 +00:00
pho 3dc92541ec port-arm/58194: Resurrect vmt(4) from bitrot
On this architecture vmt(4) used to search for a node "/hypervisor" in the
FDT and probed the VMware hypervisor call only when the node was
found. However, things appear to have changed and VMware no longer provides
the FDT node.

Since vmt(4) doesn't actually need to read anything from FDT, and the
hypervisor call logically resides in virtual CPUs themselves, it would be
better to attach it directly to cpu, just like how it's probed on x86.
2024-05-09 12:09:58 +00:00
rillig 151775b8cf lint: in C23 mode, support the nullptr constant 2024-05-09 11:08:07 +00:00
nia cbd7fd84d4 unhook libXxf86misc from the build and mark obsolete
library has no users in src or pkgsrc, it's primarily useful for
managing input devices on mid-2000s xfree86 servers
2024-05-09 06:38:27 +00:00
nia 6543f2f229 stop using and linking against libXxf86misc
support for this extension was removed from xorg in 2008,
our xorg-server and our xorg-server.old can't use it.
2024-05-09 06:34:50 +00:00
kre 966af04570 No point testing if the spec file is empty before running makespec,
the previous commands guarantee that cannot be the case, so makespec
was never being run.   Just run it unconditionally.

Seems to fix the build for me.
2024-05-09 03:41:05 +00:00
mrg 63829c3207 fix gcc 12 support. 2024-05-09 02:14:21 +00:00
dyoung 0d209957b5 If the ACPI flag "non-removable" is present and true for an SD/MMC
slot, then set a new flag on that slot to indicate that the media
is non-removable.  Make sdhc_card_detect always return true for a
slot if its non-removable media flag is set.

This change lets the kernel automatically configure the
permanently-installed MMC slot on the NXP LX2160-based HoneyComb
LX2 board.
2024-05-09 01:33:12 +00:00
riastradh 5499b93eb2 libm: Split expected symbols in mips further by 32-bit vs 64-bit.
32-bit has binary64 long double, same as double; 64-bit has binary128
long double, which is implemented with a few more symbols in libm
(which should maybe be hidden internal symbols, but let's get this
diagnostic measure in the build working before we think about
possibly deleting private symbols).
2024-05-09 00:04:23 +00:00
riastradh 8e8afff063 libm: Record expected symbols for sh3. 2024-05-08 23:28:31 +00:00
riastradh c0a4905dd8 libm: Split expected symbols on arm and mips by hard/soft float. 2024-05-08 23:28:07 +00:00
riastradh 47b9ac9413 tests/lib/libm/t_fe_round: xfail for modfl uses.
PR lib/58237: modfl returns wrong answers on ld128 architectures
2024-05-08 22:59:07 +00:00
riastradh 03e019893b tests/lib/libm/t_modf: Mark modfl xfail on ld128.
PR lib/58237: modfl returns wrong answers on ld128 architectures
2024-05-08 22:57:37 +00:00
riastradh 40fb0c39c9 bsd.lib.mk: Use LIBC_MACHINE_ARCH/CPU if set for expected symbols.
Otherwise, we get the wrong list of symbols for compat library
builds, where MACHINE_ARCH/CPU is different from
LIBC_MACHINE_ARCH/CPU, e.g. building compat 32-bit sparc libm on
sparc64.

XXX This is kinda kludgey -- `libc' seems wrong here.
2024-05-08 20:38:55 +00:00
riastradh 1252743ac7 tests/lib/libc/stdio/t_printf: Add another %La test.
This one was adapted from the screw case shown in

https://mail-index.netbsd.org/tech-userlevel/2020/04/11/msg012329.html

which wasn't broken in our libc, but which nevertheless prompted us
to commit a wrong and apparently untested patch that has rendered
printf %La broken for the last four years, which is a little
embarrassing.  (The part of that patch that led to a buffer overrun
has been worked around, so now the output is just incorrect.)

PR lib/56937: printf(3) long double %a formatting is broken
2024-05-08 20:23:15 +00:00
riastradh 65c3528ff8 tests/lib/libc/stdio/t_printf: Fix %a test the same way. 2024-05-08 20:19:37 +00:00
riastradh 1076b20b39 tests/lib/libc/stdio/t_printf: Fix %La test.
0xa.99ap+0 is closer to (long double)10.6 in x86 ld80 and in
binary128 (and possibly more formats, haven't verified).
2024-05-08 20:04:33 +00:00
riastradh 5c6dfe9899 tests/lib/libc/stdio/t_printf: Add a couple simple %La tests.
PR lib/56937: printf(3) long double %a formatting is broken
2024-05-08 18:19:57 +00:00
riastradh e37d2bb0d8 tests/lib/libm/t_next: Expand substantially.
This covers many more potential problem areas -- and includes a new
xfail test for PR lib/58236: nexttoward(3) is broken on subnormals.
2024-05-08 17:27:03 +00:00
christos 1faf623fbf fix clang lint build (except for the programs that enables -T) 2024-05-08 16:53:34 +00:00
christos 4967e4351f Fail on incomplete mtree specs 2024-05-08 16:08:08 +00:00
christos 0fe82aa40b Add an option to warn and error out for mtree missing entries. 2024-05-08 15:57:56 +00:00