Bug 625401 - Port Bug 585818 (Define variable so Makefiles can easily tell if they're targeting either x86 or x64) to comm-central; r=Callek
authorNomis101@web.de
Fri, 14 Jan 2011 09:54:02 +0000
changeset 6952 757586198da27c77ad38a006e2e51e2a477bb646
parent 6951 fc10d866eed54374ddedd9cf4e55d45675189dba
child 6953 d3f37c90dfd951513edd121b451e10ddd27c890e
push idunknown
push userunknown
push dateunknown
reviewersCallek
bugs625401, 585818
Bug 625401 - Port Bug 585818 (Define variable so Makefiles can easily tell if they're targeting either x86 or x64) to comm-central; r=Callek
config/autoconf.mk.in
configure.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -465,16 +465,18 @@ MOZ_DEMANGLE_SYMBOLS = @MOZ_DEMANGLE_SYM
 
 # XXX - these need to be cleaned up and have real checks added -cls
 CM_BLDTYPE=dbg
 AWT_11=1
 OS_TARGET=@OS_TARGET@
 OS_ARCH=@OS_ARCH@
 OS_RELEASE=@OS_RELEASE@
 OS_TEST=@OS_TEST@
+CPU_ARCH=@CPU_ARCH@
+INTEL_ARCHITECTURE=@INTEL_ARCHITECTURE@
 
 # For Solaris build
 SOLARIS_SUNPRO_CC = @SOLARIS_SUNPRO_CC@
 SOLARIS_SUNPRO_CXX = @SOLARIS_SUNPRO_CXX@
 
 # For OS/2 build
 MOZ_OS2_TOOLS = @MOZ_OS2_TOOLS@
 MOZ_OS2_HIGH_MEMORY = @MOZ_OS2_HIGH_MEMORY@
--- a/configure.in
+++ b/configure.in
@@ -1431,16 +1431,24 @@ arm)
     ;;
 esac
 
 if test -z "$OS_TARGET"; then
     OS_TARGET=$OS_ARCH
 fi
 OS_CONFIG="${OS_TARGET}${OS_RELEASE}"
 
+dnl Set INTEL_ARCHITECTURE if we're compiling for x86-32 or x86-64.
+dnl ===============================================================
+INTEL_ARCHITECTURE=
+case "$OS_TEST" in
+    x86_64|i?86)
+      INTEL_ARCHITECTURE=1
+esac
+
 dnl ========================================================
 dnl GNU specific defaults
 dnl ========================================================
 if test "$GNU_CC"; then
     # FIXME: Let us build with strict aliasing. bug 414641.
     CFLAGS="$CFLAGS -fno-strict-aliasing"
     MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
     MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
@@ -6978,16 +6986,18 @@ AC_SUBST(TARGET_VENDOR)
 AC_SUBST(TARGET_OS)
 AC_SUBST(TARGET_NSPR_MDCPUCFG)
 AC_SUBST(TARGET_MD_ARCH)
 AC_SUBST(TARGET_XPCOM_ABI)
 AC_SUBST(OS_TARGET)
 AC_SUBST(OS_ARCH)
 AC_SUBST(OS_RELEASE)
 AC_SUBST(OS_TEST)
+AC_SUBST(CPU_ARCH)
+AC_SUBST(INTEL_ARCHITECTURE)
 
 AC_SUBST(MOZ_DISABLE_JAR_PACKAGING)
 AC_SUBST(MOZ_CHROME_FILE_FORMAT)
 
 AC_SUBST(WRAP_MALLOC_CFLAGS)
 AC_SUBST(WRAP_MALLOC_LIB)
 AC_SUBST(MKSHLIB)
 AC_SUBST(MKCSHLIB)