scripts/gdb/linux/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
From: Joel Granados <j.granados@samsung.com>
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 different build directory
(O=builddir).
Fixes: 659bbf7e1b08 ("kbuild: scripts/gdb: Replace missed $(srctree)/$(src) w/ $(src)")
Signed-off-by: Joel Granados <j.granados@samsung.com>
---
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@samsung.com>
Hi,
On Thu, Jun 20, 2024 at 12:48 PM Joel Granados via B4 Relay
<devnull+j.granados.samsung.com@kernel.org> wrote:
>
> From: Joel Granados <j.granados@samsung.com>
>
> 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 different build directory
> (O=builddir).
>
> Fixes: 659bbf7e1b08 ("kbuild: scripts/gdb: Replace missed $(srctree)/$(src) w/ $(src)")
> Signed-off-by: Joel Granados <j.granados@samsung.com>
> ---
> scripts/gdb/linux/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Ah, good call. Yeah, this makes sense to me and also seems to produce
reasonable symlinks. Sorry for not coming up with this originally.
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
On Thu, Jun 20, 2024 at 02:51:41PM -0700, Doug Anderson wrote:
> Hi,
>
> On Thu, Jun 20, 2024 at 12:48 PM Joel Granados via B4 Relay
> <devnull+j.granados.samsung.com@kernel.org> wrote:
> >
> > From: Joel Granados <j.granados@samsung.com>
> >
> > 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 different build directory
> > (O=builddir).
> >
> > Fixes: 659bbf7e1b08 ("kbuild: scripts/gdb: Replace missed $(srctree)/$(src) w/ $(src)")
> > Signed-off-by: Joel Granados <j.granados@samsung.com>
> > ---
> > scripts/gdb/linux/Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Ah, good call. Yeah, this makes sense to me and also seems to produce
> reasonable symlinks. Sorry for not coming up with this originally.
No worries. Please tell me if you need me to do something else to
upstream this
Best
--
Joel Granados
On Mon, Jun 24, 2024 at 3:20 PM Joel Granados <j.granados@samsung.com> wrote: > > On Thu, Jun 20, 2024 at 02:51:41PM -0700, Doug Anderson wrote: > > Hi, > > > > On Thu, Jun 20, 2024 at 12:48 PM Joel Granados via B4 Relay > > <devnull+j.granados.samsung.com@kernel.org> wrote: > > > > > > From: Joel Granados <j.granados@samsung.com> > > > > > > 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 different build directory > > > (O=builddir). For preciseness, please rephrase it to something like this: running the scripts_gdb target on a build directory located directly under the source tree (e.g., O=builddir). O=foo/builddir does not cause this issue because $(src) is already an absolute path. This issue occurs only when the output directory is a direct subdirectory of the source tree, in other words, srctree is '..' See this line: https://github.com/torvalds/linux/blob/v6.10-rc5/Makefile#L254 -- Best Regards Masahiro Yamada
On Wed, Jun 26, 2024 at 12:08:15AM +0900, Masahiro Yamada wrote: > On Mon, Jun 24, 2024 at 3:20 PM Joel Granados <j.granados@samsung.com> wrote: > > > > On Thu, Jun 20, 2024 at 02:51:41PM -0700, Doug Anderson wrote: > > > Hi, > > > > > > On Thu, Jun 20, 2024 at 12:48 PM Joel Granados via B4 Relay > > > <devnull+j.granados.samsung.com@kernel.org> wrote: > > > > > > > > From: Joel Granados <j.granados@samsung.com> > > > > > > > > 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 different build directory > > > > (O=builddir). > > For preciseness, please rephrase it to something like this: > > running the scripts_gdb target on a build directory located > directly under the source tree (e.g., O=builddir). I'll add this to a V2. Thx for the feedback Best -- Joel Granados
© 2016 - 2025 Red Hat, Inc.