diff options
Diffstat (limited to 'autoconf/m4')
-rw-r--r-- | autoconf/m4/config_makefile.m4 | 2 | ||||
-rw-r--r-- | autoconf/m4/linux_mixed_64_32.m4 | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/autoconf/m4/config_makefile.m4 b/autoconf/m4/config_makefile.m4 index f21a256..b1eaffd 100644 --- a/autoconf/m4/config_makefile.m4 +++ b/autoconf/m4/config_makefile.m4 @@ -5,5 +5,5 @@ AC_DEFUN([AC_CONFIG_MAKEFILE], [AC_CONFIG_COMMANDS($1, [${llvm_src}/autoconf/mkinstalldirs `dirname $1` - ${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/$1 $1]) + ${SHELL} ${llvm_src}/autoconf/install-sh -m 0644 -c ${srcdir}/$1 $1]) ]) diff --git a/autoconf/m4/linux_mixed_64_32.m4 b/autoconf/m4/linux_mixed_64_32.m4 new file mode 100644 index 0000000..123491f --- /dev/null +++ b/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 as x86_64. 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]) +]) +]) |