OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_1-232-gf81b01d

Gerrit Code Review
Thu, 8 Dec 2022 11:49:11 -0500

The following commit has been merged in the master branch:
commit f81b01de1a51f02798ac764fb2f6948b592639da
Author: Cheyenne Wills <>
Date:   Thu Dec 1 12:55:26 2022 -0700

    cf: Detect how to pass CFLAGS to linux kbuild
    The autoconf test LINUX_KBUILD_USES_EXTRA_CFLAGS fails on modern kernels
    when detecting how to pass CFLAGS to the compiler when building a Linux
    kernel module.  The result of this test is used by configure when
    testing for Linux kernel features.
    In addition the EXTRA_CFLAGS method of passing compiler parameters has
    been deprecated since Linux 2.6.24 commit:
        "kbuild: introduce ccflags-y, asflags-y and ldflags-y" (f77bf01425b)
    The currently preferred method is to use the make variable 'ccflags-y'
    to set compiler flags.
    Replace the autoconf function LINUX_KBUILD_USES_EXTRA_CFLAGS with a new
    test, LINUX_KBUILD_FIND_CFLAGS_METHOD, that checks the various ways to
    pass compiler flags when building the kernel module.
    Set the build variable "LINUX_KBUILD_CFLAGS_VAR" with the determined
    method for setting kbuild compiler flags.
    Update the AC_TRY_KBUILD26 autoconf function and the script to use the determined method for setting
    the compiler flags for the kbuild process.
    The autoconf test, LINUX_KBUILD_USES_EXTRA_CFLAGS, is used to determine
    when to use either CFLAGS for EXTRA_CFLAGS when performing other
    autoconf tests for Linux kernel features. The test was added with the
    openafs commit:
     "linux-2624-20071123" (af7cf697ef8)
    LINUX_KBUILD_USES_EXTRA_CFLAGS relied on the Linux 2.6.24 commit:
     "kbuild: check for wrong use of CFLAGS" (0c53c8e6eb4)
    which caused a build failure if CFLAGS where used instead of
    Later with the Linux 4.20 commit:
     "kbuild: remove old check for CFLAGS use" (0d91bf584fe)
    which removed the build failure when CFLAGS were set and this resulted
    in LINUX_KBUILD_USES_EXTRA_CFLAGS failing to properly determining how to
    set compiler flags in the kbuild process.
    As mentioned above, the EXTRA_CFLAGS method itself has been deprecated
    in Linux 2.6.24, but support for using it has still present in the
    kbuild processes.
    Change-Id: I8ce3a8c9af4785ae85d0bbd5962c573a35d8748e
    Tested-by: BuildBot <>
    Reviewed-by: Cheyenne Wills <>
    Reviewed-by: Andrew Deason <>
    Reviewed-by: Benjamin Kaduk <>

 src/cf/linux-checks.m4             |  2 +-
 src/cf/linux-test1.m4              | 48 +++++++++++++++++++++++++++-----------
 src/libafs/  |  1 +
 src/libafs/ |  8 ++++++-
 4 files changed, 43 insertions(+), 16 deletions(-)

OpenAFS Master Repository