Patch for 2.6 Make system
Here is a Work In Progress (WIP) patch to the makefile system to be able to be build on a 2.6.x kernel.
Feedback appreciated :)
John
configure.in +18 -0
@@ -83,6 +83,13 @@ AC_MSG_ERROR(GCC is required) fi +AC_ARG_ENABLE(kernel-2_6, AC_HELP_STRING([--enable-kernel-2_6], [(BROKEN!) Enable building on Linux kernel version 2.6.x (default=no)]),enable_kernel26=yes,enable_kernel26=no) +OCFS_KERNEL_2_6= +if test "x$enable_kernel26" = "xyes"; then + OCFS_KERNEL_2_6=yes +fi +AC_SUBST(OCFS_KERNEL_2_6) + AC_ARG_ENABLE(debug, [ --enable-debug=[yes/no] Turn on debugging [default=yes]],,enable_debug=yes) OCFS_DEBUG= if test "x$enable_debug" = "xyes"; then
@@ -178,6 +185,13 @@ case "$kversion" in 2.4.*) ;; + 2.6.*) + if test "x$enable_kernel26" = "xyes"; then + AC_MSG_NOTICE([Support for kernel version 2.6 is BROKEN at this time! Your system WILL hang.]) + else + AC_MSG_ERROR([Support for kernel version 2.6 is BROKEN (Your system WILL hang!) at this time. You must use --enable-kernel-2_6 to get past this point.]) + fi + ;; *) AC_MSG_ERROR([This module only supports kernel version 2.4.x]) ;;
@@ -304,6 +318,9 @@ GCCINC=$gccdir AC_SUBST(GCCINC) +OCFS_BUILD_DIR=`pwd` +AC_SUBST(OCFS_BUILD_DIR) + AC_OUTPUT([Config.make vendor/redhat/ocfs2-2.4.9-e.spec vendor/redhat/ocfs2-2.4.18-e.spec
@@ -314,4 +331,5 @@ vendor/unitedlinux/ocfs2-2.4.21-107.spec vendor/unitedlinux/ocfs2-2.4.21-111.spec vendor/unitedlinux/ocfs2-2.4.21-138.spec +src/Makefile-2.6 ])
Config.make.in +1 -0
@@ -58,5 +58,6 @@ OCFS_MEMDEBUG = @OCFS_MEMDEBUG@ OCFS_TRACE = @OCFS_TRACE@ OCFS_PROCESSOR = @OCFS_PROCESSOR@ +OCFS_KERNEL_2_6 = @OCFS_KERNEL_2_6@ USE_JOURNAL_CREATE_REPLACEMENT = @USE_JOURNAL_CREATE_REPLACEMENT@
Makefile +20 -0
@@ -1,3 +1,11 @@ +# See if we are being included by the 2.6 kernel build system. +ifneq ($(KERNELRELEASE),) +# We are being included by the 2.6 kernel build system. So we will include the +# 2.6.x Makefile and skip everything else. +include $(obj)/Makefile-2.6 +else +# Normal build that is being called locally + TOPDIR = .. include $(TOPDIR)/Preamble.make
@@ -2,2 +10,7 @@ +# Preliminary 2.6.x kernel support. See if we are building for the 2.6.x +# kernel +ifndef OCFS_KERNEL_2_6 +# Building for a 2.4.x kernel + WARNINGS = -Wall -Wstrict-prototypes -Wno-format
@@ -196,4 +209,11 @@ dist-subdircreate: $(TOPDIR)/mkinstalldirs $(DIST_DIR)/inc + +else # OCFS_KERNEL_2_6 +# Building for a 2.6.x kernel +include Makefile-2.6 +endif # OCFS_KERNEL_2_6 + include $(TOPDIR)/Postamble.make +endif # ifneq ($(KERNELRELEASE),)
Makefile-2.6.in new file +73 -0
73 lines not on this page · raw message
-------------- next part --------------
configure.in +18 -0
@@ -83,6 +83,13 @@ AC_MSG_ERROR(GCC is required) fi +AC_ARG_ENABLE(kernel-2_6, AC_HELP_STRING([--enable-kernel-2_6], [(BROKEN!) Enable building on Linux kernel version 2.6.x (default=no)]),enable_kernel26=yes,enable_kernel26=no) +OCFS_KERNEL_2_6= +if test "x$enable_kernel26" = "xyes"; then + OCFS_KERNEL_2_6=yes +fi +AC_SUBST(OCFS_KERNEL_2_6) + AC_ARG_ENABLE(debug, [ --enable-debug=[yes/no] Turn on debugging [default=yes]],,enable_debug=yes) OCFS_DEBUG= if test "x$enable_debug" = "xyes"; then
@@ -178,6 +185,13 @@ case "$kversion" in 2.4.*) ;; + 2.6.*) + if test "x$enable_kernel26" = "xyes"; then + AC_MSG_NOTICE([Support for kernel version 2.6 is BROKEN at this time! Your system WILL hang.]) + else + AC_MSG_ERROR([Support for kernel version 2.6 is BROKEN (Your system WILL hang!) at this time. You must use --enable-kernel-2_6 to get past this point.]) + fi + ;; *) AC_MSG_ERROR([This module only supports kernel version 2.4.x]) ;;
@@ -304,6 +318,9 @@ GCCINC=$gccdir AC_SUBST(GCCINC) +OCFS_BUILD_DIR=`pwd` +AC_SUBST(OCFS_BUILD_DIR) + AC_OUTPUT([Config.make vendor/redhat/ocfs2-2.4.9-e.spec vendor/redhat/ocfs2-2.4.18-e.spec
@@ -314,4 +331,5 @@ vendor/unitedlinux/ocfs2-2.4.21-107.spec vendor/unitedlinux/ocfs2-2.4.21-111.spec vendor/unitedlinux/ocfs2-2.4.21-138.spec +src/Makefile-2.6 ])
Config.make.in +1 -0
@@ -58,5 +58,6 @@ OCFS_MEMDEBUG = @OCFS_MEMDEBUG@ OCFS_TRACE = @OCFS_TRACE@ OCFS_PROCESSOR = @OCFS_PROCESSOR@ +OCFS_KERNEL_2_6 = @OCFS_KERNEL_2_6@ USE_JOURNAL_CREATE_REPLACEMENT = @USE_JOURNAL_CREATE_REPLACEMENT@
Makefile +20 -0
@@ -1,3 +1,11 @@ +# See if we are being included by the 2.6 kernel build system. +ifneq ($(KERNELRELEASE),) +# We are being included by the 2.6 kernel build system. So we will include the +# 2.6.x Makefile and skip everything else. +include $(obj)/Makefile-2.6 +else +# Normal build that is being called locally + TOPDIR = .. include $(TOPDIR)/Preamble.make
@@ -2,2 +10,7 @@ +# Preliminary 2.6.x kernel support. See if we are building for the 2.6.x +# kernel +ifndef OCFS_KERNEL_2_6 +# Building for a 2.4.x kernel + WARNINGS = -Wall -Wstrict-prototypes -Wno-format
@@ -196,4 +209,11 @@ dist-subdircreate: $(TOPDIR)/mkinstalldirs $(DIST_DIR)/inc + +else # OCFS_KERNEL_2_6 +# Building for a 2.6.x kernel +include Makefile-2.6 +endif # OCFS_KERNEL_2_6 + include $(TOPDIR)/Postamble.make +endif # ifneq ($(KERNELRELEASE),)
Makefile-2.6.in new file +73 -0
73 lines not on this page · raw message