Bug 227322 - [patch] [iicbus] sys/modules/i2c/iicbus cannot be built outside of kernel build environment
Summary: [patch] [iicbus] sys/modules/i2c/iicbus cannot be built outside of kernel bui...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.1-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Ian Lepore
URL:
Keywords: easy, patch-ready
Depends on:
Blocks:
 
Reported: 2018-04-06 12:58 UTC by Eugene Grosbein
Modified: 2018-04-06 16:49 UTC (History)
1 user (show)

See Also:


Attachments
The fix (346 bytes, patch)
2018-04-06 12:58 UTC, Eugene Grosbein
no flags 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 2018-04-06 12:58:21 UTC
Created attachment 192285 [details]
The fix

# cd /usr/src/sys/modules/i2c/iicbus && make
cc -O2 -pipe  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I/home/src/sys -fno-common  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer   -MD  -MF.depend.iic_recover_bus.o -MTiic_recover_bus.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-prototypes -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-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-error-address-of-packed-member  -mno-aes -mno-avx  -std=iso9899:1999 -c /home/src/sys/dev/iicbus/iic_recover_bus.c -o iic_recover_bus.o
/home/src/sys/dev/iicbus/iic_recover_bus.c:49:10: fatal error: 'opt_platform.h' file not found
#include "opt_platform.h"
         ^~~~~~~~~~~~~~~~
1 error generated.
*** Error code 1
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-04-06 16:49:10 UTC
A commit references this bug:

Author: ian
Date: Fri Apr  6 16:48:08 UTC 2018
New revision: 332113
URL: https://svnweb.freebsd.org/changeset/base/332113

Log:
  MFC r331868:

  Add opt_platform.h for several modules that have #ifdef FDT in the source.

  Submitted by:	Andre Albsmeier <Andre.Albsmeier@siemens.com>

  PR:		227322 227323

Changes:
  stable/11/sys/modules/i2c/iicbus/Makefile
  stable/11/sys/modules/i2c/isl/Makefile
  stable/11/sys/modules/spi/at45d/Makefile
  stable/11/sys/modules/spi/mx25l/Makefile
  stable/11/sys/modules/spi/spibus/Makefile