bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12741: any cross-compile fails due to new make-prime-list


From: Jim Meyering
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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]