>From 643641cd4e93295a4518b474d16dc9331becdf09 Mon Sep 17 00:00:00 2001 From: ruggero Date: Fri, 20 Nov 2026 09:37:15 +0100 Subject: [PATCH] ptxd_make_world_compile_commands: pass compile_commands.json path to cleanup When building kernel sourced via lndir://, compile_commands.json is not located directly inside ${pkg_dir}. Pass the resolved file path explicitly to ptxd_make_world_compile_commands_cleanup() instead of hardcoding "${pkg_dir}/compile_commands.json". Signed-off-by: ruggero --- scripts/lib/ptxd_make_world_compile.sh | 2 +- scripts/lib/ptxd_make_world_compile_commands.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/lib/ptxd_make_world_compile.sh b/scripts/lib/ptxd_make_world_compile.sh index 739e4fb45..033c24ca8 100644 --- a/scripts/lib/ptxd_make_world_compile.sh +++ b/scripts/lib/ptxd_make_world_compile.sh @@ -164,7 +164,7 @@ ptxd_make_world_compile_finish() { print "\n]" }' } > "${pkg_dir}/compile_commands.json" && - ptxd_make_world_compile_commands_cleanup + ptxd_make_world_compile_commands_cleanup "${pkg_dir}/compile_commands.json" fi } export -f ptxd_make_world_compile_finish diff --git a/scripts/lib/ptxd_make_world_compile_commands.sh b/scripts/lib/ptxd_make_world_compile_commands.sh index df6baf535..b0522d52b 100644 --- a/scripts/lib/ptxd_make_world_compile_commands.sh +++ b/scripts/lib/ptxd_make_world_compile_commands.sh @@ -12,7 +12,7 @@ ptxd_make_world_compile_commands_cleanup() { sed -i \ -e 's/ *-fno-diagnostics-show-caret//g' \ - "${pkg_dir}/compile_commands.json" + "${1}" } export -f ptxd_make_world_compile_commands_cleanup @@ -44,7 +44,7 @@ ptxd_make_world_compile_commands_filter() { -e "s#\(\"command\": \" *[^ ]*\(gcc\|clang\) \)#\1 ${PTXDIST_CROSS_CPPFLAGS} ${pkg_cflags} #" \ -e "s#\(\"command\": \" *[^ ]*++ \)#\1 ${PTXDIST_CROSS_CPPFLAGS} ${pkg_cxxflags} #" \ "${src_cmds}" > "${dst_cmds}" && - ptxd_make_world_compile_commands_cleanup + ptxd_make_world_compile_commands_cleanup "${dst_cmds}" } export -f ptxd_make_world_compile_commands_filter -- 2.43.0