tech-toolchain archive

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

Re: nbawk: non-terminated string echo x86_6... at source line 73



In article <7208.1511289449%andromeda.noi.kre.to@localhost>,
Robert Elz  <kre%munnari.OZ.AU@localhost> wrote:
>    Date:        Tue, 21 Nov 2017 10:04:04 -0500
>    From:        Andrew Cagney <andrew.cagney%gmail.com@localhost>
>    Message-ID: 
><CAJeAr6vcpT9czfeBpJAB4tVkirjN3fk=8dynqFNQFgk9ypX4uw%mail.gmail.com@localhost>
>
>  | Seeing below; happens for at least arm and amd64:
>
>Doesn't happen for amd64 for me, or for amd64 some arm builds on babylon5
>so this is probably a linux host or local config issue.
>
>  | /home/netbsd/hg/tools/bin/nbawk: non-terminated string echo x86_6...
>  | at source line 73
>  |  context is
>  |                     wanted["machine_cpu=" "echo x86_64 >>>
>  |  <<<
>
>That indicates that in:
>
>	arch_to_cpu()
>	{       
>        		MACHINE_ARCH=${1} ${MAKE} -B -f- all <<EOMAKE
>	.include <bsd.own.mk>
>	all:    
>        		@echo \${MACHINE_CPU}
>	EOMAKE  
>	}
>
>somehow the "echo" command is being echoed, as well as the result
>of doing the echo (ie: the value of ${MACHINE_CPU}
>
>  | The code in sets.subr seems to be:
>  | 
>  |             if ("machine_cpu" in wanted)
>  |                 wanted["machine_cpu=" "'"${MACHINE_CPU}"'"] = 1
>
>This is fine, as long as MACHINE_CPU there is set to a one line value,
>you'll get the error indicated if it contains a \n
>
>Why this would be happening for you I don't know.

Try this:

$ cd /usr/src/distrib/tests
$ cat << EOF > tst
#!/bin/sh

rundir=.
. sets.subr

arch_to_cpu mipsel
EOF
$ chmod +x tst
$ ./tst
mips

christos



Home | Main Index | Thread Index | Old Index