?C:MEM_ALIGNBYTES (ALIGNBYTES):
?C: This symbol contains the number of bytes required to align a
?C: double, or a long double when applicable. Usual values are 2,
-?C: 4 and 8. The default is eight, for safety.
+?C: 4 and 8. The default is eight, for safety. For cross-compiling
+?C: or multiarch support, Configure will set a minimum of 8.
?C:.
-?H:?%<:#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
-?H:?%<:# define MEM_ALIGNBYTES 8
-?H:?%<:#else
?H:?%<:#define MEM_ALIGNBYTES $alignbytes
-?H:?%<:#endif
?H:.
?F:!try
: check for alignment requirements
echo " "
-case "$usecrosscompile$multiarch" in
+case "$usecrosscompile" in
*$define*)
$cat <<EOM
-You seem to be either cross-compiling or doing a multiarchitecture build,
-skipping the memory alignment check.
+You seem to be cross-compiling. Skipping the memory alignment check.
EOM
case "$alignbytes" in
dflt='8'
echo "(I can't seem to compile the test program...)"
fi
+ case "$multiarch" in
+ *$define*)
+ : The usual safe value is 8, but Darwin with -Duselongdouble
+ : needs 16. Hence, we will take 8 as a minimum, but allow
+ : Configure to pick a larger value if needed.
+ if $test "$dflt" -lt 8; then
+ dflt='8'
+ echo "Setting alignment to 8 for multiarch support.">&4
+ fi
+ ;;
+ esac
;;
*) dflt="$alignbytes"
;;