[binutils-gdb] Export SHELL before invoking lineno.sh

Tom Tromey via Gdb-cvs <[email protected]> Wed, 22 Jul 2026 19:47:51 +0000 (GMT)
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3De415e40b1a60=
ce4ac3154a93647653bb82242120

commit e415e40b1a60ce4ac3154a93647653bb82242120
Author: Tom Tromey <[email protected]>
Date:   Tue Jul 21 07:32:58 2026 -0600

    Export SHELL before invoking lineno.sh
   =20
    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.
   =20
    This patch arranges for SHELL to be exported when invoking lineno.sh,
    ensuring that the correct shell is used.
   =20
    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D34407
    Approved-By: Andrew Burgess <[email protected]>

Diff:
---
 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 =3D \
 		$(CGEN_ARCHFILE) ignored $$opcfile
=20
 CGEN_GEN_MLOOP =3D \
-	$(SHELL) $(srccom)/lineno.sh \
+	SHELL=3D$(SHELL) $(SHELL) $(srccom)/lineno.sh \
 		$(srccom)/genmloop.sh \
 		[email protected] \
 		-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 =3D \
 		$(CGEN_ARCHFILE) ignored $$opcfile
=20
 CGEN_GEN_MLOOP =3D \
-	$(SHELL) $(srccom)/lineno.sh \
+	SHELL=3D$(SHELL) $(SHELL) $(srccom)/lineno.sh \
 		$(srccom)/genmloop.sh \
 		[email protected] \
 		-shell $(SHELL) -awk $(AWK) -lineno $(srccom)/lineno.sh \