HomeFreeBSD

Fake modpost stage for LINUX_COMPILE.

Description

Fake modpost stage for LINUX_COMPILE.

Currently, when building a test case, we're compiling an entire Linux
module from beginning to end. This includes the MODPOST stage, which
generates a "conftest.mod.c" file with some boilerplate module
declaration code.

This poses a problem when configuring for built-in on kernels which have
loadable module support disabled. In this case conftest.mod.c is
referencing disabled code, resulting in a compilation failure, thus
breaking the tests.

This patch fixes the issue by faking the modpost stage when the
--enable-linux-builtin option is provided. It does so by forcing the
modpost command to be /bin/true, and using an empty conftest.mod.c file.
The test module still compiles fine, although the result isn't loadable,
but we don't really care at this point.

Note it is important to preserve the modpost stage when building out of
tree. This allows for the posibility of configure checks to leverage
this phase to identify GPL-only symbols.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue zfsonlinux/zfs#851

Details

Provenance
Etienne Dechamps <etienne.dechamps@ovh.net>Authored on Jul 16 2012, 7:29 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 26 2012, 10:12 PM
Parents
rG0408008b3304: Make configure builtin-aware.
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGdf7cc5bc7111: Fake modpost stage for LINUX_COMPILE. (authored by Etienne Dechamps <etienne.dechamps@ovh.net>).Jul 26 2012, 10:12 PM