[lkml]   [2002]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: modversion.h improvement suggestion
> The build instructions for third party modules should say something
> like
> If your kernel was built with CONFIG_MODVERSIONS=y then add these
> flags to the build for this module
> -DMODVERSIONS -include kernel_source_tree/linux/modversions.h

or even better, pick up the _complete_ compilation rule from the
kernel Makefile, since this is (unfortunately) by now the only way to
get all compiler options right.

I do it this way (in a for an external module):
KSRC is the kernel source location.

cp $KSRC/Makefile conftest.make
echo -e "conftest.CC:" >>conftest.make
echo -e "\t@echo \$(CC)" >>conftest.make
echo -e "conftest.CFLAGS:" >>conftest.make
echo -e "\t@echo \$(CFLAGS) \$(MODFLAGS)" >>conftest.make
NKCC=`cd $KSRC; $MAKE -s -f $here/conftest.make conftest.CC`
NKCFLAGS=`cd $KSRC; $MAKE -s -f $here/conftest.make conftest.CFLAGS`

i.e. copy the main Makefile, add a few rules to just echo the flags,
and then invoke it in the original place (since it depends on that).
We should really have a more elegant way to extract this info from the
main Makefile.

> In any case, modversions.h will disappear in kbuild 2.5.

which leaves hope this issue will be addressed...


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:25    [W:0.053 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site