From: Wolfgang Denk Date: Sun, 23 Aug 2009 21:30:47 +0200 Subject: [U-Boot] [PATCH] Fix all linker scripts for older binutils versions (pre-2.16) In-Reply-To: <200908230209.10484.vapier@gentoo.org> References: <1250510453-30567-1-git-send-email-wd@denx.de> <200908222000.22345.vapier@gentoo.org> <20090823053438.F2678833DBD2@gemini.denx.de> <200908230209.10484.vapier@gentoo.org> Message-ID: <20090823193047.B35FD833DBD2@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Mike Frysinger, In message <200908230209.10484.vapier@gentoo.org> you wrote: > > > > this check will fail with binutils 3.0+ because of the minor check for 16 > > > without a corresponding major check. > > > > Well, the "\1 -lt 2" is the major check, isn't it? > > here is how the shell code looks: > [ $major -lt 2 ] || [ $minor -lt 16 ] && echo old_ld Oops. > and the way shell logic works, the echo is executed if either of those tests > fail. what you really wanted was: > [ $major -lt 2 ] || [ $major -eq 2 -a $minor -lt 16 ] && echo old_ld Right you are. Silly me. Thanks for catching this in time. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de In general, they do what you want, unless you want consistency. - Larry Wall in the perl man page