Commit Graph

5814 Commits

Author SHA1 Message Date
Gordon Bergling
63c928f17e gpioevents: Fix a typo in a diagnostic output message
- s/recieved/received/

MFC after:	3 days
2023-12-27 09:41:48 +01:00
Tijl Coosemans
272b4b764b devd: Don't install autofs.conf with WITHOUT_AUTOFS 2023-12-22 15:27:50 +01:00
Gleb Smirnoff
330089470f nanobsd: Fix the fix to a typo
Submitted by:		jlduran@gmail.com
Reviewed by:		imp, glebius, emaste
PR:			275691
Differential Revision:	https://reviews.freebsd.org/D43035
Fixes:			d8c70d6dfb
2023-12-21 10:13:44 -08:00
Yuri Pankov
7d413ee805 Revert "locale: regenerate SJIS charmap from CLDR"
...as it broke colldef build.

This reverts commit a4a9d2a64a.
2023-12-20 14:14:27 +07:00
Yuri Pankov
a4a9d2a64a locale: regenerate SJIS charmap from CLDR
There are some noticable differences affecting the '\' and '~'
characters between our current charmap and latest CLDR version.

PR:		264299, 275444
Reviewed by:	bapt
Tested by:	uratan@miomio.jp
Differential Revision:	https://reviews.freebsd.org/D42848
2023-12-20 13:24:22 +07:00
Peter Holm
2134b35e0f stress2: Fix "-Wunused-but-set-variable" warnings. Style fixes, while here 2023-12-19 10:36:41 +01:00
Jessica Clarke
ff7c12c1f1 Make kldxref a bootstrap tool and use unconditionally
Now that kldxref is a generic cross tool and can be built on non-FreeBSD
we can bootstrap it during the build and thus remove the condition for
whether it exists. We also need to make sure to add it to the METALOG
for -DNO_ROOT builds.

Reviewed by:	brooks, imp
Differential Revision:	https://reviews.freebsd.org/D43051
2023-12-13 21:43:10 +00:00
Jessica Clarke
881ec81372 tools/build: Provide sys/linker_set.h when cross-building
This is needed for kldxref, which will shortly become a bootstrap tool.
Linux can use the same one as FreeBSD (provided the cross-building
sys/cdefs.h is augmented appropriately), whilst macOS needs its own
Mach-O-specific implementation.

Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D43049
2023-12-13 21:43:09 +00:00
Peter Holm
41667b04e5 stress2: Only extract the allocation with the exact name "pts" 2023-12-10 09:34:38 +01:00
Dimitry Andric
06c3fb2749 Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-17-init-19304-gd0b54bb50e51, the
last commit before the upstream release/17.x branch was created.

PR:		273753
MFC after:	1 month
2023-12-08 18:34:50 +01:00
Peter Holm
4b0615e585 stress2: Handle a define with comments 2023-12-01 10:37:13 +01:00
Bjoern A. Zeeb
643d6dce6c tools/net80211: add mlme_assoc
mlme_assoc is a tool to trigger net80211::ieee80211_sta_join1() calls
which in certain conditions cause problems to the LinuxKPI 802.11 compat
code (but also believed to possibly cause problems in case of race to
other firmware based drivers).  This has proven to be a good reproducer
for the problem even on setups which otherwise could run for days without
hitting it.

Sponsored by:	The FreeBSD Foundation
PR:		271979
2023-12-01 01:48:34 +00:00
Warner Losh
6bfca4dcab tools: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:24:01 -07:00
Warner Losh
e717cb04be misc: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

This is for the misfits that have only a few: COPYRIGHT, gnu, tools,
rescue, and etc.

Sponsored by:		Netflix
2023-11-26 22:23:27 -07:00
Peter Holm
49a83b9439 stress2: Do not make assumptions about the value of UFS_LINK_MAX 2023-11-25 10:36:00 +01:00
Brooks Davis
4cd0f014a1 OptionalObsoleteFiles.inc: document block order
Options should be in sort(1) order by primary option (usually, but not
always, first in the if statement).

Reviewed by:	emaste, imp, netchild
Pull Request:	https://github.com/freebsd/freebsd-src/pull/896
2023-11-14 16:50:52 +00:00
Brooks Davis
c90d0600ee Sort MK_NETLINK option
Reviewed by:	emaste, imp, netchild
Pull Request:	https://github.com/freebsd/freebsd-src/pull/896
2023-11-14 16:50:01 +00:00
Brooks Davis
2b3bf27da4 Sort MK_GNU_DIFF option
Reviewed by:	emaste, imp, netchild
Pull Request:	https://github.com/freebsd/freebsd-src/pull/896
2023-11-14 16:49:59 +00:00
Brooks Davis
fb173fc89e Combine and sort MK_LLVM_COV
These used to be grouped with MK_GCOV option or the like.

Reviewed by:	emaste, imp, netchild
Pull Request:	https://github.com/freebsd/freebsd-src/pull/896
2023-11-14 16:49:55 +00:00
Brooks Davis
16743f0e0b Sort MK_EFI and MK_FTP options
Reviewed by:	emaste, imp, netchild
Pull Request:	https://github.com/freebsd/freebsd-src/pull/896
2023-11-14 16:49:53 +00:00
Brooks Davis
a62cefbb5c Sort MK_DTRACE and MK_ZFS options
Presumably these were under MK_CDDL at some point, but these days
src.opts.mk takes care of setting them to "no" when MK_CDDL is.

