NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/46537: MAKEDEV runs MAKEDEV.local using sh instead of HOST_SH when run as part of a cross-build



> >Synopsis:       MAKEDEV runs MAKEDEV.local using sh instead of HOST_SH when 
> >run as part of a cross-build

> - use HOST_SH in MAKEDEV when running MAKEDEV.local

How about this patch? (at least no breakage on NetBSD/i386 6.0_BETA host)

Index: etc/MAKEDEV.tmpl
===================================================================
RCS file: /cvsroot/src/etc/MAKEDEV.tmpl,v
retrieving revision 1.154
diff -u -p -r1.154 MAKEDEV.tmpl
--- etc/MAKEDEV.tmpl    7 Apr 2012 17:22:10 -0000       1.154
+++ etc/MAKEDEV.tmpl    4 Jun 2012 14:22:22 -0000
@@ -421,6 +421,7 @@ setup()
 {
        PATH=/sbin:/usr/sbin:/bin:/usr/bin:/rescue
 
+       : ${HOST_SH:=sh}
        : ${TOOL_MKNOD:=mknod}
        : ${TOOL_MTREE:=mtree}
        : ${TOOL_PAX:=pax}
@@ -2091,9 +2092,9 @@ local)
                umask 0
                if [ -n "$count_nodes" ]; then
                        count_nodes=$((count_nodes + \
-                           $(linecount "$(sh "$0.local" $opts -s all)") ))
+                           $(linecount "$("$HOST_SH" "$0.local" $opts -s 
all)") ))
                else
-                       sh "$0.local" $opts all
+                       "$HOST_SH" "$0.local" $opts all
                fi
                umask 077
        fi

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index