2024-05-20 19:57:35

by Doug Anderson

[permalink] [raw]
Subject: [PATCH] kbuild: scripts/gdb: Replace missed $(srctree)/$(src) w/ $(src)

Recently we went through the source tree and replaced
$(srctree)/$(src) w/ $(src). However, the gdb scripts Makefile had a
hidden $(srctree)/$(src) that looked like this:

$(abspath $(srctree))/$(src)

Because we missed that then my installed kernel had symlinks that
looked like this:

__init__.py ->
${INSTALL_DIR}/$(INSTALL_DIR}/scripts/gdb/linux/__init__.py

Let's also replace the midden $(abspath $(srctree))/$(src) with
$(src). Now:

__init__.py ->
$(INSTALL_DIR}/scripts/gdb/linux/__init__.py

Fixes: b1992c3772e6 ("kbuild: use $(src) instead of $(srctree)/$(src) for source directory")
Signed-off-by: Douglas Anderson <[email protected]>
---

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 d77ad9079d0f..fd1402c0a1a1 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)/%,$(abspath $(srctree))/$(src)/%,$@) $@
+ cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(src)/%,$@) $@

always-y += $(symlinks)
$(addprefix $(obj)/, $(symlinks)): FORCE
--
2.45.0.rc1.225.g2a3ae87e7f-goog



2024-05-21 03:32:58

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH] kbuild: scripts/gdb: Replace missed $(srctree)/$(src) w/ $(src)

On Tue, May 21, 2024 at 4:57 AM Douglas Anderson <dianders@chromiumorg> wrote:
>
> Recently we went through the source tree and replaced
> $(srctree)/$(src) w/ $(src). However, the gdb scripts Makefile had a
> hidden $(srctree)/$(src) that looked like this:
>
> $(abspath $(srctree))/$(src)
>
> Because we missed that then my installed kernel had symlinks that
> looked like this:
>
> __init__.py ->
> ${INSTALL_DIR}/$(INSTALL_DIR}/scripts/gdb/linux/__init__.py
>
> Let's also replace the midden $(abspath $(srctree))/$(src) with
> $(src). Now:
>
> __init__.py ->
> $(INSTALL_DIR}/scripts/gdb/linux/__init__.py
>
> Fixes: b1992c3772e6 ("kbuild: use $(src) instead of $(srctree)/$(src) for source directory")
> Signed-off-by: Douglas Anderson <[email protected]>
> ---

Applied.
Thanks.





--
Best Regards
Masahiro Yamada