Reviewed by:	emaste, imp, netchild
Pull Request:	https://github.com/freebsd/freebsd-src/pull/896
2023-11-14 16:49:50 +00:00
Brooks Davis
e70ad278f4 Sort MK_HYPERV option
Reviewed by:	emaste, imp, netchild
Pull Request:	https://github.com/freebsd/freebsd-src/pull/896
2023-11-14 16:49:47 +00:00
Brooks Davis
4ca5df8039 Sort MK_BSD_CPIO before MK_BSDINSTALL
Using sort(1) order makes verification of the sort easier.

Reviewed by:	emaste, imp, netchild
Pull Request:	https://github.com/freebsd/freebsd-src/pull/896
2023-11-14 16:49:41 +00:00
Brooks Davis
ec4c2adb50 Retire LLD_IS_LD option
The option was added to parallel the CLANG_IS_CC which was removed in
commit 20a66ab4bf.

Reviewed by:	imp, dim, emaste
Differential Revision:	https://reviews.freebsd.org/D42575
2023-11-13 21:34:14 +00:00
Guido Falsi
e6eb94a8ff nanobsd: fix typo in utility function call name
Approved by:		imp
Differential Revision:	https://reviews.freebsd.org/D42475
2023-11-06 22:18:35 +01:00
Warner Losh
2d8fabef75 ino64: Fix incremental builds
These files were removed, so we need to fix up depends for WITHOUT_CLEAN
builds (the default). Metamode builds aren't affected.

Sponsored by:		Netflix
Feedback from:		emaste
Tested by:		Pierre Pronchery
Differential Revision:	https://reviews.freebsd.org/D42433
2023-11-02 12:07:59 -06:00
Warner Losh
34632ed1a4 arm: Introduce MK_KERNEL_BIN to control generation of kernel.bin
It's sometimes desirable to generate kernel.bin and install it. While
the mainstream has moved on to UEFI booting on arm, some specialized
gear can't support it. For that gear, we unconditionally generate
kernel.bin. Add a knob so that WITH_KERNEL_BIN or WITHOUT_KERNEL_BIN
control its generation and installation. config files should add
'makeoptions WITH_KERNEL_BIN=t' to enable it. Since its use is
specialized, it is off by default now since the arm world has largely
moved on to UEFI.

It only affects arm and arm64 (since those are the only two that support
it).

Sponsored by:		Netflix
Reviewed by:		mmel
Differential Revision:	https://reviews.freebsd.org/D39013
2023-10-26 21:10:36 -06:00
Andrew Turner
ceefd491c7 tools/build: Support building with glibc 2.38
Ubuntu 23.10 uses glibc 2.38. This adds strlcpy and strlcmp so we need
to remove them from the cross build environment.

Reviewed by:	jrtc27 (earlier version), arichardson
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42303
2023-10-20 16:45:06 +01:00
Mitchell Horne
b293497146 pmc.amd(3): rename from pmc.k8(3)
This is the first step in recognizing that the K8 microarchitecture
represents a small and aged subset of AMD CPUs supported by this class.
Future changes will update the code and documentation details to better
reflect this.

Keep the old filename as an alias.

Reviewed by:	jkoshy
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41279
2023-10-18 15:05:45 -03:00
Mitchell Horne
82d6d46d0d pmc: remove last bits of AMD K7 CPU support
This includes event definitions from sys/pmc_events.h, definitions from
sys/pmc.h, and the man pages.

Reviewed by:	jkoshy
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41275
2023-10-18 15:05:45 -03:00
Dag-Erling Smørgrav
f2ffadeb03 rm description of EXTRA_TCP_STACKS option.
Fixes:		3a338c5341
Reported by:	mhorne
2023-10-18 17:02:05 +02:00
Peter Holm
ef1dad6d83 stress2: Fix "-Wunused-but-set-variable" warnings 2023-10-18 08:54:38 +02:00
Richard Scheffenegger
569f2292ca test: iterate both reader and writer threads starting at the actual pagesize
Reviewed By: pho
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D42160
2023-10-11 23:11:57 +02:00
Baptiste Daroussin
742f7ec59e dialog: correctly mark the libaries
Mark the libraries as such in order for make delete-old to not
remove them when the DIALOG option is off
2023-10-11 13:36:16 +02:00
John Baldwin
f53355131f Trim various $FreeBSD$
Approved by:	markj (cddl/contrib changes)
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41961
2023-10-10 10:34:43 -07:00
Baptiste Daroussin
38981026e7 dialog(1): switch off dialog(1) by default
Every direct consumers in base have switch to use bsddialog(1) by
default
2023-10-10 09:19:48 +02:00
Baptiste Daroussin
ff01d71e48 bsdconfig: do not remove files id MK_DIALOG=no
bsdconfig does not depends anymore on anything related to dialog(1)
and libdialog(1) and has totally switched to bsddialog(1)
2023-10-10 09:17:29 +02:00
Mitchell Horne
773606fcdf ofwdump: install dependent on MK_FDT
The utility depends on the presence of the openfirm(4) pseudo-device,
which is gated by the FDT kernel option. The MK_FDT knob is correctly
set to "yes" for FDT/OFW-enabled platforms (powerpc* included); use it
to install the utility and eliminate the arch-specific Makefile logic.

No functional change intended.

