This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] fix use of 'if !' in shell script inld/emultempl/elf32.em
"DJ Delorie" <dj@delorie.com> writes:
> Another option is to use
>
> if cmp ...; then : ; else
>
> This is what gcc uses.
OK; i was hoping for that kind of feedback ("what's normal")... I've
checked in the following. Thanks.
2001-10-10 Chris Demetriou <cgd@broadcom.com>
* emultempl/elf32.em: Fix shell 'if' usage for portability.
Index: elf32.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/elf32.em,v
retrieving revision 1.61
diff -u -r1.61 elf32.em
--- elf32.em 2001/10/05 16:36:55 1.61
+++ elf32.em 2001/10/10 23:01:26
@@ -1349,7 +1349,7 @@
sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
-if ! cmp -s ldscripts/${EMULATION_NAME}.x ldscripts/${EMULATION_NAME}.xn; then
+if cmp -s ldscripts/${EMULATION_NAME}.x ldscripts/${EMULATION_NAME}.xn; then : ; else
echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
fi