Commit Graph

306105 Commits

Author SHA1 Message Date
wiz 71dca2bb1e gcc 14.1 out 2024-05-08 09:52:07 +00:00
riastradh 078777ba38 libm: Add rintl, rintf to non-IEEE754 architectures.
While here, delete #ifdef to handle ns32k -- I don't think that's
gonna be relevant any time soon; in case you hadn't noticed, the
world has moved on from ns32k to vax by now.

PR 57881
2024-05-08 02:08:11 +00:00
riastradh 51f70d1537 libm: ldbl_dummy.c is no longer needed -- nix it. 2024-05-08 01:58:52 +00:00
riastradh 81421ada3b libm: Don't export symbol `pio4' from s_cosl.c.
This appears to have been added unintentionally in the recent FreeBSD
long double update, and never went out in a release.
2024-05-08 01:42:23 +00:00
riastradh 9ff0c4291d libm: Do the weak alias dance for sin/cos/tan/finite{,f}.
tan isn't used internally, but it's confusing for it to be treated
differently from sin and cos, and there's no harm in doing the dance
unnecessarily.
2024-05-08 01:40:26 +00:00
riastradh b6653282bf libm/arch/m68k: Do the weak alias dance for finite.
This is used internally.
2024-05-08 01:05:25 +00:00
riastradh 62e6bb72de libm/arch/mc68881: Do the weak alias dance for sin, cos, tan.
These are used internally.
2024-05-08 01:04:40 +00:00
riastradh 62841561df libm/arch/vax: Do the weak alias dance for finite, finitef.
These are used internally.
2024-05-08 01:04:24 +00:00
riastradh 89f1761863 libm/arch/i387: Do the weak alias dance for finite and finitef.
These are used internally by some things.
2024-05-08 01:04:03 +00:00
riastradh 06a9ffe262 libm: Add expected symbols for m68k.
Not sure if this'll work for all ports -- we might need to split it
up finer-grained by different m68k flavours -- but let's give it a
try and see what breaks.
2024-05-07 23:13:32 +00:00
riastradh 5f4c33f35e lib/libm/arch/m68060: regen 2024-05-07 22:51:19 +00:00
riastradh f349ddea9b lib/libm/m68060/makeas.sh: Delimit symbols with END.
This way we get symbol sizes in the ELF output.
2024-05-07 22:30:16 +00:00
riastradh 9750c027c7 lib/libm/arch/m68060/makeas.sh: Create public weak aliases.
Use _foo for internal names, and weak alias foo when it's public like
sin/cos/tan.
2024-05-07 22:29:53 +00:00
riastradh 2e8caa3647 lib/libm/m68060/makeas.sh: Use `set -eu' to detect script mistakes.
No functional change intended.
2024-05-07 22:19:42 +00:00
riastradh b1bc5af1e1 lib/libm/m68060/makeas.sh: Pass arguments to dummy more idiomatically.
No functional change intended.
2024-05-07 22:18:19 +00:00
riastradh 150c79c867 lib/libm/m68060/makeas.sh: Use local for shell functions.
No functional change intended.
2024-05-07 22:17:24 +00:00
riastradh a45e4331c1 lib/libm/arch/m68060/makeas.sh: Indent sh blocks.
No functional change intended.
2024-05-07 22:17:08 +00:00
riastradh 5bc608efaf lib/libm/arch/m68060: regen 2024-05-07 21:18:47 +00:00
riastradh bd91cc76f2 lib/libm/arch/m68060/makeas.sh: Strip the $ when emitting RCS id. 2024-05-07 21:14:12 +00:00
rillig 1cdc580354 lint: in C23 mode, support the keywords 'bool', 'false' and 'true' 2024-05-07 21:13:26 +00:00
riastradh 8383bd5dda libm/arch/m68060/Makefile: bsd.sys.mk -> bsd.host.mk
Somewhat belatedly, after bsd.sys.mk was forbidden to use directly
from Makefiles back in 2014.
2024-05-07 21:11:24 +00:00
riastradh 7065ff01cd libm/arch/m68060/makeas.sh: Tag output with makeas.sh RCS id.
No functional change intended to the output -- only changes are to
comments.
2024-05-07 21:05:47 +00:00
riastradh d48db9a528 tests/lib/libc/gen/t_fpclassify: Enable long double tests.
The necessary long double symbols should all be available now.  If
there are any architectures where they're not, we can fix those
architectures.
2024-05-07 21:00:00 +00:00
riastradh cd9dfcd0c5 libm: Memorialize expected symbols on various architectures.
This will reduce the risk of accidentally adding or deleting the
wrong symbols while fixing the aliases.

(This is all the architectures I have a build tree for handy; can add
other architectures like m68k later.)
2024-05-07 20:58:33 +00:00
riastradh 2ea04e5047 bsd.lib.mk: Allow MACHINE_CPU for default expsym file. 2024-05-07 20:56:25 +00:00
christos 27fb837206 PR/58196: Jan-Benedict Glaw: If there was no spec file specified, generate
one on the fly. Should fix reproducible builds where the mode and the
ownership/group is not fixed and picked up from the filesystem.
2024-05-07 20:33:20 +00:00
christos d6c3c02a1d Simple script to create an mtree spec file from a directory tree with
fixed default owner/group/perms.
2024-05-07 20:30:33 +00:00
tsutsui babc3bb6b8 Use proper signedness for the LIF file system data structures.
Ancient 4.3BSD used short and int for location, file size, file type,
and addresses etc. but all of them should be unsigned.
Also rename several variables and add comments for readability.

The LIF file system info can be found in "The HPDir Project" page:
 https://www.hp9845.net/9845/projects/hpdir/

The same uboot.lif binaries are generated.
2024-05-07 19:55:14 +00:00
rillig fe6f732478 tests/lint: show that in C23 mode, bool is not yet defined
The tests in C11 and C23 mode look the same right now but will change
soon.

The warnings in the C11 test disappeared because after the first error,
warnings about unused variables are suppressed by check_variable_usage,
as they are often wrong.
2024-05-07 19:32:35 +00:00
tsutsui 609bb2da52 Rename ${PROGAOUT} -> ${PROGELF} to reflect reality. 2024-05-07 19:24:32 +00:00
sjg 696821dd99 make: all command line overrides go in .MAKEOVERRIDES
Not all variables that start with '.' are internals,
and unless they are explicitly flagged as internal should go
into .MAKEOVERRIDES

Update varname-dot-makeoverrides to check this.

Also avoid using SCOPE_CMDLINE when ReadOnly will do.
2024-05-07 18:26:22 +00:00
riastradh 13d778abc5 libm/arch/vax: Expose atan2l.
PR port-vax/57881: vax libm is missing various symbols
2024-05-07 15:49:33 +00:00
christos 385d1021b7 also mention kpause(9) here. 2024-05-07 15:40:15 +00:00
riastradh af6c922c55 math.h: Move declarations under appropriate namespace tests.
Not sure about _REENTRANT, but if gamma_r and lgamma_r go under that
(even if _NETBSD_SOURCE isn't defined), then lgammal_r probably
should too.
2024-05-07 15:17:35 +00:00
riastradh 4336c6aedd libm/arch/vax: Use STRONG_ALIAS, not ALTENTRY.
STRONG_ALIAS copies the symbol size and type, so it avoids warnings
like this:

/home/riastradh/netbsd/10/obj.vax/tooldir/bin/../lib/gcc/vax--netbsdelf/10.5.0/../../../../vax--netbsdelf/bin/ld: warning: type and size of dynamic symbol `ldexpl' are not defined
2024-05-07 15:15:31 +00:00
riastradh 2a580023ad libm/arch/vax: Use END to delimit symbol definitions.
This way we get sizes and, likely, slightly better debug info about
PCs inside these symbols.
2024-05-07 15:15:09 +00:00
martin ce6107da93 Add manhtml set 2024-05-07 14:53:59 +00:00
riastradh 557aa1ae1a tests/lib/libm/t_bit: Expand and tidy.
1. Instead of calling out VAX by name, use #ifdef NAN.

