use of undeclared identifier 'PSL_VM'

Patrick McMunn doctorwhoguy at
Thu May 11 01:37:21 UTC 2017

I checked out the master branch from on May 9, 2017 and tried
to compile an i386 kernel. It failed with the below snippet of output. I
couldn't find any mention of bugs, and that particular file hasn't been
updated in 2 years. Could it be an error on my part? I just commented out a
bunch of unneeded hardware drivers, turned off Witness and Invariants, and
increased KSTACK_PAGES to 4 in my kernel config.

cc -target i386-unknown-freebsd12.0
-B/usr/obj/root/freebsd-base-graphics/tmp/usr/bin -c -O -pipe
-march=pentium4 -g -Wno-varargs -nostdinc -I.
-I/root/freebsd-base-graphics/sys/contrib/libfdt -D_KERNEL
-DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -MD
-MF.depend.db_print.o -MTdb_print.o -mno-mmx -mno-sse -msoft-float
-ffreestanding -fwrapv -fstack-protector -gdwarf-2 -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
-Werror /root/freebsd-base-graphics/sys/ddb/db_print.c
/root/freebsd-base-graphics/sys/ddb/db_print.c:70:24: error: use of
undeclared identifier 'PSL_VM'
./machine/db_machdep.h:38:55: note: expanded from macro 'PC_REGS'
#define PC_REGS() ((db_addr_t)(kdb_frame->tf_eflags & PSL_VM ?
1 error generated.
*** Error code 1

make[2]: stopped in /usr/obj/root/freebsd-base-graphics/sys/GENERIC
*** Error code 1

make[1]: stopped in /root/freebsd-base-graphics
*** Error code 1

make: stopped in /root/freebsd-base-graphics

More information about the freebsd-questions mailing list