<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/tools/build/Makefile, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>tools/build/Makefile: Always add md4.h to SYSINCS</title>
<updated>2026-04-09T14:30:20+00:00</updated>
<author>
<name>Lexi Winter</name>
<email>ivy@FreeBSD.org</email>
</author>
<published>2026-04-09T14:30:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0dd9c4abf0e56b9d4f6f7204a68b1475f2bbf1fc'/>
<id>0dd9c4abf0e56b9d4f6f7204a68b1475f2bbf1fc</id>
<content type='text'>
Since libmd was added to the bootstrap, building main on stable/14
fails because of an incompatibility in its old md4.h.  Fix this by
always including md4.h in the bootstrap headers, instead of only
doing so when building on a non-FreeBSD host.

Fixes:		50de0bf50512 ("flua: Always build as a bootstrap tool")
Reported by:	olce
Reviewed by:	olce, kevans
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D56327
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since libmd was added to the bootstrap, building main on stable/14
fails because of an incompatibility in its old md4.h.  Fix this by
always including md4.h in the bootstrap headers, instead of only
doing so when building on a non-FreeBSD host.

Fixes:		50de0bf50512 ("flua: Always build as a bootstrap tool")
Reported by:	olce
Reviewed by:	olce, kevans
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D56327
</pre>
</div>
</content>
</entry>
<entry>
<title>cross-build: Provide mempcpy when building on macOS</title>
<updated>2026-03-23T16:56:09+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2026-03-23T16:56:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=47402c9422ec6c9ba76d96414f5a08bd35a9e1fd'/>
<id>47402c9422ec6c9ba76d96414f5a08bd35a9e1fd</id>
<content type='text'>
We could patch the tzcode config to not use it, but it's simple to
provide an implementation of it and avoid spreading cross-build
bootstrapping special cases.

Fixes:		ff2c98b30b57 ("tzcode: Update to 2026a")
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We could patch the tzcode config to not use it, but it's simple to
provide an implementation of it and avoid spreading cross-build
bootstrapping special cases.

Fixes:		ff2c98b30b57 ("tzcode: Update to 2026a")
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>build: add stddef.h to define ptraddr_t as required</title>
<updated>2026-02-19T15:10:32+00:00</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2026-02-19T15:05:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=89c3ae5fc9cc24af940699b7e282fd24763f7ffa'/>
<id>89c3ae5fc9cc24af940699b7e282fd24763f7ffa</id>
<content type='text'>
Effort:		CHERI upstreaming
Sponsored by:	Innovate UK
Reviewed by:	kib
Co-authored-by:	Alfredo Mazzinghi &lt;am2419@cl.cam.ac.uk&gt;
Co-authored-by:	Alex Richardson &lt;Alexander.Richardson@cl.cam.ac.uk&gt;
Differential Revision:	https://reviews.freebsd.org/D55308
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Effort:		CHERI upstreaming
Sponsored by:	Innovate UK
Reviewed by:	kib
Co-authored-by:	Alfredo Mazzinghi &lt;am2419@cl.cam.ac.uk&gt;
Co-authored-by:	Alex Richardson &lt;Alexander.Richardson@cl.cam.ac.uk&gt;
Differential Revision:	https://reviews.freebsd.org/D55308
</pre>
</div>
</content>
</entry>
<entry>
<title>cross-build: Avoid adding &lt;sys/cdefs.h&gt; to SYSINCS</title>
<updated>2025-12-29T02:04:45+00:00</updated>
<author>
<name>Ayrton Munoz</name>
<email>a.munoz3327@gmail.com</email>
</author>
<published>2025-12-29T02:02:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b6672803a1cf10dd1c912fe6571a8d426b8868bd'/>
<id>b6672803a1cf10dd1c912fe6571a8d426b8868bd</id>
<content type='text'>
Summary:
The sys/cdefs.h in src is incompatible with glibc's sys/cdefs.h so
cross-building broke when the former was added to SYSINCS in 1c9ff80f06. This
commit adds a guard around that to only do that when building on FreeBSD. This
should fix github CI.

Test Plan:
Ran buildkernel using tools/build/make.py on linux in github CI and
locally on FreeBSD to double check nothing broke.

Reviewed by:    dim
MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D54385
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
The sys/cdefs.h in src is incompatible with glibc's sys/cdefs.h so
cross-building broke when the former was added to SYSINCS in 1c9ff80f06. This
commit adds a guard around that to only do that when building on FreeBSD. This
should fix github CI.

Test Plan:
Ran buildkernel using tools/build/make.py on linux in github CI and
locally on FreeBSD to double check nothing broke.

Reviewed by:    dim
MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D54385
</pre>
</div>
</content>
</entry>
<entry>
<title>tools.build: also add sys/_visible.h to SYSINCS</title>
<updated>2025-12-26T23:11:17+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2025-12-26T23:07:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=086bedb11a853801e82234b8a1a64f0df52d9e52'/>
<id>086bedb11a853801e82234b8a1a64f0df52d9e52</id>
<content type='text'>
This is needed since sys/cdefs.h includes sys/_visible.h.

Reported by:	kib
Fixes:		1c9ff80f0635
MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is needed since sys/cdefs.h includes sys/_visible.h.

Reported by:	kib
Fixes:		1c9ff80f0635
MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>tools.build: add sys/cdefs.h to SYSINCS, since lots of other headers use it</title>
<updated>2025-12-26T15:26:13+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2025-12-26T15:26:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1c9ff80f06350fa44b7e50ce09ad665ab0082abb'/>
<id>1c9ff80f06350fa44b7e50ce09ad665ab0082abb</id>
<content type='text'>
This is needed to let the legacy stage compile against newer versions of
sys/font.h, which transitively includes sys/cdefs.h, and requires the
new __nonstring macro from it.