2. Verify signbit works on long double on all architectures, not just
   those with __HAVE_LONG_DOUBLE which means long double is _larger_
   than double.

3. Minor formatting tidying.
2024-05-06 18:41:23 +00:00
riastradh 9da594439c tests/lib/libc/stdlib/t_strtod: Spruce up and nix needless #ifdefs. 2024-05-06 18:39:36 +00:00
riastradh 10d47f3307 tests/lib/libm/t_modf: Use isinf(INFINITY) to detect inf support.
Apparently VAX defines the INFINITY macro even though it's not
actually an infinity and isinf returns zero for it.
2024-05-06 18:35:59 +00:00
tsutsui 401b67f6cc Misc cosmetic changes for mostly readability.
- KNF and add some newlines per blocks
- define and use proper bintobcd() macro
- make local functions and variables static

The same uboot.lif binaries are generated.
2024-05-06 18:08:49 +00:00
riastradh 30aeb9cc52 tests/lib/libc/gen/t_floatunditf: Nix __HAVE_LONG_DOUBLE conditional.
Conversion from uint64_t to long double should work on all ports,
including those where long double is the same as double, i.e., where
__HAVE_LONG_DOUBLE is undefined.

Instead, conditionalize the test cases on how many bits of precision
long double has in the significand, according to LDBL_MANT_DIG.  The
conditionals here should handle binary128, powerpc double-dekker
(~106-bit precision), x86 extended precision (80-bit), m68k extended
precision (80-bit), and VAX D (56-bit).
2024-05-06 17:53:43 +00:00
skrll 8c835d3895 Trailing whitespace 2024-05-06 15:59:53 +00:00
riastradh 49e81414d0 tests/lib/libm/t_sincos: Nix __HAVE_LONG_DOUBLE conditionals.
sincosl is supposed to be there even if long double is double, as is
the case when __HAVE_LONG_DOUBLE is undefined.
2024-05-06 15:53:46 +00:00
riastradh 18bbefc87a libm: Expose sincosl on vax.
PR 57881
2024-05-06 15:52:52 +00:00
riastradh 742590c903 tests/lib/libm/t_scalbn: Nix __HAVE_LONG_DOUBLE conditionals.
If long double is the same as double, i.e., __HAVE_LONG_DOUBLE is
undefined, these tests should still pass, since they don't rely on
extra precision beyond double.
2024-05-06 15:49:31 +00:00
riastradh d36ac80d42 tests/lib/libm/t_precision: Nix __HAVE_LONG_DOUBLE conditionals.
long double and LDBL_EPSILON work even on architectures where long
double is the same as double, i.e., where the confusingly named
__HAVE_LONG_DOUBLE is not defined.
2024-05-06 15:46:31 +00:00
riastradh 26b22dc580 tests/lib/libm/t_cos: Fix comment about necessity of volatile. 2024-05-06 15:45:20 +00:00
riastradh 3d20dd055f tests/lib/libm/t_cos: Nix __HAVE_LONG_DOUBLE.
cosl should always be defined even on architectures where long double
is the same as double so the confusingly named __HAVE_LONG_DOUBLE is
not defined.
2024-05-06 15:44:08 +00:00
riastradh 840e85b4fd tests/lib/libm/t_cabsl: Nix __HAVE_LONG_DOUBLE conditionals.
__HAVE_LONG_DOUBLE just means long double is different from double.
This test should always pass on all ports, even if long double is the
same as double; it doesn't test any additional precision.
2024-05-06 15:40:55 +00:00