Hi Madhavan,

On Tue, 22 Apr 2025 11:20:38 +0530 Madhavan Srinivasan <ma...@linux.ibm.com> 
wrote:
>
> I cant recreate this in both my x86_64 cross build and ppc64 build with dash.
> I tried both ppc64_defconfig and pseries_le_defconfig compilation.
> 
> x86_64 dash version : dash-0.5.12-3.fc40.x86_64
> powerpc dash version : dash-0.5.12-4.fc41.ppc64le
> 
> Can you share the dash version 

I am running Debian Testing on ppc64el and the dash version is
0.5.12-12.

Try this:

$ make -p 2>/dev/null | grep -w SHELL
SHELL = /bin/sh
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Feb  5 00:14 /bin/sh -> dash
$ dash -c '[ $(ld -v --no-warn-rwx-segments &>/dev/null; echo $?) -eq 0 ]'
dash: 1: [: 0: unexpected operator
$ dash -c 'x=$(ld -v --no-warn-rwx-segments &>/dev/null; echo $?); echo "$x"'
0
GNU ld (GNU Binutils for Debian) 2.44

i.e. the $( ... ) returns 2 lines of output because the "ld ..." part is
backgrounded by the '&'.

-- 
Cheers,
Stephen Rothwell

Attachment: pgpFGKFu82457.pgp
Description: OpenPGP digital signature

Reply via email to