Re: [PATCH v2] kbuild: scripts/gdb: bring the "abspath" back

From: Masahiro Yamada
Date: Wed Jun 26 2024 - 15:22:40 EST


On Wed, Jun 26, 2024 at 9:06 PM Joel Granados via B4 Relay
<devnull+j.granados.samsung.com@xxxxxxxxxx> wrote:
>
> From: Joel Granados <j.granados@xxxxxxxxxxx>
>
> Use the "abspath" call when symlinking the gdb python scripts in
> scripts/gdb/linux. This call is needed to avoid broken links when
> running the scripts_gdb target on a build directory located directly
> under the source tree (e.g., O=builddir).
>
> Fixes: 659bbf7e1b08 ("kbuild: scripts/gdb: Replace missed $(srctree)/$(src) w/ $(src)")
> Signed-off-by: Joel Granados <j.granados@xxxxxxxxxxx>



Applied to linux-kbuild/fixes.
Thanks!



> ---
> Changes in v2:
> - Rephrased the commit message to clarify what is happening
> - Link to v1: https://lore.kernel.org/r/20240620-jag-fix_gdb_py_symlinks-v1-1-36a0f0217fbf@xxxxxxxxxxx
> ---
> scripts/gdb/linux/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/gdb/linux/Makefile b/scripts/gdb/linux/Makefile
> index fd1402c0a1a1..fcd32fcf3ae0 100644
> --- a/scripts/gdb/linux/Makefile
> +++ b/scripts/gdb/linux/Makefile
> @@ -5,7 +5,7 @@ ifdef building_out_of_srctree
> symlinks := $(patsubst $(src)/%,%,$(wildcard $(src)/*.py))
>
> quiet_cmd_symlink = SYMLINK $@
> - cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(src)/%,$@) $@
> + cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(abspath $(src))/%,$@) $@
>
> always-y += $(symlinks)
> $(addprefix $(obj)/, $(symlinks)): FORCE
>
> ---
> base-commit: 6ba59ff4227927d3a8530fc2973b80e94b54d58f
> change-id: 20240620-jag-fix_gdb_py_symlinks-21d9d0de75a2
>
> Best regards,
> --
> Joel Granados <j.granados@xxxxxxxxxxx>
>
>


--
Best Regards
Masahiro Yamada