Module compiles looking in /usr/src when alternate src tree is in use
Rodney W. Grimes
freebsd-rwg at pdx.rh.CN85.dnsmgr.net
Sun Apr 8 19:00:55 UTC 2018
I am having a compile time issue for a patched that compiled fine on my
r329294 system, but now failes to compile with what looks like a wrong
header being included.
I have wrapped the long line so I can point to a difference between
r329294 and r332262 make log of this file.
r329294 make output:
cc -O2 -pipe -DVMM_KEEP_STATS -DSMP -fno-strict-aliasing -Werror -D_KERNEL \
-DKLD_MODULE -nostdinc -I/usr/src-topo/sys/amd64/vmm \
-I/usr/src-topo/sys/amd64/vmm/io -I/usr/src-topo/sys/amd64/vmm/intel \
-I/usr/src-topo/sys/amd64/vmm/amd -I. -I/usr/src-topo/sys -fno-common \
^^^^^^^^^^^^^^^^^ this is what I would expect
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD \
-MF .depend.vmm.o -MTvmm.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 /usr/src-topo/sys/amd64/vmm/vmm.c -o vmm.o
No error, and I get my vmm.ko!
r332262 make output:
cc -O2 -pipe -DVMM_KEEP_STATS -DSMP -fno-strict-aliasing -Werror -D_KERNEL \
-DKLD_MODULE -nostdinc -I/usr/src-topo/sys/amd64/vmm \
-I/usr/src-topo/sys/amd64/vmm/io -I/usr/src-topo/sys/amd64/vmm/intel \
-I/usr/src-topo/sys/amd64/vmm/amd -I. -I/usr/src/sys -fno-common \
^^^^^^^^^^^^ why HERE?
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD \
-MF.depend.vmm.o -MTvmm.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 /usr/src-topo/sys/amd64/vmm/vmm.c -o vmm.o
/usr/src-topo/sys/amd64/vmm/vmm.c:476:1: error: no previous prototype for function 'vm_get_topology' [-Werror,-Wmissing-prototypes]
vm_get_topology(struct vm *vm, uint16_t *sockets, uint16_t *cores,
^
/usr/src-topo/sys/amd64/vmm/vmm.c:486:1: error: no previous prototype for function 'vm_set_topology' [-Werror,-Wmissing-prototypes]
vm_set_topology(struct vm *vm, uint16_t sockets, uint16_t cores,
^
2 errors generated.
*** Error code 1
Stop.
make: stopped in /usr/src-topo/sys/modules/vmm
UGLY GROSS HACK TO FIX:
cp /usr/src-topo/amd64/include/vmm.h /usr/src/sys/amd64/include/vmm.h
Regards,
--
Rod Grimes rgrimes at freebsd.org
More information about the freebsd-current
mailing list