Reviewed by:	emaste, pkubaj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41977
2023-10-02 10:40:18 -03:00
Piotr Kubaj
4cf8075264 ObsoleteFiles.inc: only leave ofwdump.8.gz when WITH_FDT is set
Approved by:	mhorne
Differential Revision: https://reviews.freebsd.org/D41905
MFC after:	3 days
2023-10-01 23:36:37 +02:00
Peter Holm
2b716e00cf stress2: Extent timeout limit to avoid false positive errors 2023-09-27 13:01:00 +02:00
Peter Holm
0f35fd3347 stress2: Remove tests from the exclude list 2023-09-27 13:00:01 +02:00
Peter Holm
0ec1bbe579 stress2: Cap total runtime 2023-09-27 12:58:39 +02:00
Ed Maste
61f8df6a13 mfc-candidates: search by committer only, not author
When both --author and --committer are specified, `git log` requires
both to match.  Search only by committer, as it is typically the FreeBSD
committer who will perform the MFC.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41964
2023-09-25 16:11:28 -04:00
John Baldwin
c4e2333cb2 Update a few tools to not embed $FreeBSD$ in generated files
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41959
2023-09-25 07:55:43 -07:00
John Baldwin
99159b076a Update a couple of tools to not embed __FBSDID in generated files
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41955
2023-09-25 07:50:11 -07:00
Simon J. Gerraty
f9df609750 Add support for host32 for DIRDEPS_BUILD
Allow building 32bit libs for host.

Move CFLAGS additions from local.sys.dirdeps.mk (which is too early
and impacts CFLAGS defaults) to local.sys.mk

Reviewed by:	stevek
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D41946
2023-09-22 23:27:37 -07:00
Ed Maste
d3a9d605a8 Add WITHOUT_MANSPLITPKG description
Fixes: 74da9c39c3 ("pkgbase: Split out manpages by default")
Sponsored by: The FreeBSD Foundation
2023-09-16 16:40:41 +01:00
Bjoern A. Zeeb
530c13c540 tools/wlanstats: fix -Wunused-but-set-variable
The "allnodes" code is currently #if 0 so also #if 0 the setting of the
command line option and variable in order to keep wlanstats compiling.

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
2023-09-11 14:28:07 +00:00
John Baldwin
9c80d66ec1 makeman: Use ${make} instead of plain make to compute ${requireds}
This is currently a no-op but can matter for downstreams whose ${make}
includes additional settings.

Reviewed by:	imp, emaste
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D41777
2023-09-08 16:36:52 -07:00
Ed Maste
b461276d75 Update WITH_/WITHOUT_SSP descriptions
ProPolice refers to a specific implementation by Hiroaki Etoh and
Kunikazu Yoda.  The implementation in contemporary Clang and GCC is
somewhat different and newer, so use a generic term in the src.conf
descriptions.

Sponsored by:	The FreeBSD Foundation
2023-09-07 11:59:46 -04:00
Baptiste Daroussin
358f8a7add sendmail: remove all m4 files with WITHOUT_SENDMAIL 2023-09-06 14:23:27 +02:00
Brooks Davis
a8ae129e6e LIBC_MALLOC: description typo fix
Fixes:		09e32b2fdd
Reported by:	jrtc27
2023-09-01 18:23:33 +01:00
Brooks Davis
2befa269b8 Add INIT_ALL build option
This option replaces WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO with
INIT_ALL=pattern and INIT_ALL=zero respectively.  As these are
relatively rarely used options no backwards compatibility is
implemented.

Reviewed by:	emaste
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D41675
2023-09-01 17:54:24 +01:00
Brooks Davis
09e32b2fdd libc: add LIBC_MALLOC option
This will enable alternative mallocs to be included in the tree and
selected by setting LIBC_MALLOC.  As there is only one today (jemalloc)
this option does nothing, but we expect to add other implementations
in the future.  This will also reduce diffs to CheriBSD.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D41660
2023-09-01 17:54:23 +01:00
Brooks Davis
897ae85f7d makeman: add minimal support for group options
Ignore OPT_* values in showconfig out in exising code paths and add
a new path to include descriptions for each. For now, hardcode the
description contents rather than attempting to generate it.  This runs
the risk of docs getting out of date, limits the amount of new shell
code added today while a lua rewrite is nearly ready to land.

This change requires a followup commit to enable OPT_* values in
"make showconfig" in order to actually find group options.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D41681
2023-09-01 17:54:23 +01:00
Brooks Davis
89aed8837f makeman: clarify scope of ignored option values
The values of WITH_ and WITHOUT_ options are ignored, but group options
are not.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41683
2023-09-01 00:58:39 +01:00
John Baldwin
023ef8015e OptionalObsoleteFiles.inc: Add libprivate{cbor,fido2}_p.a
Two more profile libraries that should be removed by WITHOUT_PROFILE.
Found when upgrading a stable/13 VM to stable/14.
2023-08-25 16:22:01 -07:00
Jessica Clarke
62f243acea tools/build/make.py: Make --with-default-sys-path mirror usr.bin/bmake
The top-level Makefile passes -m to its sub-makes in order to ensure
they use the in-tree mk files in share/mk, but the top-level make itself
has to rely on whatever environment the bmake used has. For FreeBSD, we
configure the system bmake with .../share/mk:/usr/share/mk, which means
it will pick up src's share/mk whenever run from within the src tree,
but currently for non-FreeBSD we configure our bootstrap bmake only with
bmake's own mk files. This is mostly compatible, with two exceptions:

