From: Stephen Rothwell > This runs a bit faster and removes another use of perl from > the kernel build. ... > diff --git a/arch/powerpc/relocs_check.sh b/arch/powerpc/relocs_check.sh > new file mode 100755 > index 000000000000..182eae9cc40d > --- /dev/null > +++ b/arch/powerpc/relocs_check.sh > @@ -0,0 +1,59 @@ > +#!/bin/sh ... > +if [ ${#*} -lt 2 ]; then > + echo "$0 [path to objdump] [path to vmlinux]" 1>&2 > + exit 1 > +fi > + > +# Have Kbuild supply the path to objdump so we handle cross compilation. > +objdump="$1" > +vmlinux="$2"
I'm not 100% sure of the requirements on /bin/sh for kernel builds. But ${#*} is probably not completely portable (and may not be safe if there are embedded spaces in the arguments). Might be better to check: if [ -z "$objdump" -o -z "$vmlinux" ] instead. Or even: if [ ! -x "$objdump" -o ! -r "$vmlinux" ] David _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev