- Provide a sys/md4.h in the cross-build environment to fix bootstrap
of libmd.
- flua now exposes WTRAPPED which isn't incredibly common- make it
conditional, we probably won't be using it in any bootstrap context
any time soon.
Fixes: 442e0975ee ("Consolidate md4 implementations written in C")
Fixes: c2caf3b331 ("flua: posix: add more useful functions [...]")
and allow to revert it back to 48 with WITHOUT_JEMALLOC_LG_VADDR_WIDE build
option.
Reviewed by: andrew, emaste
Sponsored by: Advanced Micro Devices (AMD)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D46686
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
Just as we skip the cleanup for i386 due to still having a custom
syscall.S, we also need to do the same for lib32 on amd64, so filter it
out of ALL_libcompats here.
Fixes: a650ec0e55 ("lib{c,sys}: fix incremental builds")
Although there is no longer a syscall.S in the source tree, the
generated file is still called syscall.S, so the syscall\.S regex still
matches the .depend file. Previously it looked like:
syscall.o \
/path/to/src/lib/libc/MACHINE/sys/syscall.S \
...
or
syscall.o \
/path/to/src/lib/libsys/MACHINE/syscall.S \
...
Now it looks like:
syscall.o: syscall.S \
...
Thus, match on the file having a directory specified, to distinguish it from
the generated case where it's adjacent in the OBJDIR. Note the .* is needed due
to the use of egrep -w.
Fixes: 3a4b04e82d ("depend-cleanup.sh: Simplify handling for stale syscall.S")
A source file with the same name is still used to build an abd_os.o, it
just comes from a different directory. Thus we need to include part of
the path in the regex too. Technically zfs/abd_os\.c would suffice given
it's now in sys/contrib/openzfs/lib/libzpool/abd_os.c, but this seems
clearer and less likely to have future false-positives.
Fixes: fd3d3240b0 ("depend-cleanup.sh: Add a rule to work around abd_os.c dependency changes")
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: 26a09db3ad ("Fix incremental build with WITH_NVME newly enabled")
MFC after: 1 week
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
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
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
/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
> 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
As discussed on the freebsd-arch mailing list[1]. For historical
reasons FreeBSD's buildworld and buildkernel targets started by cleaning
the object tree, for traditional (non-metamode) builds.
Cleaning is not necessary when dependencies are properly tracked, and we
have a somewhat kludgey script[2] to handle some known cases where deps
were mishandled by traditional builds. Be consistent with the vast
majority of open source build systems by default, and do not clean at
the beginning of buildworld or buildkernel.
Users may set WITH_CLEAN in src.conf(5) to restore the previous
behaviour, or run `make cleanworld` and/or `make cleankernel` before
starting a build.
[1] https://lists.freebsd.org/archives/freebsd-arch/2024-July/000727.html
[2] tools/build/depend-cleanup.sh
Reviewed by: jhb, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46172
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
The logic in the makefile ensures this is only present on Linux, so no
ifdef is needed. I overlooked comments to the effect in the original
pull request somehow.
Fixes: 0e03402139
Suggested by: arichards, jrtc27
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D45374
Move the cdefs.h inclusion to the Linux specific file. Either place will
work, but it makes more sense to do it in the Linux specific file since
it's a Linux specific workaround.
Fixes: 4300e05361
Suggested by: arichards, jrtc27
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D45373
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
Before FreeBSD 15 I plan to switch to LLVM_BINUTILS by default. Add the
src.conf description now, for the benefit of downstream branches and
testing/CI.
PR: 258872 [exp-run]
Sponsored by: The FreeBSD Foundation
This reverts commit 6bad7d2486.
Turns out this special case wasn't necessary, and this was already
detected and due to another error (running the script got dropped
from my experimental scripts), I hadn't noticed.
Sponsored by: Netflix
Neither glibc nor musl define these interfaces, so provide them for all
Linux builds.
Sponsored by: Netflix
Reviewed by: val_packett.cool
Differential Revision: https://reviews.freebsd.org/D45355
FreeBSD assumes that sys/types.h includes sys/cdefs.h, so add it here.
FreeBSD also needs __*int*_t defined for software we bootstrap (a lot of
it). GLIBC defines these, but musl does not, so we have to define them
here, even though it looks backwards. There's no good #define to key off
of, so use !defined GLIBC since on Linux defacto there's only two libc
implementations.
Co-authored-by: Val Packett <val@packett.cool>
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by: val_packett.cool
Differential Revision: https://reviews.freebsd.org/D45354
string.h defines strmode with a mode_t argument. POSIX states that one
must include sys/types.h to get mode_t, so do that here. This makes musl
happier. We know that sys/types.h will include sys/cdefs.h, so just
replace the latter with the former.
Co-authored-by: Val Packett <val@packett.cool>
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by: val_packett.cool
Differential Revision: https://reviews.freebsd.org/D45353
FreeBSD has a style(9) enforced assumption that sys/param.h includes
sys/types.h. However, Linux under musl doesn't do this so go ahead and
explicitly include it here. It won't hurt on the glibc systems, and
helps musl.
Co-authored-by: Val Packett <val@packett.cool>
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by: val_packett.cool
Differential Revision: https://reviews.freebsd.org/D45352
On Linux with musl, sys/cdefs.h isn't included with fcntl.h, so when we
use __BEGIN_DECL and __END_DECL in this file, it fails. There's no harm
in unconditionally including sys/cdefs.h here, so do that to avoid
encoding exactly where it is or isn't needed so we don't have to know
too much about the internal state of other libc implementations.
Co-authored-by: Val Packett <val@packett.cool>
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by: val_packett.cool
Differential Revision: https://reviews.freebsd.org/D45351
On Linux, stddef.h will define __size_t to something when size_t is
defined. On FreeBSD, __size_t is an actual typedef which we need for
other parts of the system. If __size_t isn't defined, that tells us we
need to define the fallback __size_t typedef (if it is defined, then we
can't easily redefine it without issues because glob.h will define it to
something different than stddef.h defines it). Add a comment to this
effect.
Sponsored by: Netflix
Reviewed by: val_packett.cool
Differential Revision: https://reviews.freebsd.org/D45350
fts has different types for its compare rotuine. Other systems, not
4.4BSD based, have a non-const version. Before we tested against
__GLIBC__, but now we test against __linux__ because that's Linux's API
and musl doesn't define __GLIBC__.
In addition, link against libftl on this platform since musl doesn't
include ftl routines in libc, but rather in libftl.
Co-authored-by: Val Packett <val@packett.cool>
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by: val_packett.cool
Differential Revision: https://reviews.freebsd.org/D45349
off64_t is needed for both Linux (musl) and MacOS, so move them to the
common area. Somehow glibc provides the definition, but defining it
doesn't hurt and hels in the musl case.
Reviewed by: allanjude, jrtc27
Pull Request: https://github.com/freebsd/freebsd-src/pull/1066
Add the WITH/WITHOUT_BRANCH_PROTECTION build flags. This can be used
to enable the use of pointer authentication (FEAT_PAuth) and branch
target identification (FEAT_BTI) in userspace.
The kernel already handles both of these is userspace, we just need
to enable it.
Leave disabled for a short period for this to settle before enabling.
Reviewed by: emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D42596
Link with --no-undefined-version by default. Will detect and prevent
the accidental removal of symbols from versioned libraries.
(cherry picked from commit 4510f2ca91)
This reverts commit b25ceb97ed.
Reviewed by: arichardson, kib, dim, emaste
Differential Revision: https://reviews.freebsd.org/D44216
In a local tree I accidentally had OPT_INIT_ALL defaulting to zero in
userland and none in kernel. This resulted in the INIT_ALL text
appearing twice in src.conf.5.
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45184
In the future, we will Default to _FORTIFY_SOURCE=2 if SSP is enabled,
otherwise default to _FORTIFY_SOURCE=0. For now we default it to 0
unconditionally to ease bisect across older versions without the new
symbols, and we'll put out a call for testing.
include/*.h include their ssp/*.h equivalents as needed based on the
knob. Programs and users are allowed to override FORTIFY_SOURCE in their
Makefiles or src.conf/make.conf to force it off.
Reviewed by: des, markj
Relnotes: yes
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D32308
Link with --no-undefined-version by default. Will detect and prevent
the accidental removal of symbols from versioned libraries.
Reviewed by: arichardson, kib, dim, emaste
Differential Revision: https://reviews.freebsd.org/D44216