Fixes:		e2c93ed09f25
MFC after:	3 days
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is needed to let the legacy stage compile against newer versions of
sys/font.h, which transitively includes sys/cdefs.h, and requires the
new __nonstring macro from it.

Fixes:		e2c93ed09f25
MFC after:	3 days
</pre>
</div>
</content>
</entry>
<entry>
<title>Use install instead of cp to copy bootstrap tools</title>
<updated>2025-11-15T03:18:35+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2025-11-15T03:18:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f3cf4c0af5af6ce95065a615f998117ec1cd63aa'/>
<id>f3cf4c0af5af6ce95065a615f998117ec1cd63aa</id>
<content type='text'>
We need to preserve modification times on bootstrap tools, but `cp -p`
also tries to preserve flags, which fails if OBJROOT is on NFS.  A -N
option was added to cp for this purpose, but trying to use that would
break cross-building on hosts that don't have that option.  The best
remaining option is `install -p`, which we already assume is present.

PR:		275030
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D53751
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to preserve modification times on bootstrap tools, but `cp -p`
also tries to preserve flags, which fails if OBJROOT is on NFS.  A -N
option was added to cp for this purpose, but trying to use that would
break cross-building on hosts that don't have that option.  The best
remaining option is `install -p`, which we already assume is present.

PR:		275030
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D53751
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/build: Bring in stdckdint.h if needed</title>
<updated>2025-10-08T12:50:25+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-10-07T13:53:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=687cb66411c7bc220ccb90cedc2f7486567d55b6'/>
<id>687cb66411c7bc220ccb90cedc2f7486567d55b6</id>
<content type='text'>
This is needed when bootstrapping libc, reallocarray.c and
recallocarray.c include stdckdint.h now.

Reviewed by:	emaste
Fixes:	7233893e9496 ("lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray")
Differential Revision:	https://reviews.freebsd.org/D52932
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is needed when bootstrapping libc, reallocarray.c and
recallocarray.c include stdckdint.h now.

Reviewed by:	emaste
Fixes:	7233893e9496 ("lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray")
Differential Revision:	https://reviews.freebsd.org/D52932
</pre>
</div>
</content>
</entry>
<entry>
<title>flua: support our flua modules in the bootstrap flua</title>
<updated>2025-10-04T02:16:51+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2025-10-04T02:16:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=151bd3516b541823b16793460d73916e63d2b9c1'/>
<id>151bd3516b541823b16793460d73916e63d2b9c1</id>
<content type='text'>
This version builds every module into the flua binary itself, since all
of the bootstrap tools are built -DNO_SHARED.  As a result, we also
cannot dlsym(), so we can't really discover the names of our newly
builtin modules.  Instead, just build out a linker set with all of our
luaopen_*() functions to register everything up-front.

Building in all of the modules isn't strictly necessary, but it means
that we have an example of how to add a bootstrap module everywhere you
go and one doesn't need to consider whether bootstrap flua can use a
module when writing scripts.  On my build machine, the consequence on
our binary size is an increase from around 1.6M -&gt; 1.9M, which isn't
really that bad.

.lua modules can install into their usual path below $WORLDTMP/legacy
and we'll pick them up automagically by way of the ctor that sets up
LUA_PATH early on.

This re-lands bootstrap module support with a more sensible subset, and
after having verified that it cross-builds fine on macOS and Linux -- we
cannot do libfreebsd on !FreeBSD because it's more system header
dependant.  We also need to bootstrap libmd to bring in libhash, and
libucl + libyaml.

Reviewed by:	bapt, emaste (both previous version)
Differential Revision:	https://reviews.freebsd.org/D51890
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This version builds every module into the flua binary itself, since all
of the bootstrap tools are built -DNO_SHARED.  As a result, we also
cannot dlsym(), so we can't really discover the names of our newly
builtin modules.  Instead, just build out a linker set with all of our
luaopen_*() functions to register everything up-front.

Building in all of the modules isn't strictly necessary, but it means
that we have an example of how to add a bootstrap module everywhere you
go and one doesn't need to consider whether bootstrap flua can use a
module when writing scripts.  On my build machine, the consequence on
our binary size is an increase from around 1.6M -&gt; 1.9M, which isn't
really that bad.

.lua modules can install into their usual path below $WORLDTMP/legacy
and we'll pick them up automagically by way of the ctor that sets up
LUA_PATH early on.

This re-lands bootstrap module support with a more sensible subset, and
after having verified that it cross-builds fine on macOS and Linux -- we
cannot do libfreebsd on !FreeBSD because it's more system header
dependant.  We also need to bootstrap libmd to bring in libhash, and
libucl + libyaml.

Reviewed by:	bapt, emaste (both previous version)
Differential Revision:	https://reviews.freebsd.org/D51890
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "flua: support our flua modules in the bootstrap flua"</title>
<updated>2025-10-04T00:53:28+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2025-10-04T00:52:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bbef1c72b4873b657fdb0466b48b15d1d4f0a731'/>
<id>bbef1c72b4873b657fdb0466b48b15d1d4f0a731</id>
<content type='text'>
This reverts commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f, because it
cannot work at all on macOS without more work, at a minimum.  We use
linker sets for module discovery, but we don't have a version of this
that works for mach-o at the moment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f, because it
cannot work at all on macOS without more work, at a minimum.  We use
linker sets for module discovery, but we don't have a version of this
that works for mach-o at the moment.
</pre>
</div>
</content>
</entry>
</feed>
