[Bug 223180] Bug in kmod.mk when SRCS is empty/not defined
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Oct 23 07:58:40 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223180
Bug ID: 223180
Summary: Bug in kmod.mk when SRCS is empty/not defined
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: conf
Assignee: freebsd-bugs at FreeBSD.org
Reporter: johalun0 at gmail.com
I discovered a bug/flaw in kmod.mk when building a kernel module where I do not
have any c source files. Objects files are built using Rust and specified in
OBJS variable.
If SRCS is empty/not defined these lines
# Conditionally include SRCS based on kernel config options.
.for _o in ${KERN_OPTS}
SRCS+=${SRCS.${_o}}
.endfor
generate an entry in SRCS with one space: SRCS=" "
Causing this line to add a " .o" to OBJS.
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
Which of course cause the make command to fail since there is no ".o" file.
By replacing it with these lines I could temporary fix the problem.
.for _o in ${SRCS}
OBJS+=${_o:R:S/$/.o/g}
.endfor
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list