make buildkernel keeps failing here:
=== accf_data
cc -O -fPIC -D_KERNEL -DKLD_MODULE -nostdinc -I- -include
/usr/obj/usr/src/sys/ESHARA/opt_global.h -I. -I@ -I@/../include
-finline-limit=8000 -fno-common -I/usr/obj/usr/src/sys/ESHARA
-mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx
-mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding
-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual
-fformat-extensions -std=c99 -c /usr/src/sys/netinet/accf_data.c
cc1: sorry, unimplemented: code model kernel not supported in PIC mode
cc1: error: code model `kernel' not supported in the 64 bit mode
*** Error code 1
Stop in /usr/src/sys/modules/accf_data.
*** Error code 1
Stop in /usr/src/sys/modules.
*** Error code 1
Stop in /usr/obj/usr/src/sys/ESHARA.
*** Error code 1
Stop in /usr/src.
*** Error code 1
Stop in /usr/src.
I added in CFLAGS= -O -fPIC to /etc/make.conf.
Here's the diff between my custom kernel and the plain vanilla GENERIC.
GENERIC compiles fine, but for some reason, there is something missing
from mine that's in GENERIC that's causing it to fail but I have no
idea what. I thought I checked out NOTES pretty thoroughly but I guess
not.
su-2.05b# diff ESHARA GENERIC
3c3,5
ident ESHARA
---
ident GENERIC
makeoptions DEBUG=-g# Build kernel with gdb(1)
debug symbols
makeoptions NO_MODULES=not_yet
5a8
options INET6 # IPv6 communications protocols
7a11
options UFS_ACL # Support for access control
lists
8a13,17
options MD_ROOT # MD is a potential root device
options NFSCLIENT # Network Filesystem Client
options NFSSERVER # Network Filesystem Server
options NFS_ROOT# NFS usable as /, requires
NFSCLIENT
options MSDOSFS # MSDOS Filesystem
9a19,20
options PROCFS # Process filesystem (requires
PSEUDOFS)
options PSEUDOFS# Pseudo-filesystem framework
11a23,24
options SCSI_DELAY=15000# Delay (in ms) before probing
SCSI
options KTRACE # ktrace(1) support
16a30,38
options AHC_REG_PRETTY_PRINT# Print register bitfields in
debug
options AHD_REG_PRETTY_PRINT# Print register bitfields in
debug
options PFIL_HOOKS # pfil(9) framework
options DDB # Enable the kernel debugger
options INVARIANTS # Enable calls of extra sanity
checking
options INVARIANT_SUPPORT # Extra sanity checks of
internal structures, required by INVARIANTS
options WITNESS # Enable checks to detect
deadlocks and cycles
options WITNESS_SKIPSPIN# Don't run witness on
spinlocks for speed
options SMP # Symmetric MultiProcessor Kernel
21a44,45
devicepcm
devicefdc
25a50,51
deviceatapifd # ATAPI floppy drives
deviceatapist # ATAPI tape drives
26a53,83
deviceahb # EISA AHA1742 family
deviceahc # AHA2940 and onboard AIC7xxx
devices
deviceahd # AHA39320/29320 and onboard
AIC79xx devices
deviceamd # AMD 53C974 (Tekram DC-390(T))
deviceisp # Qlogic family
devicempt # LSI-Logic MPT-Fusion
devicesym # NCR/Symbios Logic (newer
chipsets + those of `ncr')
devicetrm # Tekram DC395U/UW/F DC315U
adapters
deviceadv # Advansys SCSI adapters
deviceadw # Advansys wide SCSI adapters
deviceaha # Adaptec 154x SCSI adapters
deviceaic # Adaptec 15[012]x SCSI
adapters, AIC-6[23]60.
devicebt # Buslogic/Mylex MultiMaster
SCSI adapters
devicescbus # SCSI bus (required for SCSI)
devicech # SCSI media changers
deviceda # Direct Access (disks)
devicesa # Sequential Access (tape etc)
devicecd # CD
devicepass# Passthrough device (direct
SCSI access)
deviceses # SCSI Environmental Services
(and SAF-TE)
deviceamr # AMI MegaRAID
deviceciss# Compaq Smart RAID 5*
devicedpt # DPT Smartcache III, IV - See
NOTES for options
deviceiir # Intel Integrated RAID
deviceips # IBM (Adaptec) ServeRAID
devicemly