1. "targets" runs at the top level, but needs TARGET_MACHINE_LIST and
   the corresponding MACHINE_ARCH_LIST_${target}, otherwise it will just
   print an empty list.

2. "universe" and "universe-toolchain", when run at the top level (i.e.
   not via the various wrappers around universe like tinderbox), end up
   failing in universe-toolchain itself with:

     bmake[1]: "/path/to/freebsd/share/mk/src.sys.obj.mk" line 112: Cannot use MAKEOBJDIR=
     Unset MAKEOBJDIR to get default:  MAKEOBJDIR='${.CURDIR:S,^${SRCTOP},${OBJTOP},}'

By including .../share/mk in the default sys path like FreeBSD's system
bmake we ensure that we get the in-tree mk files for the top-level make,
not just sub-makes, and avoid such issues.

Note that we cannot (yet) stop using the installed mk files, since the
MAKEOBJDIRPREFIX check in Makefile runs in the object directory and uses
env -i, thereby losing the MAKESYSPATH exported by src.sys.env.mk. Other
such issues may also exist, though are likely rare if so.

Reviewed by:	sjg
Differential Revision:	https://reviews.freebsd.org/D41544
2023-08-23 17:56:56 +01:00
Jessica Clarke
69cfdc81ea tools/build/make.py: Keep bootstrapped bmake binary up-to-date
We currently assume that any existing bootstrapped bmake binary will
work, but this means it never gets updated as contrib/bmake is, and
similarly we won't rebuild it as and when the configure arguments given
to boot-strap change. Whilst the former isn't necessarily a huge problem
given WANT_MAKE_VERSION rarely gets bumped in Makefile, having fewer
variables is a good thing, and so it's easiest if we just always keep it
up-to-date rather than trying to do something similar to what's already
in Makefile (which may or may not be accurate, given updating FreeBSD
gives you an updated bmake, but nothing does so for our bootstrapped
bmake on non-FreeBSD). The latter is more problematic, though, and the
next commit will be changing this configuration.

We thus now add in two checks. The first is to compare MAKE_VERSION
against _MAKE_VERSION from contrib/bmake/VERSION. The second is to
record at bootstrap time the exact configuration used, and compare that
against what we would bootstrap with.

Reviewed by:	arichardson, sjg
Differential Revision:	https://reviews.freebsd.org/D41556
2023-08-23 17:56:50 +01:00
Jessica Clarke
968a3db715 kbdcontrol: Support building as a bootstrap tool on old and non-FreeBSD
Systems that predate 971bac5ace ("kbd: consolidate kb interfaces
(phase one)") cannot build kbdcontrol since kbdelays and kbrates moved
to sys/kbio.h. Moreover, on non-FreeBSD, it requires all kinds of ioctls
and sysctls that are highly FreeBSD-specific to build, but we use it as
a bootstrap tool to generate the keymaps used by some kernels (LINT ones
in particular). Thus, when bootstrapping kbdcontrol, disable everything
that's not needed for that singular use, and use the in-tree kbio.h to
get the definitions of the necessary structures.

This allows KBDMUX_DFLT_KEYMAP, UKBD_DFLT_KEYMAP and ATKBD_DFLT_KEYMAP
to be enabled when building on non-FreeBSD, and thus LINT kernels.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D41541
2023-08-22 21:00:28 +01:00
Jessica Clarke
5157b451c6 tools/build/make.py: Grow the list of MI targets 2023-08-22 18:53:13 +01:00
Jessica Clarke
3b4da25ead tools/build/make.py: Make flake8 clean 2023-08-22 18:52:57 +01:00
Warner Losh
b376ef36f5 Update freebsd-yeet for mfc 2023-08-21 19:37:20 -06:00
Peter Holm
0d30f3afa6 stress2: No need to write to the console. Add revision to log string 2023-08-19 09:29:09 +02:00
Peter Holm
f322816aaf stress2: Added a syzkaller reproducer 2023-08-19 09:28:10 +02:00
Enji Cooper
0c785f0602 Fix GoogleTest 1.14.0 import
- Prune headers and tests no longer installed after the upgrade.
- Remove GoogleTest-related files when MK_GOOGLETEST == no.
- Disable `-Werror` with gcc to unbreak the gcc12 CI run with
  `lib/googletest`. Any issues found by g++ will be filed
  upstream and hopefully resolved in a future version.
- Remove clang -Werror issues which are resolved in version 1.14.0 to
  avoid masking valid issues.

MFC after:	1 week
MFC with:	28f6c2f292
2023-08-18 19:33:58 -07:00
Enji Cooper
47fc52b181 Update make delete-old
This change updates `make delete-old` to account for files installed by the
following options:
- MK_BSDINSTALL
- MK_DMAGENT
- MK_EXAMPLES
- MK_SENDMAIL

MFC after:	2 weeks
2023-08-18 05:18:36 -07:00
Ed Maste
4722ceb7d5 Use 115200 bps by default for serial communication
9600 was a standard baud rate decades ago, but 115200 is now more common
so choose defaults that are useful to the largest number of users.

Note that boot0sio does not support rates above 9600 so it remains
unchanged.

Reviewed by:	bz, imp, manu
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36295
2023-08-17 13:31:38 -04:00
Dag-Erling Smørgrav
e738085b94 Remove my middle name. 2023-08-17 15:08:30 +02:00
Warner Losh
3b6b476549 freebsd-yeet: Tool to remove $FreeBSD$ from tree
Use at your own risk, but this will remove $FreeBSD$ from your tree. It
does commits and tries to be at least a little smart about it.

Sponsored by:		Netflix
2023-08-16 12:06:37 -06:00
Warner Losh
6ef644f588 Remove $FreeBSD$: one-line lua tag
Remove /^--\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:34 -06:00
Warner Losh
05248206f7 Remove $FreeBSD$: one-line bare tag
Remove /^\s*\$FreeBSD\$$\n/
2023-08-16 11:55:20 -06:00
Warner Losh
b2c76c41be Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:15 -06:00
Warner Losh
fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh
d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh
1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Warner Losh
2a63c3be15 Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
2023-08-16 11:54:29 -06:00
Warner Losh
42b388439b Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
2023-08-16 11:54:23 -06:00
Warner Losh
b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Dimitry Andric
d5af300a69 Fix incremental builds after GoogleTest update
At the moment, several Makefiles under tests/ do not correctly generate
.depend files, which can lead to link errors when doing incremental
(e.g. WITHOUT_CLEAN) builds:

  ld: error: undefined symbol: testing::internal::g_linked_ptr_mutex
  >>> referenced by gtest-port.h:2137 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-port.h:2137)
  >>>               mockfs.o:(testing::internal::linked_ptr_internal::depart())
  >>> referenced by gtest-port.h:2139 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-port.h:2139)
  >>>               mockfs.o:(testing::internal::linked_ptr_internal::depart())
  >>> referenced by gtest-port.h:2139 (/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-port.h:2139)
  >>>               mockfs.o:(testing::internal::linked_ptr_internal::depart())
  >>> referenced 3 more times

