Bug 723939 part 2 - Ensure 16k alignment of ELF segments when building for ARM < v7. r=ted

This commit is contained in:
Mike Hommey 2012-02-17 08:55:36 +01:00
parent d31a431d14
commit 07e69dcbdd

View File

@ -4092,6 +4092,19 @@ if test "$ac_cv_thread_keyword" = yes -a "$MOZ_LINKER" != 1; then
esac
fi
dnl Using the custom linker on ARMv6 requires 16k alignment of ELF segments.
if test -n "$MOZ_LINKER"; then
if test "$CPU_ARCH" = arm; then
dnl Determine the target ARM architecture (5 for ARMv5, v5T, v5E, etc.; 6 for ARMv6, v6K, etc.)
ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([[0-9]]*\).*/\1/p'`
dnl When building for < ARMv7, we need to ensure 16k alignment of ELF segments
if test -n "$ARM_ARCH" && test "$ARM_ARCH" -lt 7; then
LDFLAGS="$LDFLAGS -Wl,-z,max-page-size=0x4000"
_SUBDIR_LDFLAGS="$_SUBDIR_LDFLAGS -Wl,-z,max-page-size=0x4000"
fi
fi
fi
dnl Check for the existence of various allocation headers/functions
MALLOC_H=