blob: 7679c593154a071db9a911e96b76a8d35929bcc0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
dnl See acsite.m4 in the top-level source directory.
MCPU_PROVIDES
# Local preconfigure fragment for cpu/sysdeps/x86_64.
test -n "$base_machine" || case "$machine" in
x86_64)
base_machine=x86_64
AC_CACHE_CHECK([whether $CC uses the x86_64 x32 data model by default],
[mcpu_cv_x86_64_x32], [dnl
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#ifndef __ILP32__
# error not x32
#endif
int main( void ) { return 0; }
]])], [mcpu_cv_x86_64_x32=yes], [mcpu_cv_x86_64_x32=no])
])
if test "$mcpu_cv_x86_64_x32" = yes; then
machine=x86_64/x32
MCPU_HOST_DATA_MODEL=ILP32
else
AC_CACHE_CHECK([whether $CC uses the x86_64 LP64 data model],
[mcpu_cv_x86_64_lp64], [dnl
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
typedef char mcpu_int_must_be_4[(sizeof(int) == 4) ? 1 : -1];
typedef char mcpu_long_must_be_8[(sizeof(long) == 8) ? 1 : -1];
typedef char mcpu_ptr_must_be_8[(sizeof(void *) == 8) ? 1 : -1];
int main( void ) { return 0; }
]])], [mcpu_cv_x86_64_lp64=yes], [mcpu_cv_x86_64_lp64=no])
])
if test "$mcpu_cv_x86_64_lp64" != yes; then
AC_MSG_ERROR([Not supported HOST $host: unsupported x86_64 data model])
fi
machine=x86_64/64
MCPU_HOST_DATA_MODEL=LP64
fi
;;
esac
|