kernel conf not applied to modules?

Dave Dolson ddolson at sandvine.com
Wed May 14 11:07:41 PDT 2003


On FreeBSD 4.7
I noticed that when compiling kernel modules, the kernel options are not
available to the modules.
For example, my if_em.ko is not being compiled with the DEVICE_POLLING
configuration

It looks like "-include opt_global.h" is not being applied when compiling
the module.

Kernel compilation of if_em.c:
cc -c -O2 -pipe -malign-loops=4 -malign-jumps=4 -malign-functions=4
-mcpu=i686 -march=i686 -fno-gcse -DBOOT_COMCONSOLE_SPEED=115200  -Wall
-Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes
-Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ansi -g -nostdinc
-I- -I. -I/d2/ddolson/src/sys -I/d2/ddolson/src/sys/../include
-I/d2/ddolson/src/sys/contrib/ipfilter  -D_KERNEL -include opt_global.h -elf
-mpreferred-stack-boundary=2  /d2/ddolson/src/sys/dev/em/if_em.c

Module compilation of if_em.c:
cc -O2 -pipe -malign-loops=4 -malign-jumps=4 -malign-functions=4 -mcpu=i686
-march=i686 -fno-gcse -DBOOT_COMCONSOLE_SPEED=115200   -D_KERNEL -Wall
-Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes
-Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ansi -DKLD_MODULE
-nostdinc -I-  -I. -I@ -I@/../include -g -mpreferred-stack-boundary=2 -Wall
-Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes
-Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ansi -c
/d2/ddolson/src/sys/modules/em/../../dev/em/if_em.c

Is this a bug/feature, or is it something I've got wrong at our site?


Thanks,

David Dolson (ddolson at sandvine.com, www.sandvine.com)



More information about the freebsd-stable mailing list