[PATCH] do not require dc in gold testsuite
Mike Frysinger
vapier@gentoo.org
Thu Dec 9 19:44:00 GMT 2010
On Thursday, December 09, 2010 14:13:24 Ian Lance Taylor wrote:
> Allan McRae <allan@archlinux.org> writes:
> > This is a partial reversion of the changes made in
> > http://sourceware.org/ml/binutils-cvs/2010-08/msg00004.html which
> > appear to have been made to improve portability of the hex to decimal
> > conversion. However, I find the requirement of needing "dc" installed
> > for the test suite to succeed to be excessive. Instead, implement the
> > conversion in a third way using printf, which should provide the
> > portability without requiring additional software.
>
> Neither the shell builtin printf nor the printf command are portable to
> all Unix systems. The dc command is more portable than both.
the shell's math operator supports hex->int as well:
$ echo $(( 0xabcd ))
43981
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/binutils/attachments/20101209/debdc4b8/attachment.sig>
More information about the Binutils
mailing list