llvm.org GIT mirror llvm / 8bc0803
Set ARCH to x86 on mixed 32/64-bit Linux systems. Remove the explicit if OS = Darwin test around the setting of -m32/-m64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66765 91177308-0d34-0410-b5e6-96231b3b80d8 Nick Lewycky 10 years ago
3 changed file(s) with 29 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
521521 # Building universal cannot compute dependencies automatically.
522522 DISABLE_AUTO_DEPENDENCIES=1
523523 else
524 ifeq ($(OS),Darwin)
525 ifeq ($(ARCH),x86_64)
526 CompileCommonOpts += -m64
527 else
528 ifeq ($(ARCH),x86)
529 CompileCommonOpts += -m32
530 endif
524 ifeq ($(ARCH),x86_64)
525 CompileCommonOpts += -m64
526 else
527 ifeq ($(ARCH),x86)
528 CompileCommonOpts += -m32
531529 endif
532530 endif
533531 endif
230230
231231 if test "$llvm_cv_target_arch" = "Unknown" ; then
232232 AC_MSG_WARN([Configuring LLVM for an unknown target archicture])
233 fi
234
235 if test "$llvm_cv_os_type" = "Linux" -a "$llvm_cv_target_arch" = "x86_64" ; then
236 AC_IS_LINUX_MIXED
237 if test "$llvm_cv_linux_mixed" = "yes"; then
238 llvm_cv_target_arch="x86"
239 fi
233240 fi
234241
235242 dnl Define a substitution, ARCH, for the target architecture
0 #
1 # Some Linux machines run a 64-bit kernel with a 32-bit userspace. 'uname -m'
2 # shows these at x86_64, so in that case, ask the system 'gcc' what it thinks.
3 #
4 AC_DEFUN([AC_IS_LINUX_MIXED],
5 [AC_CACHE_CHECK(for 32-bit userspace on 64-bit system,llvm_cv_linux_mixed,
6 [ AC_LANG_PUSH([C])
7 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
8 [[#ifndef __x86_64__
9 error: Not x86-64 even if uname says so!
10 #endif
11 ]])],
12 [llvm_cv_linux_mixed=no],
13 [llvm_cv_linux_mixed=yes])
14 AC_LANG_POP([C])
15 ])
16 ])