Update Module.symvers after building the ldiskfs module so its symbols
appear in fsfilt_ldiskfs - avoids build warnings and kernel tainting.
This commit includes both the original patch (which was backed out) and fixes
to the build issues seen on SLES 9 and RHEL 4.
b=12842
i=brian
i=mjmac
# LB_LINUX_PATH
#
# Find paths for linux, handling kernel-source rpms
# LB_LINUX_PATH
#
# Find paths for linux, handling kernel-source rpms
EXTRA_KCFLAGS="-include $KERNEL_SOURCE_HEADER $EXTRA_KCFLAGS"
fi
EXTRA_KCFLAGS="-include $KERNEL_SOURCE_HEADER $EXTRA_KCFLAGS"
fi
+# Find the modpost utility
+AC_CHECK_FILE([$LINUX_OBJ/scripts/mod/modpost],
+ [MODPOST=$LINUX_OBJ/scripts/mod/modpost],
+ [AC_CHECK_FILE([$LINUX_OBJ/scripts/modpost],
+ [MODPOST=$LINUX_OBJ/scripts/modpost],
+ AC_MSG_ERROR([modpost not found.])
+ )]
+)
+AC_SUBST(MODPOST)
+
# this is needed before we can build modules
LB_LINUX_UML
LB_LINUX_VERSION
# this is needed before we can build modules
LB_LINUX_UML
LB_LINUX_VERSION
AC_MSG_RESULT([no])
AC_MSG_WARN([Consult config.log for details.])
AC_MSG_WARN([If you are trying to build with a kernel-source rpm, consult build/README.kernel-source])
AC_MSG_RESULT([no])
AC_MSG_WARN([Consult config.log for details.])
AC_MSG_WARN([If you are trying to build with a kernel-source rpm, consult build/README.kernel-source])
- AC_MSG_ERROR([Kernel modules cannot be build.])
+ AC_MSG_ERROR([Kernel modules cannot be built.])
+]) # end of LB_LINUX_PATH
clean: clean-am
rm -rf linux linux-stage
clean: clean-am
rm -rf linux linux-stage
+
+all: @LINUX_OBJ@/Module.symvers
+
+# Update the kernel's Module.symvers to add ldiskfs symbols before building
+# fsfilt_ldiskfs - see bug 12842.
+@LINUX_OBJ@/Module.symvers: ldiskfs.o
+ cd .. ; $(MODPOST) -m -i @LINUX_OBJ@/Module.symvers \
+ -o @LINUX_OBJ@/Module.symvers ldiskfs/ldiskfs.o