This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix alignment for darwin with -Dusemorebits.
authorAndy Dougherty <doughera@lafayette.edu>
Tue, 4 Sep 2012 21:13:34 +0000 (17:13 -0400)
committerAndy Dougherty <doughera@lafayette.edu>
Fri, 7 Sep 2012 18:23:54 +0000 (14:23 -0400)
commit588c11077d77ec254cb723f9254938c217e33166
treead1300bdbfec9598d617b36846655f57b9c8b4b1
parent5ac8c25201a5614920ddf169532fbc1d0fefd565
Fix alignment for darwin with -Dusemorebits.

By default, the darwin build assumes a "multiarchitecture" build.
Configure has a hardwired default of '8' for alignbytes (and then
proceeds to ignore it with another hard-wired '8' in config.h).
That '8' was supposed to be a safe value, in case perl was built
on one architecture but run on another with a stricter constraint.
With darwin and -Dusemorebits, however, the alignment should be on
16-byte boundaries.  We don't want to penalize all darwin builds for
this unlikely configuration, but we do want to allow it.

This patch causes Configure to compute alignbytes even for multiarch
builds, but if the result is less than 8, it sets it to 8 (which preserves
the previous behavior).  If, however, alignbytes is 16, Configure won't
decrease it.  Then, this patch also fixes config_h.SH so that it uses
the value determined by Configure instead of the previous hardwired value.
Configure
config_h.SH
uconfig.h