libc: tests: add static to resolve -Wmissing-prototypes
The function create_staticobj() is only used inside this translation unit.
Clang produces a -Wmissing-prototypes warning during standard buildworld.
This warning will become a fatal compile error if MK_WERROR is enabled for hardened builds.
PR: 285870
Fixes: ee9ce1078 ("libc: tests: add some tests for __cxa_atexit...")
Signed-off-by: Zhang Qiyue <peter-open-source.probing805 at aleeas.com>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2321
stand: Fix build failure due to old EDK2 interface
In 43b8edb320519, we change EFI_GRAPHICS_OUTPUT_PROTOCOL from
EFI_GRAPHICS_OUTPUT. However, this patch is not MFC to stable/15. As a
result, we need to use the old interface to prevent compile failure.
Fixes: 1802f2ca7215
Sponsored by: The FreeBSD Foundation
hwpstate_intel: Minimize ifdef for i386 build
Reported by: jrtc27
Fixes: bdc0f7678257
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 02c440e204041e92da403a64b70c2e1fdf3a4f73)
kvm: Support non-default CPUID leaf
KVM does not always use 0x40000000 as its CPUID base. For example, QEMU
adds a 0x100 offset when nested virtualization is detected and the host
exposes Hyper-V enlightenment hints. To accommodate this behavior,
switch the detection logic to use the CPUID leaf returned by do_cpuid(),
making the implementation more flexible.
See:
https://github.com/qemu/qemu/blob/master/target/i386/kvm/kvm.c#L2300
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58146
(cherry picked from commit 86691d52a6d3796ad36ba474cf0a9493f6d99202)
stand: Bulk operations on each gfxfb_blt if shadow buffer enabled
Previously, gfxfb_blt flushed the framebuffer on every call. Since a
single drawing operation may invoke gfxfb_blt multiple times, this can
result in unnecessary flushes.
Instead, write updates to the shadow buffer (when present) and mark the
affected area as dirty. Flushing is deferred so multiple gfxfb_blt calls
can be coalesced into a single update. As before, only the dirty region
is flushed.
This fixes the slow bootloader problem in some platforms.
Reviewed by: imp, adrian, obiwac
Tested by: obiwac, jrm
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57373
(cherry picked from commit 32da2f23ae4d18888d34682b0ddb49ec80c0bb26)
stand: Fix shadow buffer offset handling
The shadow buffer is addressed relative to `tg_origin`, which includes
the padding offset, whereas `gfxfb_blt` operates on coordinates without
that offset. To make `gfx_fb_copy_area` emulate the behavior of
`gfxfb_blt`, the source coordinates must include the padding offset,
while the destination coordinates must not. The original implementation
omitted the offset from the source coordinates; this change corrects
that.
Additionally, `gfx_fb_cons_display` already applies the padding offset,
so the redundant adjustment is removed.
PR: 296246
Reported by: 2khramtsov at gmail.com
Reviewed by: imp
Tested by: 2khramtsov at gmail.com, junchoon at dec.sakura.ne.jp,
naito.yuichiro_ at gmail.com
Fixes: 32da2f23ae4d
[5 lines not shown]
packages: make bhyve depend on acpi
bhyve(8) on amd64 needs iasl(8) to run, otherwise it fails with:
/bin/sh: /usr/sbin/iasl: not found
bhyve: BASL failed @ build_dsdt:484
Failed to execute basl_compile(ctx, basl_fwrite_dsdt): Unknown
error: 32512
bhyve: BASL failed @ acpi_build:899
Failed to execute build_dsdt(ctx): Unknown error: 32512
Assertion failed: (error == 0), function bhyve_init_platform_late, file
/home/pkgbuild/worktrees/main/usr.sbin/bhyve/amd64/bhyverun_machdep.c,
line 394.
Register the "acpi" package which provides iasl(8) as a dependency for
bhyve on amd64.
Reviewed by: markj (previous revision), ivy
Differential Revision: https://reviews.freebsd.org/D56498
[3 lines not shown]
packages/sound: Add dependency on bsdconfig
Since the devd rules use sysrc, bsdconfig should be installed.
MFC after: 3 days
(cherry picked from commit 82aca8ef0dd73a09e46271158f822a7e49082cd0)
Makefile.inc1: Only copy locales to INSTALLTMP on FreeBSD
Makefile.inc1 copies locales to ${INSTALLTMP} to avoid issues when
running make installworld on a live system. However, this can break
on non-FreeBSD systems, e.g. on openSUSE where /usr/share/locales
has mode 0555, which means after we copy it, we can't delete it,
so the build fails.
Since this functionality is only useful when installing over a
live system, disable it when the build host is not FreeBSD.
MFC after: 2 weeks
Reviewed by: kevans, emaste
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56677
(cherry picked from commit 4429630d1ca9d90c886bae1eaa0d8ee32d0fee12)
llvm: Move libprivatelldb to the lldb package
Set PACKAGE=lldb in lldb.pre.mk rather than in individual Makefiles;
change lib/clang/Makefile.inc from PACKAGE=clang to PACKAGE?=clang to
avoid overwriting it.
This is safe to MFC to stable/15 since the moved library will be
picked up automatically by pkg.
MFC after: 2 weeks
Reviewed by: emaste
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D56674
(cherry picked from commit 7970815be40b1fa604a6554f5ee0f95f834454b5)
packages: Convert world to a subdir build
Instead of driving the world package build from Makefile.inc1,
use a subdir build where each package has a subdirectory under
packages/ using the new <bsd.pkg.mk>.
Convert some metadata that was previously in the UCL files (e.g.
sets and dependencies) to Makefile variables.
Build the packages under objdir (not repodir), and use the new
stagepackages target to copy them to repodir when creating the
repository.
Determine an explicit list of packages to build in packages/Makefile
based on enabled src.conf options, and add logic to abort the build
if we attempt to build an empty package. This inverts the previous
logic in Makefile.inc1 which would simply skip empty packages.
There are a few advantages to doing it this way:
[26 lines not shown]
packages: Make create-sets.sh more robust during release
Commit d1c176fedfc9 made create-sets.sh exit when it encounters an
error, instead of creating an empty repository. However, this turns
out to cause some issues:
1. A package not having any sets is considered an error, but during
the release build, we stuff a 'pkg' package into the repository
which doesn't have any sets, which causes a failure. Avoid this
by simply ignoring the pkg package.
2. No error was printed in this case, which made the problem hard
to diagnose. Add an explicit error message.
3. A similar problem occurred running on a repository which already
contained sets, which is not usually done during the build, but
is not necessarly an inappropriate thing to do. Fix this one by
ignoring set packages when looking for sets.
[13 lines not shown]