[PATCH 16/29] [AARCH64] Detect ILP32 in configure scripts.
Joseph S. Myers
joseph@codesourcery.com
Mon Oct 27 18:05:00 GMT 2014
On Mon, 27 Oct 2014, Andrew Pinski wrote:
> diff --git a/sysdeps/aarch64/preconfigure b/sysdeps/aarch64/preconfigure
> index d9bd1f8..4bcd8e3 100644
> --- a/sysdeps/aarch64/preconfigure
> +++ b/sysdeps/aarch64/preconfigure
> @@ -1,6 +1,15 @@
> case "$machine" in
> aarch64*)
> base_machine=aarch64
> - machine=aarch64
> + case "$CC $CFLAGS $CPPFLAGS " in
> + *" -mabi=ilp32 "*) aarch64_config_abi=ilp32 ;;
> + *" -mabi=lp64 "*) aarch64_config_abi=lp64 ;;
> + *) aarch64_config_abi=default ;;
> + esac
> + case $aarch64_config_abi in
> + default) machine=aarch64/lp64 aarch64_config_abi=lp64 ;;
It would seem better to test how the compiler behaves (what it
predefines), as now done for MIPS, so that this works with a compiler
configured --with-abi=ilp32 without needing to add an explicit ABI option
to CC or CFLAGS.
> diff --git a/sysdeps/unix/sysv/linux/aarch64/configure.ac b/sysdeps/unix/sysv/linux/aarch64/configure.ac
> index 211fa9c..6526816 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/configure.ac
> +++ b/sysdeps/unix/sysv/linux/aarch64/configure.ac
> @@ -1,6 +1,11 @@
> GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
> # Local configure fragment for sysdeps/unix/sysv/linux/aarch64.
>
> -arch_minimum_kernel=3.7.0
> +if test $aarch64_config_abi = ilp32; then
> + arch_minimum_kernel=3.19.0
Since 3.19 doesn't yet exist, this should be 10.0.0 (following the MIPS
NaN2008 precedent) until the ILP32 support goes into Linus's git tree,
after which it can be set to the actual version in which ILP32 support
appears.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list