GNU bug report logs - #12741
build: cross-compiling: any cross-compile fails due to new

Previous Next

Package: coreutils;

Reported by: Jim Meyering <jim <at> meyering.net>

Date: Fri, 26 Oct 2012 15:40:02 UTC

Severity: normal

Tags: fixed

Merged with 78377

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 12741 <at> debbugs.gnu.org, yegorslists <at> googlemail.com
Subject: bug#12741: any cross-compile fails due to new make-prime-list
Date: Fri, 26 Oct 2012 19:27:42 +0200
Paul Eggert wrote:
> On 10/26/2012 08:37 AM, Jim Meyering wrote:
>> I would like to generate that table with a portable awk script (maybe
>> even Perl).  If someone can provide such a script, I would be happy
>> to dump the C program.  That would solve the problem.
>
> It'd be a pain to do it in portable awk, as it requires
> arithmetic modulo (UINTMAX_MAX + 1), which Awk is not
> likely to support directly.
>
> Since there are only two or three plausible values of UINTMAX_MAX
> these days, one possibility is to precompute primes.h for these
> two or three values, and ship the precomputed primes.h in the
> tarball, and to use the precomputed primes.h on hosts with typical
> UINTMAX_MAX values.  People who are on a weird platform where
> UINTMAX_MAX is an unusual value wouldn't be able to cross-compile,
> but that's unlikely to ever happen and even if it does, we simply
> add the unusual case to the precomputed primes.h.

That would be fine with me.
We were precomputing the "wheel.h" table of primes before, too.

If we go the route of distributing the generated file,
then we might as well resort to using Perl and say, -Mbigint,
to do generate all variants.




This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.