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

Wolfgang Denk wd at denx.de
Sun Aug 23 21:30:47 CEST 2009


Dear Mike Frysinger,

In message <200908230209.10484.vapier at 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


More information about the U-Boot mailing list