[U-Boot] [PATCH] Fix all linker scripts for older binutils versions (pre-2.16)

Wolfgang Denk
2009-08-23T19:30:47Z

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