* [PATCH] Export SHELL before invoking lineno.sh
@ 2026-07-22 14:20 Tom Tromey
2026-07-22 18:38 ` Andrew Burgess
0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2026-07-22 14:20 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
A user reported that building the sim failed, because their shell was
not sh-compatible. In particular, lineno.sh uses $SHELL to invoke
another script.
This patch arranges for SHELL to be exported when invoking lineno.sh,
ensuring that the correct shell is used.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34407
---
sim/Makefile.in | 2 +-
sim/common/local.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sim/Makefile.in b/sim/Makefile.in
index 5438d778a3f..1f9bbfec03f 100644
--- a/sim/Makefile.in
+++ b/sim/Makefile.in
@@ -1994,7 +1994,7 @@ CGEN_GEN_CPU_DESC = \
$(CGEN_ARCHFILE) ignored $$opcfile
CGEN_GEN_MLOOP = \
- $(SHELL) $(srccom)/lineno.sh \
+ SHELL=$(SHELL) $(SHELL) $(srccom)/lineno.sh \
$(srccom)/genmloop.sh \
$@.lineno.sh \
-shell $(SHELL) -awk $(AWK) -lineno $(srccom)/lineno.sh \
diff --git a/sim/common/local.mk b/sim/common/local.mk
index 01712aee98d..f765cf57fea 100644
--- a/sim/common/local.mk
+++ b/sim/common/local.mk
@@ -234,7 +234,7 @@ CGEN_GEN_CPU_DESC = \
$(CGEN_ARCHFILE) ignored $$opcfile
CGEN_GEN_MLOOP = \
- $(SHELL) $(srccom)/lineno.sh \
+ SHELL=$(SHELL) $(SHELL) $(srccom)/lineno.sh \
$(srccom)/genmloop.sh \
$@.lineno.sh \
-shell $(SHELL) -awk $(AWK) -lineno $(srccom)/lineno.sh \
base-commit: 293f50b84a9664213fde309e2dc51a49d719029c
--
2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Export SHELL before invoking lineno.sh
2026-07-22 14:20 [PATCH] Export SHELL before invoking lineno.sh Tom Tromey
@ 2026-07-22 18:38 ` Andrew Burgess
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Burgess @ 2026-07-22 18:38 UTC (permalink / raw)
To: Tom Tromey, gdb-patches; +Cc: Tom Tromey
Tom Tromey <tromey@adacore.com> writes:
> A user reported that building the sim failed, because their shell was
> not sh-compatible. In particular, lineno.sh uses $SHELL to invoke
> another script.
>
> This patch arranges for SHELL to be exported when invoking lineno.sh,
> ensuring that the correct shell is used.
LGTM.
Approved-By: Andrew Burgess <aburgess@redhat.com>
Thanks,
Andrew
>
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34407
> ---
> sim/Makefile.in | 2 +-
> sim/common/local.mk | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sim/Makefile.in b/sim/Makefile.in
> index 5438d778a3f..1f9bbfec03f 100644
> --- a/sim/Makefile.in
> +++ b/sim/Makefile.in
> @@ -1994,7 +1994,7 @@ CGEN_GEN_CPU_DESC = \
> $(CGEN_ARCHFILE) ignored $$opcfile
>
> CGEN_GEN_MLOOP = \
> - $(SHELL) $(srccom)/lineno.sh \
> + SHELL=$(SHELL) $(SHELL) $(srccom)/lineno.sh \
> $(srccom)/genmloop.sh \
> $@.lineno.sh \
> -shell $(SHELL) -awk $(AWK) -lineno $(srccom)/lineno.sh \
> diff --git a/sim/common/local.mk b/sim/common/local.mk
> index 01712aee98d..f765cf57fea 100644
> --- a/sim/common/local.mk
> +++ b/sim/common/local.mk
> @@ -234,7 +234,7 @@ CGEN_GEN_CPU_DESC = \
> $(CGEN_ARCHFILE) ignored $$opcfile
>
> CGEN_GEN_MLOOP = \
> - $(SHELL) $(srccom)/lineno.sh \
> + SHELL=$(SHELL) $(SHELL) $(srccom)/lineno.sh \
> $(srccom)/genmloop.sh \
> $@.lineno.sh \
> -shell $(SHELL) -awk $(AWK) -lineno $(srccom)/lineno.sh \
>
> base-commit: 293f50b84a9664213fde309e2dc51a49d719029c
> --
> 2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-22 18:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-22 14:20 [PATCH] Export SHELL before invoking lineno.sh Tom Tromey
2026-07-22 18:38 ` Andrew Burgess
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox