Commit graph

1456 commits

Author SHA1 Message Date
Mark Johnston
f30669ba97 bpf: Make bpf.h self-contained
PR:		286539
MFC after:	3 days
Approved by:	re (cperciva)

(cherry picked from commit 981af1192cfa5ecd7bee9fe47386ed9d45397828)
(cherry picked from commit 48881a2680ab42ea1b06d1c9685df9d295991d16)
2025-05-07 12:05:08 +00:00
Mark Johnston
399bc0c182 netinet: Make in_systm.h self-contained
PR:		286539
MFC after:	3 days
Approved by:	re (cperciva)

(cherry picked from commit 75d173a84836d14b12a0f747ffed7d37766dd274)
(cherry picked from commit 02dde7c43fe76a5dcdc170de1c2740a31629e106)
2025-05-07 12:04:59 +00:00
Ahmad Khalifa
ac5378d93c Add build option for the ia32 loader
In preparation for supporting 64-bit machines with 32-bit UEFI firmware,
add a build option for compiling the ia32 loader. Currently unused.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1098

(cherry picked from commit fe3f792f9a2982678138e239f5e8d66e8ee71aeb)
2025-03-25 19:28:38 -06:00
Tijl Coosemans
487d79d44f devd: Don't install autofs.conf with WITHOUT_AUTOFS
(cherry picked from commit 272b4b764bdfb563f655da37ef9ec8c01c77f386)
2025-03-23 16:32:33 +01:00
Olivier Certner
1bd029729e
MAC: mac.h: Separately test inclusion from userspace
Reviewed by:    jamie
Approved by:    markj (mentor)
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D46897

(cherry picked from commit b47f4718c0725f4ea2e8f88359e86661e8dc4a38)
2025-01-16 19:06:54 +01:00
Vladimir Kondratyev
ccfbbe2d8a rtlbtfw: Firmware loader for Realtek 87XX/88XX bluetooth USB adaptors
Firmware files are available in the comms/rtlbt-firmware port.

Sponsored by:	Future Crew LLC
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D46739

(cherry picked from commit 5036d9652a5701d00e9e40ea942c278e9f77d33d)
2024-12-22 06:34:35 +03:00
Jessica Clarke
f69b6410a6 depend-cleanup.sh: Extend clean_dep to support a custom regex
This will avoid having to duplicate the loop every time the default
regex isn't good enough, and will be used by upcoming commits.

(cherry picked from commit cc30f4ae6790cf4f19bc4787d7528dfea79ef27a)
2024-12-13 20:58:38 +00:00
Martin Matuska
397a3893db depend-cleanup.sh: fix dependency changes from latest OpenZFS import
Backports fd3d3240b, 0980d0a03, 7a7741af18d (partial), 73c7cb57a
2024-12-12 18:29:09 +01:00
Jessica Clarke
be778581eb depend-cleanup.sh: Fix overzealous rescue.mk cleanup
grep -q -v means "are there any lines that don't match", not "are there
no lines that match", and since the file has lines other than ones with
nvme_util.o when up-to-date this triggers on every build.

Fixes:		26a09db3add3 ("Fix incremental build with WITH_NVME newly enabled")
MFC after:	1 week

(cherry picked from commit e546c3950a2c98b298b8ddfb68b50cb496fe7fac)
2024-12-09 16:24:25 +00:00
Jessica Clarke
9266d812ea depend-cleanup.sh: Fix pretend (-n) mode
Fixes:		26a09db3add3 ("Fix incremental build with WITH_NVME newly enabled")
MFC after:	1 week

(cherry picked from commit 7ce171bd4220b2e8946556bb806c787b51324993)
2024-12-09 16:24:25 +00:00
Brooks Davis
2d7d4c6626 llvm19: permit incremental builds from llvm18
Detect and delete out of date clang-tblgen produced output.  I found it
sufficent for compilation to delete only arm_*.inc files, but it seems
safer to regenerate all output and a few extra clang-tblgen runs pales
in comparison to the full build we're doing at this point.

Reviewed by:	dim, emaste
Differential Revision:	https://reviews.freebsd.org/D47270

