[PATCH uClibc++] buildsys: do not assume /bin/sh is a bash shell

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Mon Aug 6 21:26:22 UTC 2012


On 6 Aug 2012 11:09, "Felix Fietkau" <nbd at openwrt.org> wrote:
>
> Instead use /usr/bin/env to run a bash shell, fixes some portability
> issues on hosts such as Mac OSX or dash-based systems.

Iirc I removed all bashisms, the wrapper runs fine for me with dash (and
Busybox ash).
What problems do you encounter?
Thanks,
>
> Signed-off-by: Felix Fietkau <nbd at openwrt.org>
> Signed-off-by: Florian Fainelli <florian at openwrt.org>
> ---
>  bin/Makefile |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/bin/Makefile b/bin/Makefile
> index acf3b95..4c6c713 100644
> --- a/bin/Makefile
> +++ b/bin/Makefile
> @@ -13,7 +13,7 @@ install:
>         $(INSTALL) -m 755 $(WRAPPER) $(PREFIX)$(UCLIBCXX_RUNTIME_BINDIR)
>
>  $(WRAPPER): Makefile
> -       echo '#!/bin/sh' > $@
> +       echo '#!/usr/bin/env bash' > $@
>         echo '' >> $@
>         echo
'WRAPPER_INCLUDEDIR="$${WRAPPER_INCLUDEDIR:=-I$(UCLIBCXX_RUNTIME_INCLUDEDIR)}"'
>> $@
>         echo
'WRAPPER_LIBDIR="$${WRAPPER_LIBDIR:=-L$(UCLIBCXX_RUNTIME_LIBDIR)}"' >> $@
> --
> 1.7.9.5
>


More information about the uClibc mailing list