summaryrefslogtreecommitdiff
path: root/config_h.SH
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafayette.edu>2012-09-04 17:13:34 -0400
committerAndy Dougherty <doughera@lafayette.edu>2012-09-07 14:23:54 -0400
commit588c11077d77ec254cb723f9254938c217e33166 (patch)
treead1300bdbfec9598d617b36846655f57b9c8b4b1 /config_h.SH
parent5ac8c25201a5614920ddf169532fbc1d0fefd565 (diff)
downloadperl-588c11077d77ec254cb723f9254938c217e33166.tar.gz
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.
Diffstat (limited to 'config_h.SH')
-rwxr-xr-xconfig_h.SH7
1 files changed, 2 insertions, 5 deletions
diff --git a/config_h.SH b/config_h.SH
index 988273f3ba..3267fee808 100755
--- a/config_h.SH
+++ b/config_h.SH
@@ -949,13 +949,10 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
/* MEM_ALIGNBYTES:
* This symbol contains the number of bytes required to align a
* double, or a long double when applicable. Usual values are 2,
- * 4 and 8. The default is eight, for safety.
+ * 4 and 8. The default is eight, for safety. For cross-compiling
+ * or multiarch support, Configure will set a minimum of 8.
*/
-#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
-# define MEM_ALIGNBYTES 8
-#else
#define MEM_ALIGNBYTES $alignbytes
-#endif
/* ARCHLIB:
* This variable, if defined, holds the name of the directory in