[m-rev.] diff: fix bug #386: broken source distribution

Peter Wang novalazy at gmail.com
Wed Jul 1 10:21:20 AEST 2015


On Wed, 1 Jul 2015 01:32:21 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> 
> Fix bug #386: broken source distribution.
> 
> The recent change to do more robust evaluation of int operations (commit
> 6e3e60f) broke installation of the library grades from the source distribution
> on 64-bit machines.  The problem is that we set the target bits-per-word to 32
> when building the source distribution.  This means that any evaluation of int
> operations done while building the source distribution's C files treats ints as
> being 32 bit values.  However, for the source distribution the size of an int
> will not be decided until the configure script is run, which is *after* the C
> files have been generated.
> 
> This change disables all compile time evaluation of int operations when
> compiling in .pregen grades.
> 
> compiler/const_prop.m:
> compiler/simplify_goal_call.m:
>  	As above.

Thanks for finding the bug.

Perhaps target_bits_per_int should be semidet and fail for
pregenerated_dist?  Or the bits_per_word and bytes_per_word options in
globals should be maybes and set to no for pregenerated_dist.

Peter



More information about the reviews mailing list