aboutsummaryrefslogtreecommitdiffstats
path: root/autoconf
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-07-26 21:14:56 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-07-26 21:14:56 +0000
commite2cfe5d23225fa74febd5f170b919bba2c495308 (patch)
tree0e8257b0dbd76f6e8000c423c8b3c04b48534a7f /autoconf
parent7686b57803b39c93c3da3dc77469e18f0bf04f2a (diff)
downloadexternal_llvm-e2cfe5d23225fa74febd5f170b919bba2c495308.zip
external_llvm-e2cfe5d23225fa74febd5f170b919bba2c495308.tar.gz
external_llvm-e2cfe5d23225fa74febd5f170b919bba2c495308.tar.bz2
For PR814:
Provide support for making cross-compiling builds. See the PR for details. Patch provided by Anton Korobeynikov. Thanks, Anton! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac12
1 files changed, 10 insertions, 2 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 4a276aa..b5fcccb 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -98,9 +98,9 @@ AC_CANONICAL_TARGET
dnl Determine the platform type and cache its value. This helps us configure
dnl the System library to the correct build platform.
-AC_CACHE_CHECK([type of operating system we're on],
+AC_CACHE_CHECK([type of operating system we're going to host on],
[llvm_cv_os_type],
-[case $build in
+[case $host in
*-*-aix*)
llvm_cv_os_type="AIX"
llvm_cv_platform_type="Unix" ;;
@@ -188,6 +188,14 @@ AC_SUBST(ARCH,$llvm_cv_target_arch)
dnl Check for the endianness of the target
AC_C_BIGENDIAN(AC_SUBST([ENDIAN],[big]),AC_SUBST([ENDIAN],[little]))
+dnl Check for build platform executable suffix if we're crosscompiling
+if test "$cross_compiling" = yes; then
+ AC_SUBST(LLVM_CROSS_COMPILING, [1])
+ AC_BUILD_EXEEXT
+else
+ AC_SUBST(LLVM_CROSS_COMPILING, [0])
+fi
+
dnl Check to see if there's a "CVS" directory indicating that this build is
dnl being done from a CVS checkout. This sets up several defaults for the
dnl command line switches. When we build with a CVS directory, we get a