(cherry picked from commit 8b2e7da70855e48c0ba8c874fa528b599fb7c9a9)
2024-12-02 16:47:45 +01:00
Dimitry Andric
0eb20fbda7 Merge llvm-project main llvmorg-19-init-18630-gf2ccf80136a0
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-19-init-18630-gf2ccf80136a0, the
last commit before the upstream release/19.x branch was created.

PR:		280562
MFC after:	1 month

(cherry picked from commit 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
2024-12-01 12:16:52 +01:00
Brooks Davis
22aed646a5 src.conf.5: LOADER_BIOS_TEXTONLY default change
WITH_LOADER_BIOS_TEXTONLY is now the default so document
WITHOUT_LOADER_BIOS_TEXTONLY.

Fixes:		23dee252daf2 loader: Change this BIOS tradeoff...
(cherry picked from commit 50b5a37a12d032085276b1f0ebb5f92c0cabed32)
2024-10-30 22:16:59 -06:00
Konstantin Belousov
b90d68c9b2 jemalloc: set LG_VADDR to 64 on amd64
(cherry picked from commit eade2001aa9d91440886de8359a4dec9edcde2a9)
2024-10-15 18:06:44 +03:00
Mark Johnston
20191b71ba src.conf: Add a MK_ZFS_TESTS knob
The in-tree ZFS test suite is somewhat outdated and I see a number of
failures there.  I tend to think that we want to integrate the OpenZFS
test suite somehow, replacing the legacy one, though it's also possible
to run that as a separate test suite.

In any case, if one wants to run the OpenZFS test suite separately, it's
useful to be able to disable installation of the legacy ZFS test suite,
so let's provide a src.conf option to do that.

Reviewed by:	asomers
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D46476

(cherry picked from commit 24affded3d4ec5fafb6b22f773ec1e20d73b9b03)
2024-09-20 11:39:16 +00:00
Wolfram Schneider
9ff3c094fd stale symlinks: configurable obj dir prefix
Use $MAKEOBJDIRPREFIX if set, otherwise /usr/obj

(cherry picked from commit ccb0365643dc5e8d37ada3789bbe370b81ba5b3c)
2024-09-16 08:30:06 +00:00
Wolfram Schneider
a213882b9c stale-symlink-buildworld.sh: improve documentation
(cherry picked from commit c77ca9a72c9934c407852f00d88cba09f5c9e31f)
2024-09-16 08:30:06 +00:00
Jessica Clarke
c3d7b96df0 tools/build/make.py: Avoid Python 3.7+ subprocess.run capture_output
This is just a convenient alias for setting stdout and stderr to PIPE,
so substitute it for that to be compatible with Python 3.6.

Fixes:	69cfdc81ea ("tools/build/make.py: Keep bootstrapped bmake binary up-to-date")

(cherry picked from commit b771d5705fc95445d4d81e054be664b7842156ff)
2024-09-07 01:20:39 +01:00
Jessica Clarke
8161eb6182 tools/build/make.py: Add missing comma to fix tinderbox and worlds
The missing comma meant this was interpreted as a single target called
"tinderboxworlds", and so neither tinderbox nor worlds were recognised
as being MI targets (i.e. still required TARGET(_ARCH) to be given).

Fixes:	5157b451c6 ("tools/build/make.py: Grow the list of MI targets")

(cherry picked from commit edec803c5b72681b39ce969cc16d634e08bb3ac2)
2024-09-07 01:20:36 +01:00
Jessica Clarke
0abe896f19 beinstall: Pass -B to etcupdate
Since commit 246364454f ("etcupdate: Use new buildetc and installetc
targets when available"), beinstall has been much slower for the
etcupdate step, as it's been doing a kernel-toolchain (admittedly
without LLVM itself being built). Given beinstall requires an object
tree to already have been built and just installs it, we can pass -B to
beinstall to reuse that tree rather than build kernel-toolchain in
another one.

Reported by:	olivier
Tested by:	olivier
MFC after:	1 week

(cherry picked from commit 18aef07cfac41fde763e1328366cc6e334bb9254)
2024-09-07 01:03:14 +01:00
Warner Losh
38b00f73b8 options: Make it clearer some x86 / BIOS only things
Suggested by: jrtc27
Sponsored by: Netflix

(cherry picked from commit bf4f27e85aa62e459fb4cde9ebd51e32bdac7910)
2024-08-27 12:32:54 -04:00
John Baldwin
7b182a286d Remove the MK_NVME build option
The drivers and utilities are now built and installed unconditionally.

Reviewed by:	imp, emaste
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44843

(cherry picked from commit ee3187f6fa7986c6bfaa97528e050b796eaca343)
2024-08-27 11:54:45 -04:00
Cy Schubert
818e3dc03d tools: Remove stray "then"
Fixes:		26a09db3add3
(cherry picked from commit f7f570eb97c70bc7f545d79a96c3192181bb8dd1)
2024-08-26 19:39:32 -04:00
Brooks Davis
8d2b36ef6c Fix incremental build with WITH_NVME newly enabled
rescue.mk doesn't get updated when options change so nvme_util.o is now
missing on architectures were NVME was previously marked BROKEN.

Reviewed by:	imp
Fixes:		2fda3ab0ac19 WITH_NVME: Remove from broken.
Differential Revision:	https://reviews.freebsd.org/D44826

(cherry picked from commit 26a09db3add30238b99e3214c56a3aee63fd71d1)
2024-08-26 19:39:15 -04:00
Warner Losh
e179ee000e loader: Add WITH/WITHOUT_LOADER_PXEBOOT build option
Make it possible to disable pxeboot. This loader will fail to build when
it's too large. When /boot/loader needs to be larger like that, this
options will disable a component whose build will fail. It is an explicit
option rather than implicit when things are too large to force the user to
make the explicit tradeoffs rather than wonder why they have a stale pxeboot
or other odd failure mode.

MFC After:		3 days
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D46212

(cherry picked from commit 20d35d5817851df3a6d20e75df2e14a192b94940)
2024-08-13 11:31:38 -06:00
Warner Losh
b013b81a03 loader: Document that WITH_BEARSSL may need other tweaks
/boot/loader is right up aginst the 500k limit we have to make sure
everything works in a wide variety of environments. However, adding
WITH_BEARSSL can push it over the edge since we are so close to the
limit with it enabled. One may also need to increase LOADERSIZE when
enabling it. It's often safe to go much higher, especially when you
don't plan on using pxeldr. Document this trade off here.

MFC After:		3 days
Sponsored by:		Netflix
Reviewed by:		sjg, markj
Differential Revision:	https://reviews.freebsd.org/D46211

(cherry picked from commit 7ee781e2bfc2558060dec95564414a0bff4415c1)
2024-08-13 11:31:38 -06:00
Ed Maste
5daa7f5bef depend-cleanup: remove entries from 2020 and 2021
> These tests increase the build time (albeit by a small amount), so
> they should be removed once enough time has passed and it is extremely
> unlikely anyone would try a NO_CLEAN build against an object tree from
> before the related change.

The comment suggests a year is a reasonable period but we'll be somewhat
more conservative for now, in part so that we retain different examples
of special cases.

Reviewed by:	brooks, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46178

(cherry picked from commit 4a06d149371c16287e1dd5a8fa51e92346a0c3f4)
2024-08-06 15:39:52 -04:00
Jose Luis Duran
ed4fbdda58 tools/build/make.py: Minor typo fix
If the object directory prefix does not exist, make.py previously exited
with a message indicating that the chosen prefix does not exit.

Reviewed by:	emaste
Pull request:	https://github.com/freebsd/freebsd-src/pull/1348

(cherry picked from commit d55de30efd09ee011bf4604be1c15ce4155775c1)
2024-08-06 15:39:52 -04:00
Wolfram Schneider
cf1bc41b29 stale-symlink-buildworld.sh: a script to check for stale symlinks on a FreeBSD system
You can run the script before or after `make installworld'

You may also check your local ports with:

  env STALE_SYMLINK_BUILDWORLD_DIRS=/usr/local ./stale-symlink-buildworld.sh

PR: 276235

(cherry picked from commit e880dd644f63fbe068c38b73b44aa7e7c5f176f3)
2024-07-13 10:11:51 +00:00
Dimitry Andric
e710425beb Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

PR:		276104
MFC after:	1 month

(cherry picked from commit cb14a3fe5122c879eae1fb480ed7ce82a699ddb6)
2024-04-19 23:12:22 +02:00
Dimitry Andric
c9157d925c Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

PR:		276104
MFC after:	1 month

(cherry picked from commit 5f757f3ff9144b609b3c433dfd370cc6bdc191ad)
2024-04-19 23:12:03 +02:00
Warner Losh
fcfd7396ae loader: Add new option WITH_LOADER_BIOS_TEXTONLY
This option will omit all the graphics support, the teken terminal
library, video mode support, etc and support a simple, basic, text-only
video console for the x86 BIOS boot loader. It uses the FreeBSD 12
version of vidconsole.c. It defaults to NO.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D43912

(cherry picked from commit 63e9c976640d05ef65842eaf3d54de9a8d48cbdc)
2024-04-16 13:54:25 -06:00
Baptiste Daroussin
16a6da44e2 nuageinit: add basic support for cloudinit.
this is a very early script to support cloudinit, it does not intend to
be a full featured cloudinit client, but will support a good enough
subset to be viable in most case.

It support nocloud and openstack config-2 config drive mode (iso9660 or
msdosfs)

The following features are currently supported:
- adding users (including a default user named 'freebsd' with password
  'freebsd'
- adding groups
- adding ssh keys
- static ipv4, static ipv6, dynamic ipv4

With this one is able to use the 'bring your own image feature" out of
box.

It is expected that the script grows the support of other clouds
supporting cloud-init, contributions are welcomed.

It is designed to be only run once via the firstboot mecanism.

Sponsored by:	OVHCloud
Differential Revision:	https://reviews.freebsd.org/D44141

(cherry picked from commit a42d6f76018e4ed8324e319ab48aac904bda437c)
(cherry picked from commit c051f22bce42d920abba61bd7cf4ef5b6a270ffa)
(cherry picked from commit b8c053c9a612651d4909f7a323088f3e92485b7b)
(cherry picked from commit 9eae9233fdcc946945f4191e1413f548adfa2943)
2024-04-11 13:52:52 +02:00
Olivier Cochard
18ec7a9003 OptionalObsoleteFiles: add missed cuda wrappers include files
Files introduced since clang 17.0.2.

Approved by:	dim
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D44597

(cherry picked from commit a9275714690942e973ae69a3c179e3a435cf50dd)
2024-04-06 18:36:36 +02:00
Dag-Erling Smørgrav
ddee3ee4e0 usr.bin: Make lorder conditional on MK_TOOLCHAIN.
MFC after:	1 week
Reviewed by:	allanjude, markj
Differential Revision:	https://reviews.freebsd.org/D44558

(cherry picked from commit 125c4560bc70971b950d035cfcd2255b89984011)
2024-04-04 11:53:25 +02:00
Dimitry Andric
c4149abc5d Optionally create full debuginfo for llvm-related executables
Commit de6feefdb7 limited the amount of debuginfo generated for clang
and other llvm-related executables. This was done to save disk space and
memory during building, but it makes debugging any of these executables
much harder.

Add a new src.conf(5) setting, WITH_LLVM_FULL_DEBUGINFO, to generate
full debuginfo instead. This is off by default, but could for example be
enabled for release builds or snapshots, so llvm executables are easier
to debug.

Reviewed by:	emaste
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D43839

(cherry picked from commit 73ff7384e025033abc98fd5437a48beb8077a90b)
2024-03-08 09:15:34 +01:00
Andrew Turner
55e2bfab44 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

(cherry picked from commit ceefd491c7f0490515fadca2f3740cb24e3f449e)
2024-02-19 13:11:00 +00:00
Gregory Neil Shapiro
58ae50f31e Merge commit '850ef5ae11d69ea3381bd310f564f025fc8caea3'
Merge vendor sendmail 8.18.1 into HEAD

(cherry picked from commit d39bd2c1388b520fcba9abed1932acacead60fba)

Add new source file for sendmail 8.18.1

(cherry picked from commit 19d4fb85bf17579780e8f0c3cbae8a5e92a6922e)

New sendmail 8.18.1 cf file

(cherry picked from commit 1b6a5580c1f999fb1ba5f9860cf63a8aefc55b3c)

Minor change to update these files so new freebsd*.cf files are
generated

(cherry picked from commit 2c191ba6b0b5d1b3729a5ac428d51cfc5d5f3d2e)

Belatedly update version and date for sendmail 8.18.1 upgrade

(cherry picked from commit 31fbc98c949bfca30ab55afef04b4396a61b7e92)

Add a note about sendmail 8.18.1's stricter SMTP protocol enforcement
(akin to commit 21c1f1deb6a3ac6a60e4516261e5264a28e0b7a6 in main)

Update import date for stable/14

Relnotes:	Yes
Security:	CVE-2023-51765
2024-02-07 02:29:43 +00:00
Jessica Clarke
2fbed5e9ea 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

(cherry picked from commit ff7c12c1f17e52337169d8ce48433fae96a9c9db)
2024-01-18 14:30:06 -08:00
Jessica Clarke
d735315d4d 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

(cherry picked from commit 881ec81372e0748f2869fe6c18e909afa8304e7a)
2024-01-18 14:26:48 -08:00
Dimitry Andric
fe013be447 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

(cherry picked from commit 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
2024-01-07 18:46:17 +01:00
John Baldwin
e7b9d03df1 OptionalObsoleteFiles.inc: Add libnss_tacplus_p.a as an old profiled library
Noticed this was still present after upgrading a 12.x stable host to
14.0 stable.

(cherry picked from commit e7300a8f638e6eb801953c0fb9e53d99308dc3f0)
2024-01-04 16:29:43 -08:00
Baptiste Daroussin
693ea5a3b1 sendmail: remove all m4 files with WITHOUT_SENDMAIL
(cherry picked from commit 358f8a7add3c83f5f5a37b4c295e116ec511936b)
2023-12-04 11:22:22 +01:00
Brooks Davis
d5aedf850d 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

(cherry picked from commit 4cd0f014a1285c1b57e583b260282ca433a8ccdd)
2023-12-02 00:12:02 +00:00
Brooks Davis
e027fb0ee8 Sort MK_NETLINK option
Reviewed by:	emaste, imp, netchild
Pull Request:	https://github.com/freebsd/freebsd-src/pull/896

(cherry picked from commit c90d0600ee000e7874a55e3015953bd670574093)
2023-12-02 00:11:33 +00:00
Brooks Davis
084cbd8c72 Sort MK_GNU_DIFF option
Reviewed by:	emaste, imp, netchild
Pull Request:	https://github.com/freebsd/freebsd-src/pull/896

(cherry picked from commit 2b3bf27da41f1481b2025445c6adf27f0d50de99)
2023-12-02 00:11:32 +00:00
Brooks Davis
b35fc7c315 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

(cherry picked from commit fb173fc89e9c6908426bf60b1a449f1ff19d51df)
2023-12-02 00:11:32 +00:00
Brooks Davis
cd9af23a9c Sort MK_EFI and MK_FTP options
Reviewed by:	emaste, imp, netchild
Pull Request:	https://github.com/freebsd/freebsd-src/pull/896

(cherry picked from commit 16743f0e0b1567b38e5071814d61c04b557bcaa0)
2023-12-02 00:11:31 +00:00
Brooks Davis
e4f8bc4dbe 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

(cherry picked from commit a62cefbb5c835eb17057bca98106f325b13bdead)
2023-12-02 00:11:31 +00:00
Brooks Davis
298dcc251b Sort MK_HYPERV option
Reviewed by:	emaste, imp, netchild
Pull Request:	https://github.com/freebsd/freebsd-src/pull/896

(cherry picked from commit e70ad278f45d72a8209e61a312481910d3e03b45)
2023-12-02 00:11:30 +00:00