X-Git-Url: http://git.liburcu.org/?p=lttng-modules.git;a=blobdiff_plain;f=scripts%2Fbuilt-in.sh;h=5c58042263ae768378c6cee3e08f0b8628d7458e;hp=f0594eccdba217157bd016a2e75ad84805243333;hb=78d6705746d435fa7e30192018366fe916ed2ba4;hpb=de5eee31f2eac8cb42b187943aba480e00d0e6ee 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