For the time being, put in a depend-cleanup.sh workaround for this.

Reported by:	des
Reviewed by:	emaste
Fixes:		28f6c2f292
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D41476
2023-08-16 19:39:22 +02:00
Peter Holm
a953ac19db stress2: Added a 'fsck_ffs -B' regression test 2023-08-13 11:09:39 +02:00
Marius Strobl
76e3b8f54f nanobsd: Remove remainder of sparc64 support
Fixes:	25a66f1fb1 nanobsd: remove sparc64 embedded example
2023-08-06 22:28:13 +02:00
Yuri Pankov
dd3055a75f OptionalObsoleteFiles: add missed keymaps for sycons 2023-08-04 12:09:08 +02:00
Yuri Pankov
b306c604df locale: update to CLDR 43 and Unicode 15
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D41151
2023-08-04 01:47:16 +02:00
Domagoj Stolfa
6de0222840 dtrace: Add WITH_DTRACE_ASAN
See commit 4ae6991228.  This version of
the commit avoids inadvertently changing SHLIBDIR for libdtrace.so.
2023-08-02 09:15:08 -04:00
Ed Maste
77f6be4484 retire SHARED_TOOLCHAIN knob
Toolchain components were historically statically linked.  They became
normal dynamically linked executables in commit 6ab18ea64d.  There is
no need to keep a special case build option for the toolchain; users who
want statically linked toolchain (or any other) components can use the
existing NO_SHARED knob.

Reviewed by:	dim, sjg
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41266
2023-08-01 20:13:22 -04:00
Mark Johnston
5cdaac92e1 dtrace: Revert the addition of WITH_DTRACE_ASAN
The follow-up fix triggers a lib32 build failure, revert everything
until the problem is addressed.
2023-08-01 13:03:10 -04:00
Michael Reifenberger
dd262a8273 Delete i386 support since I dont have a i386 system to rescue and test. 2023-07-31 20:26:14 +02:00
Jessica Clarke
01718a2e94 tools/build: Work around broken Clang FreeBSD resource dir logic pre-13
Prior to Clang 13 (e.g. in the Clang 11 present in 13.0-RELEASE), the
resource directory logic for FreeBSD was broken and would not resolve
symlinks, meaning symlinks would only work if in a directory next to the
containing lib directory. Therefore we cannot even use a symlink for
worldtmp, we have to make a wrapper script that execs the real binary
via an absolute path.

Reported by:	markj
Reviewed by:	markj
Fixes:		65f28f63a7 ("tools/build: Create toolchain symlinks for non-absolute compiler/linker")
Differential Revision:	https://reviews.freebsd.org/D41238
2023-07-31 18:28:08 +01:00
Peter Holm
896809e296 stress2: Added killpg(2) scenarios 2023-07-31 09:07:06 +02:00
Domagoj Stolfa
4ae6991228 dtrace: Add WITH_DTRACE_ASAN
This option is a blanket for all the DTrace-related software. The option
when enabled passes in -fsanitize=address -fsanitize=undeifned, enabling
ASAN and UBSAN in the following components:

 - libdtrace
 - dtrace(1)
 - lockstat(1)
 - plockstat(1)

The option defaults to "no" and is intended as a developer aid.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D41157
2023-07-27 16:07:34 -04:00
Jessica Clarke
65f28f63a7 tools/build: Create toolchain symlinks for non-absolute compiler/linker
If any of the toolchain variables are not absolute then we need to
create a symlink in WORLDTMP/legacy/bin in order to make them available
during a BUILD_WITH_STRICT_TMPPATH build.

