diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2009-03-12 03:34:19 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2009-03-12 03:34:19 +0000 |
commit | ca433d8a84f66c306f156ab848e0736066adf12a (patch) | |
tree | d25d7e07ab8bbe7f391b9e7fc4af561a3979dc36 /llvm/autoconf/m4 | |
parent | a27669f1d8f1e1ba20782214b337143582f85e74 (diff) | |
download | bcm5719-llvm-ca433d8a84f66c306f156ab848e0736066adf12a.tar.gz bcm5719-llvm-ca433d8a84f66c306f156ab848e0736066adf12a.zip |
Set ARCH to x86 on mixed 32/64-bit Linux systems.
Remove the explicit if OS = Darwin test around the setting of -m32/-m64.
llvm-svn: 66765
Diffstat (limited to 'llvm/autoconf/m4')
-rw-r--r-- | llvm/autoconf/m4/linux_mixed_64_32.m4 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/autoconf/m4/linux_mixed_64_32.m4 b/llvm/autoconf/m4/linux_mixed_64_32.m4 new file mode 100644 index 00000000000..7c781ac2801 --- /dev/null +++ b/llvm/autoconf/m4/linux_mixed_64_32.m4 @@ -0,0 +1,17 @@ +# +# Some Linux machines run a 64-bit kernel with a 32-bit userspace. 'uname -m' +# shows these at x86_64, so in that case, ask the system 'gcc' what it thinks. +# +AC_DEFUN([AC_IS_LINUX_MIXED], +[AC_CACHE_CHECK(for 32-bit userspace on 64-bit system,llvm_cv_linux_mixed, +[ AC_LANG_PUSH([C]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#ifndef __x86_64__ + error: Not x86-64 even if uname says so! + #endif + ]])], + [llvm_cv_linux_mixed=no], + [llvm_cv_linux_mixed=yes]) + AC_LANG_POP([C]) +]) +]) |