Changeset 3f414ef for configure.ac


Ignore:
Timestamp:
Mar 9, 2017, 2:50:54 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
5222605
Parents:
0e7ea335
Message:

configure now properly adds -m32/-m64 based on canonical build and host

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r0e7ea335 r3f414ef  
    169169AC_SUBST(CFA_LIBDIR, ${cfa_libdir})
    170170
     171AC_CANONICAL_BUILD
     172AC_CANONICAL_HOST
     173AC_SUBST([MACHINE_TYPE],[$host_cpu])
     174
     175echo $build_cpu
     176echo $host_cpu
     177
     178if ! test "$host_cpu" = "$build_cpu"; then
     179        case $host_cpu in
     180                i386)
     181                        CFLAGS+="-m32"
     182                        CXXFLAGS+="-m32"
     183                        CFAFLAGS+="-m32"
     184                        LDFLAGS+="-m32"
     185                        ;;
     186                i686)
     187                        CFLAGS+="-m32"
     188                        CXXFLAGS+="-m32"
     189                        CFAFLAGS+="-m32"
     190                        LDFLAGS+="-m32"
     191                        ;;
     192                x86_64)
     193                        CFLAGS+="-m64"
     194                        CXXFLAGS+="-m64"
     195                        CFAFLAGS+="-m64"
     196                        LDFLAGS+="-m64"
     197                        ;;
     198        esac
     199fi
     200
    171201AC_DEFINE_UNQUOTED(CFA_FLAGS, "${CFAFLAGS}", [compilation flags for cfa libraries and test programs.])
    172202AC_SUBST(CFA_FLAGS, ${CFAFLAGS})
    173 
    174 AC_CANONICAL_HOST
    175 AC_SUBST([MACHINE_TYPE],[$host_cpu])
    176203
    177204# Checks for programs.
Note: See TracChangeset for help on using the changeset viewer.