Reviewed by:	brooks, jhb
Differential Revision:	https://reviews.freebsd.org/D41188
2023-07-27 05:10:47 +01:00
Jessica Clarke
81805ec300 depend-cleanup.sh: Generalise lib32 code and avoid duplication
By passing through _ALL_libcompats we can avoid hard-coding the list of
libcompats in depend-cleanup.sh. This cleanup also makes clean_dep
shorter by using a loop instead of handling each case explicitly (at the
expense of slightly tweaked logging).

Reviewed by:	brooks, jhb
Differential Revision:	https://reviews.freebsd.org/D41187
2023-07-27 05:10:47 +01:00
Jessica Clarke
64140bb529 OptionalObsoleteFiles.inc: Automatically generate libcompat directories
Reviewed by:	brooks, jhb, emaste
Differential Revision:	https://reviews.freebsd.org/D41186
2023-07-27 05:10:46 +01:00
Marius Strobl
4ef1c6f75d base: Remove support for the VTOC8 partitioning scheme
The removal of the sparc64 support in February 2020 obsoleted the
VTOC8 partitioning scheme as no other FreeBSD platform makes use
of it. Moreover, the code is bitrotting as nothing defines e. g.
LOADER_VTOC8_SUPPORT any more and, thus, should go now, too. With
this change, the following commits are reverted as far as VTOC8
is concerned and parts haven't already previously been deleted
along with prior sparc64 removals:
094fcb157d
a7d366e958
ba8d50d08b

The alignment example d9711c28ef
added to the VTOC8 section of gpart.8 is folded into the MBR one.

This should finally conclude the deorbit of sparc64-specific bits.

        We had joy, we had fun
        we ran Unix on a Sun.
        But that source and the song
        of FreeBSD have all gone.

Credits to Michael Bueker for the original "Unix on a Sun" and Rod
McKuen for the "Seasons in the Sun" lyrics.
2023-07-26 13:16:12 +02:00
Jessica Clarke
dd3ad7c21e tools/build: Tidy up whitespace and comments, and delete duplicate code
We already handle the make and bmake links unconditionally above.
2023-07-25 22:24:02 +01:00
Minsoo Choo
0c3eaa06b3 Remove perforce tools and references
Perforce has been retired since 2019 (commit feea78990c), so there is
no need anymore to keep perforce tools.  Plus, there is no need to
mention perforce admin.

Reviewed by:	emaste, Olivier Certner
Differential Revision:	https://reviews.freebsd.org/D41106
2023-07-20 13:33:39 -04:00
Kyle Evans
e74bc7757a lib/libc/string/ffs*.c: fix problems introduced with D40730
Remove stale dependencies on the remaining old assembly
ffs*/fls* implementations.

Sponsored by:	FreeBSD Foundation
Reported by:	jlduran@gmail.com, jhb
Fixes:		ee8b0c43 (D40730)
Approved by:	jhb
Differential Revision: https://reviews.freebsd.org/D40966
2023-07-14 22:23:31 +02:00
Peter Holm
972e60da74 stress2: Added two syzkaller reproducers 2023-07-11 10:24:19 +02:00
Jessica Clarke
1ec7cb1b5d depend-cleanup: Add verbose (-v) and pretend/dry-run (-n) flags
These are useful for testing new additions to the script. Whilst here,
harden the script a little and improve error messages.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D31007
2023-07-11 01:53:04 +01:00
Jessica Clarke
c70dd03a7f Make sure MACHINE(_ARCH) are exported for depend-cleanup.sh
We run depend-cleanup.sh twice during the build. The second time is the
normal run, where we run it under WMAKEENV and thus have CROSSENV's
MACHINE(_ARCH)=${TARGET(_ARCH)} in the environment. However, the first
time is for bootstrap-tools, where it's run under BMAKEENV and we don't
have any assignments to MACHINE(_ARCH) in the environment, meaning the
script sees them as unset. In practice this doesn't matter since the
only use doesn't apply to bootstrap-tools, but it could be a future
issue. Thus, explicitly export them for depend-cleanup.sh and have the
script verify they're set.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D40968
2023-07-11 01:53:04 +01:00
Jessica Clarke
f3674213e3 depend-cleanup.sh: Fix whitespace
Fixes:	45c4ff15e3 ("depend-cleanup.sh: Handle libc bcmp.S moving to bcmp.c on amd64.")
2023-07-11 00:18:15 +01:00
Dimitry Andric
ce4846ae75 depend-cleanup.sh: cleanup stale ffs.S dependencies for arm and i386
Now that depend-cleanup.sh handles 32-bit dependencies a bit better, get
rid of the stale ffs.S ones, otherwise an incremental build on amd64
will fail with:

  cc: error: no such file or directory: '/usr/src/lib/libc/i386/string/ffs.S'

Fixes:		ee8b0c436d
2023-07-11 00:57:33 +02:00
Dimitry Andric
7ba8cc9b7b depend-cleanup.sh: handle 32-bit dependencies having no 64-bit equivalent
For example with the recent removal of ffs.S for 32-bit arm and i386,
the egrep in clean_dep() did not find any files to remove, even if you
added a "clean_dep lib/libc ffs S" line. This is because it will never
find the ffs.S filename in the 64-bit .depend files for libc.

Split the searching and removing of 32-bit dependencies and objects into
a separate part to cope with this. This can be used similarly later on,
for other bitnesses.

