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)
Wed, Nov 20, 8:28 PM
Unknown Object (File)
Wed, Nov 20, 8:28 PM
Unknown Object (File)
Wed, Nov 20, 8:28 PM
Unknown Object (File)
Wed, Nov 20, 8:28 PM
Unknown Object (File)
Oct 1 2024, 10:58 PM
Unknown Object (File)
Sep 27 2024, 9:56 AM
Unknown Object (File)
Sep 26 2024, 11:50 AM
Unknown Object (File)
Sep 26 2024, 11:50 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31075
Build 28772: arc lint + arc unit

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.