Bug 239119 - [patch] [spi] sys/modules/spi cannot be built outside of kernel build environment
Summary: [patch] [spi] sys/modules/spi cannot be built outside of kernel build environ...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.3-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2019-07-10 19:02 UTC by Eugene Grosbein
Modified: 2019-07-16 19:44 UTC (History)
2 users (show)

See Also:
eugen: mfc-stable11+


Attachments
proposed fix (306 bytes, patch)
2019-07-10 19:02 UTC, Eugene Grosbein
eugen: maintainer-approval? (loos)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Grosbein freebsd_committer freebsd_triage 2019-07-10 19:02:03 UTC
Created attachment 205669 [details]
proposed fix

For FreeBSD 11.3-STABLE (r349872):

# cd /usr/src/sys/modules/spi
# make
===> sys/modules/spi (all)
===> sys/modules/spi/../spigen (all)
machine -> /usr/src/sys/amd64/include
x86 -> /usr/src/sys/x86/include
awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/bus_if.m -h
awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m -h
:> opt_platform.h
awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/spibus/spibus_if.m -h
cc  -O2 -pipe  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I/usr/src/sys -
fno-common  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   -MD  -MF.depend.spigen.o -MTspig
en.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables
-ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototyp
es -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__
=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-err
or-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-fun
ction -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-error-address-of-packed-member
-mno-aes -mno-avx  -std=iso9899:1999 -c /usr/src/sys/dev/spibus/spigen.c -o spigen.o
/usr/src/sys/dev/spibus/spigen.c:29:10: fatal error: 'opt_spi.h' file not found
#include "opt_spi.h"
         ^~~~~~~~~~~
1 error generated.
*** Error code 1
Comment 1 Kristof Provost freebsd_committer freebsd_triage 2019-07-10 19:13:38 UTC
Looks correct to me (I remember fixing something similar for pf). I think you can just commit this.
Comment 2 Ian Lepore freebsd_committer freebsd_triage 2019-07-10 21:43:01 UTC
Are you not a src committer?  Why all the overhead of a bug report for a 1-line fix you could commit in 15 seconds and get on with real work?
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-07-16 19:41:10 UTC
A commit references this bug:

Author: eugen
Date: Tue Jul 16 19:40:23 UTC 2019
New revision: 350066
URL: https://svnweb.freebsd.org/changeset/base/350066

Log:
  MFC r336561 by lwhsu: Fix `make` in sys/modules/spigen

  PR:		239119

Changes:
_U  stable/11/
  stable/11/sys/modules/spigen/Makefile
Comment 4 Eugene Grosbein freebsd_committer freebsd_triage 2019-07-16 19:44:00 UTC
Fix merged.