MFC after:	3 days
2023-07-11 00:57:33 +02:00
John Baldwin
1f7e357264 fwctl_fetch: Add a comment describing the tool.
I meant to include this in the earlier commit adding fwctl_fetch but
forgot to amend the commit before pushing it.
2023-07-07 13:06:26 -07:00
John Baldwin
d8bfccb220 fwctl_fetch: A small test utility for the fwctl bhyve device.
This can be run inside a bhyve guest to query the value of fwctl
nodes.  Note that fwctl in bhyve only supports a single hw.ncpu node.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D40803
2023-07-07 13:02:13 -07:00
Alfonso Gregory
5c3b5af6a2 Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
2023-07-07 10:45:18 -06:00
Alfonso Gregory
90597773cd Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
2023-07-07 10:45:17 -06:00
Greg Becker
642cd51102 libthr: Add src.conf variable WITHOUT_PTHREADS_ASSERTIONS
This patch fixes a bug which prevents building libthr without
_PTHREADS_INVARIANTS defined. The default remains to build libthr
with -D_PTHREADS_INVARIANTS. However, with this patch, if one builds
libthr with WITHOUT_PTHREADS_ASSERTIONS=true then the latency to
acquire+release a default pthread mutex is reduced by roughly 5%, and a
robust mutex by roughly 18% (as measured by a simple synthetic test on a
Xeon E5-2697a based machine).

Reviewed by:	jhb, kib, mjg
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D40900
2023-07-07 04:45:09 +03:00
Peter Holm
4631191c8a stress2: Added a regression test 2023-07-06 11:15:13 +02:00
Marius Strobl
eb33b693b3 test: remove remainder of testfloat
These bits are unused since the sparc64-specific glue has been deleted
in f33b14f0.
2023-06-30 22:43:50 +02:00
Ed Maste
229d643c4d depend-cleanup: apply big hammer for OpenSSL 3.0 update
If we find an object corresponding to a source file that existed in
OpenSSL 1.1.1 but not in 3.0 just remove all of the OpenSSL objdirs.

Reviewed by:	dhw
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40750
2023-06-24 19:46:09 -04:00
Mitchell Horne
ba84e87055 pmc: clean up remaining Pentium man page references
These have been removed.

Fixes:	d78896e46f ("pmc(3): remove Pentium-related man pages...")
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2023-06-24 16:30:00 -03:00
Dimitry Andric
bdd1243df5 Merge llvm-project main llvmorg-16-init-18548-gb0daacf58f41
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-16-init-18548-gb0daacf58f41.

PR:		271047
MFC after:	1 month
2023-06-22 20:20:56 +02:00
Peter Holm
83c701af53 stress2: Added two syzkaller reproducers 2023-06-21 11:10:13 +02:00
Ed Maste
2e65cfd3ad Restore dummy WITHOUT_{CAPSICUM,CASPER} descriptions
The makeman CI job ensures that all options have description files.

Bring the CI job back to green by adding back WITHOUT_CAPSICUM and
WITHOUT_CASPER description files (that now state the assoicated options
have no effect).

Fixes: c24c117b96 ("Remove WITHOUT_{CAPSICUM,CASPER} options")
Sponsored by:	The FreeBSD Foundation
2023-06-19 23:20:49 -04:00
Colin Percival
c24c117b96 Remove WITHOUT_{CAPSICUM,CASPER} options
At this point CAPSICUM and CASPER are merely forced on via the newly
added __REQUIRED_OPTIONS list; after stable/14 branches I'll sweep
the tree for MK_{CAPSICUM,CASPER}.

This change will not be MFCed.

Discussed on:	freebsd-arch
Differential Revision:	https://reviews.freebsd.org/D40592
2023-06-19 17:23:09 -07:00
Colin Percival
bce9967915 options/makeman: Handle __REQUIRED_OPTIONS
Teach the code which generates src.conf.5 about __REQUIRED_OPTIONS;
without this change it gets confused and thinks that every option
turns the required options on.

Reviewed by:	sjg, imp
Differential Revision:	https://reviews.freebsd.org/D40591
2023-06-19 17:23:09 -07:00
Peter Holm
fa273fa154 stress2: Added a regression test for mksnap_ffs(8) 2023-06-13 11:01:43 +02:00
Warner Losh
2c0cd59345 checkstyle9.pl: Add check for bad email
Add check for bad email. And remove check for qemu that doesn't matter.

Sponsored by:		Netflix
2023-06-12 10:08:17 -06:00
Peter Holm
6b7a06c3bd stress2: Avoid using "__unused" 2023-06-08 09:49:52 +02:00
Dmitry Chagin
c8dbef44ff xregs_sig: Add avx registers to test
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40384
2023-06-04 12:07:02 +03:00
Dmitry Chagin
0be13a45f7 xregs_sig: Add a ability to handle multiple register banks
While here replace the .global directive by traditionally used .globl.

Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40410
2023-06-04 12:06:25 +03:00
Dmitry Chagin
e5b3cd6100 xregs_sig: Simplify Makefile by using MACHINE_CPUARCH in SRCS
Reviewed by:		kib, jhb
Differential Revision:	https://reviews.freebsd.org/D40383
2023-06-03 20:13:23 +03:00
Dmitry Chagin
1b0d96f3c4 xregs_sig: Finish renaming simd to xregs before adding avx
Reviewed by:		kib, jhb
Differential Revision:	https://reviews.freebsd.org/D40382
2023-06-03 20:11:44 +03:00
Dmitry Chagin
8fdc9ce97c avx_sig: Better naming as the test will include more register banks
Reviewed by:		jhb, kib (early revision)
Differential Revision:	https://reviews.freebsd.org/D40381
2023-06-03 20:10:49 +03:00
Baptiste Daroussin
cb1fc924d2 genl: add new command to list genetlink(4)
This commands list genetlink protocols and its operations and
capabilities

Name: nlctrl
	ID: 0x10, Version: 00, header size: 2, max attributes: 10
	supported operations:
	 - ID: 0x3, Capabilities: 0xe (can modify; can get/dump;
has policy)
	multicast groups:
	 - ID: 0x30, Name: notify
Name: carp
	ID: 0x11, Version: 00, header size: 2, max attributes: 2
	supported operations:
	 - ID: 0x1, Capabilities: 0xe (can modify; can get/dump;
has policy)
	 - ID: 0x2, Capabilities: 0xb (requires admin permission;
can modify; has policy)

Reviewed by:		melifaro
Differential Revision:	https://reviews.freebsd.org/D40330
2023-05-30 13:36:43 +02:00
Dmitry Chagin
4f2c2a122c avx_sig: Adapt avx_sig test for Aarch64
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40309
2023-05-30 11:19:40 +03:00
Dmitry Chagin
68348f41c9 avx_sig: Prepare to add arm64 neon test
Move inlined asm code to a separate source and rename x86 specific xmm
names to more general simd names.

Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40312
2023-05-30 11:18:57 +03:00
Dmitry Chagin
723e25f128 avx_sig: Print statistics by interval enstead of by pressing ^T
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40311
2023-05-29 11:09:17 +03:00
Dmitry Chagin
0a09cfb3f7 avx_sig: Avoid libbsd dependency for modern Glibc
Due to arc4random functions are povided by Glibc 2.36.

Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40310
2023-05-29 11:08:35 +03:00
Peter Holm
750ae32b9e stress2: Initialize variable 2023-05-27 10:34:48 +02:00
Peter Holm
273a89bb14 stress2: Tune to get more slightly broken file systems 2023-05-27 10:31:44 +02:00
Peter Holm
acfb06062a stress2: Fix warnings 2023-05-27 10:31:00 +02:00
Christos Margiolis
0c08479898 git-arc: mention creation of separate reviews in man page
Reviewed by:	imp
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D39963
2023-05-22 22:49:32 +03:00
Christos Margiolis
0688eac1f9 git-arc: fix spelling error in -s option
Reviewed by:	imp
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D39962
2023-05-22 22:49:32 +03:00
Kristof Provost
af15ae9dd1 prepare-commit-msg: add 'Event'
Add 'Event' to the pre-commit template.

The key word is already documented at
https://docs.freebsd.org/en/articles/committers-guide/#_include_appropriate_metadata_in_a_footer

Suggested by:	imp@
Event:		BSDCan 2023
Differential Revision:	https://reviews.freebsd.org/D40184
2023-05-22 16:01:09 +02:00
Peter Holm
be8d01b515 stress2: Added a faster test of fsck_ffs by omitting mount(8) and umount(8) 2023-05-22 10:07:40 +02:00
Peter Holm
ca0088ae27 stress2: Occasionally modify 8 bits 2023-05-22 10:05:34 +02:00
Kyle Evans
ccb59683b9 arm64: add tests for swp/swpb emulation
One test is suitable to be hooked up to the build, so I've done this
here.  The other test lives in tools/regression because failure is a
bit more subjective -- generally, one runs it for some unbounded amount
of time and observe if it eventually exits because two threads acquired
the same mutex.

Reviewed by:	imp, mmel
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D39668
2023-05-15 10:42:16 -05:00
Wolfram Schneider
b3087b63da remove stale portsinfo script 2023-05-15 06:34:20 +00:00
Wolfram Schneider
1206aa2786 remove stale handbook scripts 2023-05-15 06:30:34 +00:00
Wolfram Schneider
27783115a9 remove stale message-id scripts 2023-05-15 06:29:39 +00:00
Wolfram Schneider
1cf4473fa3 remove stale script epfe.pl
tools/tools/epfe/epfe.pl was a perl script that formerly generated some
printing example files from content in a very old version of the handbook.

Reported by:	wblock
2023-05-15 06:22:41 +00:00
Simon J. Gerraty
722cfce5f4 Fix typo and use .Fx in WITH_DIRDEPS_BUILD 2023-05-12 09:49:21 -07:00
Warner Losh
4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Simon J. Gerraty
2b519b1707 Update description of WITH_DIRDEPS_BUILD 2023-05-12 09:42:21 -07:00
Simon J. Gerraty
df9974197e Add description of WITH_META_ERROR_TARGET 2023-05-12 09:21:30 -07:00
Ed Maste
0e04dd3b66 pkgbase: report error if files are installed multiple times
Files installed by `make installworld` should be installed only once.

PR:		244596
Sponsored by:	The FreeBSD Foundation
2023-05-09 21:10:03 -04:00
Ed Maste
fc2e2c950d src.conf: add WITH_TOOLCHAIN description
It is not used by the in-tree default configuration, but adding it
allows downstream projects with different defaults to make use of
Cirrus-CI (as the makeman test added in 85e8c2a034 requires that
there are no missing option descriptions).

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39936
2023-05-03 11:41:58 -04:00