[PATCH] Cygwin: Launch cygmagic with bash, not sh

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Cygwin: Launch cygmagic with bash, not sh

Mark Geisert
On some systems /bin/sh is not /bin/bash and cygmagic has bash-isms in
it.  So even though cygmagic has a /bin/bash shebang, it also needs to be
launched with bash from within Makefile.in.

---
 winsup/cygwin/Makefile.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index b15c746cf..a840f2b83 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -683,10 +683,10 @@ globals.h: mkglobals_h globals.cc
 ${DLL_OFILES} ${LIBCOS}: globals.h $(srcdir)/$(TLSOFFSETS_H)
 
 shared_info_magic.h: cygmagic shared_info.h
- /bin/sh $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) SHARED_MAGIC 'class shared_info' USER_MAGIC 'class user_info'
+ /bin/bash $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) SHARED_MAGIC 'class shared_info' USER_MAGIC 'class user_info'
 
 child_info_magic.h: cygmagic child_info.h
- /bin/sh $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) CHILD_INFO_MAGIC 'class child_info'
+ /bin/bash $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) CHILD_INFO_MAGIC 'class child_info'
 
 dcrt0.o sigproc.o: child_info_magic.h
 
--
2.29.2

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Cygwin: Launch cygmagic with bash, not sh

cygwin-patches mailing list
On Dec  6 22:17, Mark Geisert wrote:

> On some systems /bin/sh is not /bin/bash and cygmagic has bash-isms in
> it.  So even though cygmagic has a /bin/bash shebang, it also needs to be
> launched with bash from within Makefile.in.
>
> ---
>  winsup/cygwin/Makefile.in | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
> index b15c746cf..a840f2b83 100644
> --- a/winsup/cygwin/Makefile.in
> +++ b/winsup/cygwin/Makefile.in
> @@ -683,10 +683,10 @@ globals.h: mkglobals_h globals.cc
>  ${DLL_OFILES} ${LIBCOS}: globals.h $(srcdir)/$(TLSOFFSETS_H)
>  
>  shared_info_magic.h: cygmagic shared_info.h
> - /bin/sh $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) SHARED_MAGIC 'class shared_info' USER_MAGIC 'class user_info'
> + /bin/bash $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) SHARED_MAGIC 'class shared_info' USER_MAGIC 'class user_info'
>  
>  child_info_magic.h: cygmagic child_info.h
> - /bin/sh $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) CHILD_INFO_MAGIC 'class child_info'
> + /bin/bash $(word 1,$^) $@ "${COMPILE.cc} -E -x c++" $(word 2,$^) CHILD_INFO_MAGIC 'class child_info'
>  
>  dcrt0.o sigproc.o: child_info_magic.h
>  
> --
> 2.29.2

Pushed

Thanks,
Corinna
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Cygwin: Launch cygmagic with bash, not sh

Jon TURNEY
In reply to this post by Mark Geisert
On 07/12/2020 06:17, Mark Geisert wrote:
> On some systems /bin/sh is not /bin/bash and cygmagic has bash-isms in
> it.  So even though cygmagic has a /bin/bash shebang, it also needs to be
> launched with bash from within Makefile.in.

Thanks.

Since cygmagic is executable, I don't think we actually need to mention
the shell here at all, but this is fine.