fix: Add missing 'pselect6_time32' and 'ppoll_time32' syscall overrides
[lttng-modules.git] / scripts / built-in.sh
index d9720230e6a9e69de5e73bc90c5accbcb726952d..5c58042263ae768378c6cee3e08f0b8628d7458e 100755 (executable)
@@ -15,8 +15,14 @@ KERNEL_DIR="$(readlink --canonicalize-existing "$1")"
 ln -sf "$(pwd)" "${KERNEL_DIR}/lttng"
 
 # Graft ourself to the kernel build system
-echo 'source "lttng/Kconfig"' >> "${KERNEL_DIR}/Kconfig"
-sed -i 's#+= kernel/#+= kernel/ lttng/#' "${KERNEL_DIR}/Makefile"
+echo 'source "lttng/src/Kconfig"' >> "${KERNEL_DIR}/Kconfig"
+
+# 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
This page took 0.022643 seconds and 4 git commands to generate.