X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=scripts%2Fbuilt-in.sh;h=5e57e9341c03f6c0ab4e05a6cfcb68197d2e6d42;hb=HEAD;hp=f0594eccdba217157bd016a2e75ad84805243333;hpb=25fd068813d5afb4bccdf16e02b0a30c38d1d35c;p=lttng-modules.git diff --git a/scripts/built-in.sh b/scripts/built-in.sh index f0594ecc..5c580422 100755 --- a/scripts/built-in.sh +++ b/scripts/built-in.sh @@ -16,7 +16,13 @@ ln -sf "$(pwd)" "${KERNEL_DIR}/lttng" # Graft ourself to the kernel build system echo 'source "lttng/src/Kconfig"' >> "${KERNEL_DIR}/Kconfig" -sed -i 's#+= kernel/#+= kernel/ lttng/#' "${KERNEL_DIR}/Makefile" + +# In kernel v6.1, subdirectories were moved to Kbuild +if grep -qE '^obj-y[[:space:]]+\+= kernel/' "${KERNEL_DIR}/Kbuild"; then + echo 'obj-y += lttng/' >> "${KERNEL_DIR}/Kbuild" +else + sed -i 's#+= kernel/#+= kernel/ lttng/#' "${KERNEL_DIR}/Makefile" +fi echo >&2 echo " $0: done." >&2