[OpenWrt-Devel] [PATCH] Allow kernel modules to keep build ID debug symbol.

Toke Høiland-Jørgensen toke at toke.dk
Fri Oct 30 10:33:48 EDT 2015


Felix Fietkau <nbd at openwrt.org> writes:

>> Would definitely work. The problem is I'm not sure I quite grok the
>> openwrt build system sufficiently to do this correctly. Guess I need to
>> get the linker flag into KERNEL_MAKEOPTS?
> Yes. It's in kernel-defaults.mk

Cool, this part works.

>> Can go looking for that, but
>> that still leaves the problem of signaling the strip-kmod.sh script
>> correctly -- can I get at per-package variables in rules.mk where the
>> RSTRIP invocation is defined?
> You can add it wrapped in $(if ...) to rules.mk to the other exports in
> the RSTRIP variable.

Yeah, that's what I thought; but the obvious way (below) doesn't seem to
work. Can I not expand the PKG_* variables in rules.mk?

-Toke

diff --git a/rules.mk b/rules.mk
index 819bea5..8e1cfe9 100644
--- a/rules.mk
+++ b/rules.mk
@@ -275,6 +275,7 @@ else
   endif
   RSTRIP:= \
     export CROSS="$(TARGET_CROSS)" \
+               $(if $(PKG_BUILD_ID),KEEP_BUILD_ID=1) \
                $(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1) \
                $(if $(CONFIG_KERNEL_PROFILING),KEEP_SYMBOLS=1); \
     NM="$(TARGET_CROSS)nm" \
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list