Bug 280171 - make buildkernel on arm64 leaves stale symlink opt_bhyve_snapshot.h in /usr/obj
Summary: make buildkernel on arm64 leaves stale symlink opt_bhyve_snapshot.h in /usr/obj
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: 15.0-CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Mark Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-07 12:39 UTC by Wolfram Schneider
Modified: 2024-07-14 20:27 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram Schneider freebsd_committer freebsd_triage 2024-07-07 12:39:26 UTC
I built a kernel FreeBSD 15.0-CURRENT/arm64. It will create a stale symlink opt_bhyve_snapshot.h  in /usr/obj

I don't know if this breaks anything but it looks strange.

how to repeat:

cd /usr/src
make -j$(nproc) buildkernel
ls -lL /usr/obj/usr/src/arm64.aarch64/sys/GENERIC/modules/usr/src/sys/modules/vmm/opt_bhyve_snapshot.h
lrwxr-xr-x  1 root wheel 63 Jul  6 17:02 /usr/obj/usr/src/arm64.aarch64/sys/GENERIC/modules/usr/src/sys/modules/vmm/opt_bhyve_snapshot.h -> /usr/obj/usr/src/arm64.aarch64/sys/GENERIC/opt_bhyve_snapshot.h
Comment 1 Warner Losh freebsd_committer freebsd_triage 2024-07-12 17:51:14 UTC
This does look like a mismatch between the kernel build and the module build. I'll take a look. It's harmless.
Comment 2 Mark Johnston freebsd_committer freebsd_triage 2024-07-12 17:56:55 UTC
(In reply to Warner Losh from comment #1)
Most likely we simply shouldn't be adding opt_bhyve_snapshot.h to SRCS on arm64.  That's an amd64-only feature (for now).
Comment 3 Mark Johnston freebsd_committer freebsd_triage 2024-07-12 18:02:28 UTC
https://reviews.freebsd.org/D45964
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-07-14 18:30:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=7cd91315911d3413ccf527228d4b8c060b681fba

commit 7cd91315911d3413ccf527228d4b8c060b681fba
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-07-14 16:12:01 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-07-14 18:29:14 +0000

    vmm: Conditionalize addition of opt_*.h headers

    These are only included in the amd64 vmm code, so it doesn't make sense
    to list them unconditionally.

    PR:             280171
    Reviewed by:    wosch, imp, emaste
    Differential Revision:  https://reviews.freebsd.org/D45964

 sys/modules/vmm/Makefile | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)