Page MenuHomeFreeBSD

kmod.mk: Don't split out debug symbols if requested
ClosedPublic

Authored by cem on May 14 2020, 2:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 9:32 PM
Unknown Object (File)
Jan 9 2024, 7:00 PM
Unknown Object (File)
Jan 4 2024, 3:21 AM
Unknown Object (File)
Dec 23 2023, 12:24 AM
Unknown Object (File)
Dec 17 2023, 11:37 AM
Unknown Object (File)
Dec 8 2023, 7:01 AM
Unknown Object (File)
Dec 8 2023, 7:01 AM
Unknown Object (File)
Dec 8 2023, 7:01 AM
Subscribers

Details

Summary

Ports bsd.kmod.mk explicitly sets MK_KERNEL_SYMBOLS=no to prevent auto-
splitting of debuginfo from kernel modules. If that knob is set, don't
split out a .ko.debug and .ko from .ko.full; just generate a .ko with
debuginfo and leave it be.

Otherwise, with DEBUG_FLAGS set and MK_KERNEL_SYMBOLS=no, we would helpfully
strip out the debuginfo from the .ko.full and then not install it. That is
not the desired result a WITH_DEBUG port kmod build.

Test Plan

I just want WITH_DEBUG in ports to generate ports kmods with debuginfo. Either
embedded, or split. (I'd also like WITH_DEBUG not to delete -O optimization
flags, but that's another discussion.)

Before/after in build logs is pretty clear. With this change we don't create
foo.ko.full and split it into foo.ko/foo.ko.debug. Confirmed with readelf -S
and file(1) on various files in WRKDIR and staging.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

cem requested review of this revision.May 14 2020, 2:59 AM
cem created this revision.

Seems reasonable to me, although I'd also argue that ports ought not set MK_KERNEL_SYMBOLS=no.

This revision is now accepted and ready to land.Jun 23 2020, 12:42 PM

Seems reasonable to me, although I'd also argue that ports ought not set MK_KERNEL_SYMBOLS=no.

I don’t disagree, but I think they have some reason not to just flip it. E.g., it complicates plists slightly. There are probably other considerations. Does symbol splitting work on 11, 12?

Anyway, it’s easier to change base.

Anyway, it’s easier to change base.

That's probably true, although the change in this review is correct/necessary regardless of what ports does.

I'm not certain but I think the standalone debug changes went into 10 even.

This revision was automatically updated to reflect the committed changes.