[OpenAFS-devel] Re: Linux kernel buld warnings

Andrew Deason adeason@sinenomine.net
Tue, 14 Jan 2014 13:34:52 -0600


On Tue, 14 Jan 2014 07:35:20 -0500
chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil> wrote:

> I am not that this is right right path to take.  If you want to test
> flags for kernel modules, you should be using AC_CHECK_LINUX_BUILD()
> since you have no idea if the gcc you have found via autoconf is the gcc
> being used to build kernels.

This stuff is all using AC_CHECK_LINUX_BUILD. I'm talking about changing
the Linux kernel build process; this is unrelated to if the build is
running as an autoconf test or a real build. That is, running this:

make -C /usr/src/linux-foo M=/path/to/bar modules

causes this to run:

gcc -D__KERNEL__ -Wall -Wundef [...] -Wno-set-but-unused-variable -c -x c /dev/null -o /path/whatever.o

for a bunch of different warning flags. Instead, I think it should run
this:

gcc -nostdinc -D__KERNEL__ -Wall -Wundef [...] -Wno-set-but-unused-variable -c -x c /dev/null -o /path/whatever.o

I'll post something to Linux upstream somewhere eventually if nobody
else does, but someone that interacts with or is more familiar with
Linux upstream is likely to get it done faster.

-- 
Andrew Deason
adeason@sinenomine.net