]> git.proxmox.com Git - mirror_spl.git/commit - config/spl-build.m4
Fake modpost stage for LINUX_COMPILE.
authorEtienne Dechamps <etienne.dechamps@ovh.net>
Mon, 16 Jul 2012 07:29:05 +0000 (09:29 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 26 Jul 2012 22:12:10 +0000 (15:12 -0700)
commitdf7cc5bc7111ab7cef6e89522685c6b8dd4bb95c
treeb9173e233d045b945e90873b1041e63eeea60891
parent0408008b33049dde7e1ec16af7806d2e57bab064
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
config/spl-build.m4
configure