Bug 1255305 - Move --host and --target to moz.configure draft
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 11 Mar 2016 22:57:15 +0900
changeset 339514 89946d6c06c7e34fe95377cec6792c8132d13a7e
parent 339513 d3a16649f3666e4edbb407f40b7b5c822e44ea72
child 339523 fa24c0af74558ca754746025660a1952f6a8142f
push id12749
push userbmo:mh+mozilla@glandium.org
push dateFri, 11 Mar 2016 15:49:26 +0000
bugs1255305
milestone48.0a1
Bug 1255305 - Move --host and --target to moz.configure With all the things that still depend on all the variables derived from --host and --target in both old-configure and moz.build, we still need to keep variables such as OS_ARCH, OS_TARGET, CPU_ARCH, OS_TEST, etc. Eventually, we'd settle on the output of split_triplet. This /tries/ to preserve the current values for all these variables, while also trying to make things a little more consistent. It also effectively rejects OSes such as HPUX or AIX, because it is unclear the decades old accumulated scripts related to them still do anything useful, and we might as well have them start again from scratch, which, in the coming weeks, will be even easier.
build/moz.configure/init.configure
build/moz.configure/old.configure
build/moz.configure/util.configure
js/src/old-configure.in
old-configure.in
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -258,16 +258,177 @@ def shell(mozillabuild):
     shell = 'sh'
     if mozillabuild:
         shell = mozillabuild[0] + '/msys/bin/sh'
     if sys.platform == 'win32':
         shell = shell + '.exe'
     return shell
 
 
+# Host and target systems
+# ==============================================================
+option('--host', nargs=1, help='Define the system type performing the build')
+
+option('--target', nargs=1,
+       help='Define the system type where the resulting executables will be '
+            'used')
+
+@template
+def split_triplet(triplet):
+    # The standard triplet is defined as
+    #   CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+    # There is also a quartet form:
+    #   CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+    # But we can consider the "KERNEL-OPERATING_SYSTEM" as one.
+    cpu, manufacturer, os = triplet.split('-', 2)
+
+    # Autoconf uses config.sub to validate and canonicalize those triplets,
+    # but the granularity of its results has never been satisfying to our
+    # use, so we've had our own, different, canonicalization. We've also
+    # historically not been very consistent with how we use the canonicalized
+    # values. Hopefully, this will help us make things better.
+    # The tests are inherited from our decades-old autoconf-based configure,
+    # which can probably be improved/cleaned up because they are based on a
+    # mix of uname and config.guess output, while we now only use the latter,
+    # which presumably has a cleaner and leaner output. Let's refine later.
+    os = os.replace('/', '_')
+    if 'android' in os:
+        canonical_os = 'Android'
+        canonical_kernel = 'Linux'
+    elif os.startswith('linux'):
+        canonical_os = 'GNU'
+        canonical_kernel = 'Linux'
+    elif os.startswith('kfreebsd') and os.endswith('-gnu'):
+        canonical_os = 'GNU'
+        canonical_kernel = 'kFreeBSD'
+    elif os.startswith('gnu'):
+        canonical_os = canonical_kernel = 'GNU'
+    elif os.startswith('mingw'):
+        canonical_os = canonical_kernel = 'WINNT'
+    elif os.startswith('darwin'):
+        canonical_os = canonical_kernel = 'Darwin'
+    elif os.startswith('dragonfly'):
+        canonical_os = canonical_kernel = 'DragonFly'
+    elif os.startswith('freebsd'):
+        canonical_os = canonical_kernel = 'FreeBSD'
+    elif os.startswith('netbsd'):
+        canonical_os = canonical_kernel = 'NetBSD'
+    elif os.startswith('openbsd'):
+        canonical_os = canonical_kernel = 'OpenBSD'
+    else:
+        error('Unknown OS: %s' % os)
+
+    # The CPU granularity is probably not enough. Moving more things from
+    # old-configure will tell us if we need more
+    if cpu.endswith('86') or cpu == 'i86pc' or (cpu.startswith('i') and
+                                                '86' in cpu):
+        canonical_cpu = 'x86'
+    elif cpu in ('s390', 's390x', 'x86_64', 'ia64'):
+        canonical_cpu = cpu
+    elif cpu in ('powerpc64', 'ppc64', 'powerpc64le', 'ppc64le'):
+        canonical_cpu = 'ppc64'
+    elif cpu in ('powerpc', 'ppc', 'rs6000') or cpu.startswith('powerpc'):
+        canonical_cpu = 'ppc'
+    elif cpu in ('Alpha', 'alpha', 'ALPHA'):
+        canonical_cpu = 'Alpha'
+    elif cpu.startswith('hppa') or cpu == 'parisc':
+        canonical_cpu = 'hppa'
+    elif cpu.startswith('sparc') or cpu == 'sun4u':
+        canonical_cpu = 'sparc'
+    elif cpu.startswith('arm'):
+        canonical_cpu = 'arm'
+    elif cpu in ('mips', 'mipsel'):
+        canonical_cpu = 'mips32'
+    elif cpu in ('mips64', 'mips64el'):
+        canonical_cpu = 'mips64'
+    elif cpu.startswith('aarch64'):
+        canonical_cpu = 'aarch64'
+    else:
+        canonical_cpu = cpu
+
+    return namespace(
+        alias=triplet,
+        cpu=canonical_cpu,
+        kernel=canonical_kernel,
+        os=canonical_os,
+        raw_cpu=cpu,
+    )
+
+
+@depends('--host', shell)
+@advanced
+def host(value, shell):
+    if not value:
+        import subprocess
+        config_guess = os.path.join(os.path.dirname(__file__), '..',
+                                    'autoconf', 'config.guess')
+        host = subprocess.check_output([shell, config_guess]).strip()
+    else:
+        host = value[0]
+
+    return split_triplet(host)
+
+
+@depends('--target', host)
+def target(value, host):
+    if not value:
+        return host
+    return split_triplet(value[0])
+
+
+@depends(host, target)
+def host_and_target_for_old_configure(host, target):
+    # Autoconf needs these set
+    add_old_configure_arg('--host=%s' % host.alias)
+    add_old_configure_arg('--target=%s' % target.alias)
+
+
+# These variables are for compatibility with the current moz.builds and
+# old-configure. Eventually, we'll want to canonicalize better.
+@depends(target)
+def target_variables(target):
+    if target.kernel == 'kFreeBSD':
+        os_target = 'GNU/kFreeBSD'
+        os_arch = 'GNU_kFreeBSD'
+    elif target.kernel == 'Linux' and target.os == 'GNU':
+        os_target = target.kernel
+        os_arch = target.kernel
+    else:
+        os_target = target.os
+        os_arch = target.kernel
+    add_old_configure_assignment('OS_TARGET', os_target)
+    set_config('OS_TARGET', os_target)
+    add_old_configure_assignment('OS_ARCH', os_arch)
+    set_config('OS_ARCH', os_arch)
+
+    if target.os == 'Darwin' and target.cpu == 'x86':
+        os_test = 'i386'
+    else:
+        os_test = target.raw_cpu
+    add_old_configure_assignment('OS_TEST', os_test)
+    set_config('OS_TEST', os_test)
+
+    add_old_configure_assignment('CPU_ARCH', target.cpu)
+    set_config('CPU_ARCH', target.cpu)
+
+    if target.cpu in ('x86', 'x86_64'):
+        set_config('INTEL_ARCHITECTURE', '1')
+
+@depends(host)
+def host_variables(host):
+    if host.kernel == 'kFreeBSD':
+        os_arch = 'GNU_kFreeBSD'
+    else:
+        os_arch = host.kernel
+    add_old_configure_assignment('HOST_OS_ARCH', os_arch)
+    set_config('HOST_OS_ARCH', os_arch)
+
+
+# The application/project to build
+# ==============================================================
 option('--enable-application', nargs=1, env='MOZ_BUILD_APP',
        help='Application to build. Same as --enable-project.')
 
 @depends('--enable-application', '--help')
 def application(app, help):
     if app:
         imply_option(app.format('--enable-project'))
 
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -260,20 +260,18 @@ def old_configure_options(*options):
     '--enable-webrtc',
     '--enable-websms-backend',
     '--enable-webspeech',
     '--enable-webspeechtestbackend',
     '--enable-wmf',
     '--enable-xterm-updates',
     '--enable-xul',
     '--enable-zipwriter',
-    '--host',
     '--no-create',
     '--prefix',
-    '--target',
     '--with-adjust-sdk-keyfile',
     '--with-android-cxx-stl',
     '--with-android-distribution-directory',
     '--with-android-gnu-compiler-version',
     '--with-android-max-sdk',
     '--with-android-min-sdk',
     '--with-android-ndk',
     '--with-android-sdk',
--- a/build/moz.configure/util.configure
+++ b/build/moz.configure/util.configure
@@ -95,8 +95,16 @@ def deprecated_option(*args, **kwargs):
     def decorator(func):
         @depends(opt.option)
         def deprecated(value):
             if value.origin != 'default':
                 return func(value)
         return deprecated
 
     return decorator
+
+
+# from mozbuild.util import ReadOnlyNamespace as namespace
+@template
+@advanced
+def namespace(**kwargs):
+    from mozbuild.util import ReadOnlyNamespace
+    return ReadOnlyNamespace(**kwargs)
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -687,92 +687,18 @@ DIRENT_INO=d_ino
 MOZ_USER_DIR=".mozilla"
 
 MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib"
 
 USE_DEPENDENT_LIBS=1
 
 _PLATFORM_DEFAULT_TOOLKIT=cairo-gtk2
 
-if test -n "$CROSS_COMPILE"; then
-    OS_TARGET="${target_os}"
-    OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
-    case "${target_os}" in
-        linux*)       OS_ARCH=Linux OS_TARGET=Linux ;;
-        kfreebsd*-gnu) OS_ARCH=GNU_kFreeBSD OS_TARGET=GNU/kFreeBSD ;;
-        gnu*)         OS_ARCH=GNU ;;
-        solaris*)     OS_ARCH=SunOS ;;
-        mingw*)       OS_ARCH=WINNT OS_TARGET=WINNT ;;
-        darwin*)      OS_ARCH=Darwin OS_TARGET=Darwin ;;
-        dragonfly*)   OS_ARCH=DragonFly OS_TARGET=DragonFly ;;
-        freebsd*)     OS_ARCH=FreeBSD OS_TARGET=FreeBSD ;;
-        netbsd*)      OS_ARCH=NetBSD OS_TARGET=NetBSD ;;
-        openbsd*)     OS_ARCH=OpenBSD OS_TARGET=OpenBSD ;;
-    esac
-    case "${target}" in
-        *-android*|*-linuxandroid*) OS_ARCH=Linux OS_TARGET=Android ;;
-    esac
-else
-    OS_TARGET=`uname -s`
-    OS_ARCH=`uname -s | sed -e 's|/|_|g'`
-fi
-
-# Before this used `uname -m` when not cross compiling
-# but that breaks when you have a 64 bit kernel with a 32 bit userland.
-OS_TEST="${target_cpu}"
-
-HOST_OS_ARCH=`echo $host_os | sed -e 's|/|_|g'`
-
-#######################################################################
-# Master "Core Components" macros for getting the OS target           #
-#######################################################################
-
-#
-# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
-# cross-compilation.
-#
-
-#
-# Define and override various archtecture-specific variables, including
-# HOST_OS_ARCH
-# OS_ARCH
-# OS_TEST
-# OS_TARGET
-#
-
 case "$HOST_OS_ARCH" in
-mingw*)
-    HOST_OS_ARCH=WINNT
-    ;;
-darwin*)
-    HOST_OS_ARCH=Darwin
-    ;;
-linux*)
-    HOST_OS_ARCH=Linux
-    ;;
-kfreebsd*-gnu)
-    HOST_OS_ARCH=GNU_kFreeBSD
-    ;;
-gnu*)
-    HOST_OS_ARCH=GNU
-    ;;
-dragonfly*)
-    HOST_OS_ARCH=DragonFly
-    ;;
-freebsd*)
-    HOST_OS_ARCH=FreeBSD
-    ;;
-netbsd*)
-    HOST_OS_ARCH=NetBSD
-    ;;
-openbsd*)
-    HOST_OS_ARCH=OpenBSD
-    ;;
-solaris*)
-    HOST_OS_ARCH=SunOS
+SunOS)
     SOLARIS_SUNPRO_CC=
     SOLARIS_SUNPRO_CXX=
     if test -z "$GNU_CC"; then
         if test "`$CC -V 2>&1 | egrep -c 'Sun.*C '`" != "0"; then
             SOLARIS_SUNPRO_CC=1
        fi
     fi
 
@@ -782,125 +708,25 @@ solaris*)
        fi
     fi
     AC_SUBST(SOLARIS_SUNPRO_CC)
     AC_SUBST(SOLARIS_SUNPRO_CXX)
     ;;
 esac
 
 case "$OS_ARCH" in
-WINNT)
-    if test -z "$CROSS_COMPILE" ; then
-        OS_TEST=`uname -p`
-    fi
-    ;;
-Windows_NT)
-    OS_ARCH=WINNT
-    OS_TARGET=WINNT
-    ;;
-MINGW*_NT*)
-    OS_ARCH=WINNT
-    OS_TARGET=WINNT
-    ;;
 AIX)
-    OS_TEST=${target_cpu}
     if test -z "$GNU_CC"; then
         if test "`$CC -qversion 2>&1 | egrep -c 'IBM XL'`" != "0"; then
             AIX_IBM_XLC=1
         fi
     fi
     ;;
-Darwin)
-    case "${target_cpu}" in
-    powerpc*)
-        OS_TEST=ppc
-        ;;
-    i*86*)
-        OS_TEST=i386
-        ;;
-    x86_64)
-        OS_TEST=x86_64
-        ;;
-    *)
-        if test -z "$CROSS_COMPILE" ; then
-            OS_TEST=`uname -p`
-        fi
-        ;;
-    esac
-    ;;
 esac
 
-# Only set CPU_ARCH if we recognize the value of OS_TEST
-
-case "$OS_TEST" in
-*86 | i86pc)
-    CPU_ARCH=x86
-    ;;
-
-powerpc64 | ppc64 | powerpc64le | ppc64le)
-    CPU_ARCH=ppc64
-    ;;
-
-powerpc | ppc | rs6000)
-    CPU_ARCH=ppc
-    ;;
-
-Alpha | alpha | ALPHA)
-    CPU_ARCH=Alpha
-    ;;
-
-s390)
-    CPU_ARCH=s390
-    ;;
-
-s390x)
-    CPU_ARCH=s390x
-    ;;
-
-hppa* | parisc)
-    CPU_ARCH=hppa
-    ;;
-
-sun4u | sparc*)
-    CPU_ARCH=sparc
-    ;;
-
-x86_64 | ia64)
-    CPU_ARCH="$OS_TEST"
-    ;;
-
-arm*)
-    CPU_ARCH=arm
-    ;;
-
-mips|mipsel)
-    CPU_ARCH="mips32"
-    ;;
-
-mips64|mips64el)
-    CPU_ARCH="mips64"
-    ;;
-
-aarch64*)
-    CPU_ARCH=aarch64
-    ;;
-
-esac
-
-if test -z "$OS_TARGET"; then
-    OS_TARGET=$OS_ARCH
-fi
-
-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 Configure platform-specific CPU architecture compiler options.
 dnl ==============================================================
 MOZ_ARCH_OPTS
 
 dnl =================================================================
 dnl Set up and test static assertion macros used to avoid AC_TRY_RUN,
 dnl which is bad when cross compiling.
@@ -3392,27 +3218,21 @@ AC_SUBST(HOST_CFLAGS)
 AC_SUBST(HOST_CXXFLAGS)
 AC_SUBST(HOST_LDFLAGS)
 AC_SUBST(HOST_OPTIMIZE_FLAGS)
 AC_SUBST(HOST_AR)
 AC_SUBST(HOST_AR_FLAGS)
 AC_SUBST(HOST_LD)
 AC_SUBST(HOST_RANLIB)
 AC_SUBST(HOST_BIN_SUFFIX)
-AC_SUBST(HOST_OS_ARCH)
 
 AC_SUBST(TARGET_CPU)
 AC_SUBST(TARGET_VENDOR)
 AC_SUBST(TARGET_OS)
 AC_SUBST(TARGET_XPCOM_ABI)
-AC_SUBST(OS_TARGET)
-AC_SUBST(OS_ARCH)
-AC_SUBST(OS_TEST)
-AC_SUBST(CPU_ARCH)
-AC_SUBST(INTEL_ARCHITECTURE)
 
 AC_SUBST(WRAP_LDFLAGS)
 AC_SUBST(MKSHLIB)
 AC_SUBST(MKCSHLIB)
 AC_SUBST(DSO_CFLAGS)
 AC_SUBST(DSO_PIC_CFLAGS)
 AC_SUBST(DSO_LDOPTS)
 AC_SUBST(LIB_PREFIX)
--- a/old-configure.in
+++ b/old-configure.in
@@ -890,92 +890,18 @@ MOZ_USER_DIR=".mozilla"
 MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib"
 
 MOZ_FS_LAYOUT=unix
 
 USE_DEPENDENT_LIBS=1
 
 _PLATFORM_DEFAULT_TOOLKIT=cairo-gtk3
 
-if test -n "$CROSS_COMPILE"; then
-    OS_TARGET="${target_os}"
-    OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
-    case "${target_os}" in
-        linux*)       OS_ARCH=Linux OS_TARGET=Linux ;;
-        kfreebsd*-gnu) OS_ARCH=GNU_kFreeBSD OS_TARGET=GNU/kFreeBSD ;;
-        gnu*)         OS_ARCH=GNU ;;
-        solaris*)     OS_ARCH=SunOS ;;
-        mingw*)       OS_ARCH=WINNT OS_TARGET=WINNT ;;
-        darwin*)      OS_ARCH=Darwin OS_TARGET=Darwin ;;
-        dragonfly*)   OS_ARCH=DragonFly OS_TARGET=DragonFly ;;
-        freebsd*)     OS_ARCH=FreeBSD OS_TARGET=FreeBSD ;;
-        netbsd*)      OS_ARCH=NetBSD OS_TARGET=NetBSD ;;
-        openbsd*)     OS_ARCH=OpenBSD OS_TARGET=OpenBSD ;;
-    esac
-    case "${target}" in
-        *-android*|*-linuxandroid*) OS_ARCH=Linux OS_TARGET=Android ;;
-    esac
-else
-    OS_TARGET=`uname -s`
-    OS_ARCH=`uname -s | sed -e 's|/|_|g'`
-fi
-
-# Before this used `uname -m` when not cross compiling
-# but that breaks when you have a 64 bit kernel with a 32 bit userland.
-OS_TEST="${target_cpu}"
-
-HOST_OS_ARCH=`echo $host_os | sed -e 's|/|_|g'`
-
-#######################################################################
-# Master "Core Components" macros for getting the OS target           #
-#######################################################################
-
-#
-# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
-# cross-compilation.
-#
-
-#
-# Define and override various archtecture-specific variables, including
-# HOST_OS_ARCH
-# OS_ARCH
-# OS_TEST
-# OS_TARGET
-#
-
 case "$HOST_OS_ARCH" in
-mingw*)
-    HOST_OS_ARCH=WINNT
-    ;;
-darwin*)
-    HOST_OS_ARCH=Darwin
-    ;;
-linux*)
-    HOST_OS_ARCH=Linux
-    ;;
-kfreebsd*-gnu)
-    HOST_OS_ARCH=GNU_kFreeBSD
-    ;;
-gnu*)
-    HOST_OS_ARCH=GNU
-    ;;
-dragonfly*)
-    HOST_OS_ARCH=DragonFly
-    ;;
-freebsd*)
-    HOST_OS_ARCH=FreeBSD
-    ;;
-netbsd*)
-    HOST_OS_ARCH=NetBSD
-    ;;
-openbsd*)
-    HOST_OS_ARCH=OpenBSD
-    ;;
-solaris*)
-    HOST_OS_ARCH=SunOS
+SunOS)
     SOLARIS_SUNPRO_CC=
     SOLARIS_SUNPRO_CXX=
     if test -z "$GNU_CC"; then
         if test "`$CC -V 2>&1 | egrep -c 'Sun.*C '`" != "0"; then
             SOLARIS_SUNPRO_CC=1
        fi
     fi
 
@@ -984,122 +910,16 @@ solaris*)
            SOLARIS_SUNPRO_CXX=1
        fi
     fi
     AC_SUBST(SOLARIS_SUNPRO_CC)
     AC_SUBST(SOLARIS_SUNPRO_CXX)
     ;;
 esac
 
-case "$OS_ARCH" in
-WINNT)
-    if test -z "$CROSS_COMPILE" ; then
-        OS_TEST=`uname -p`
-    fi
-    ;;
-Windows_NT)
-    OS_ARCH=WINNT
-    OS_TARGET=WINNT
-    ;;
-MINGW*_NT*)
-    OS_ARCH=WINNT
-    OS_TARGET=WINNT
-    ;;
-AIX)
-    OS_TEST=${target_cpu}
-    ;;
-Darwin)
-    case "${target_cpu}" in
-    powerpc*)
-        OS_TEST=ppc
-        ;;
-    i*86*)
-        OS_TEST=i386
-        ;;
-    x86_64)
-        OS_TEST=x86_64
-        ;;
-    *)
-        if test -z "$CROSS_COMPILE" ; then
-            OS_TEST=`uname -p`
-        fi
-        ;;
-    esac
-    ;;
-esac
-
-# Only set CPU_ARCH if we recognize the value of OS_TEST
-
-case "$OS_TEST" in
-*86 | i86pc)
-    CPU_ARCH=x86
-    ;;
-
-powerpc64 | ppc64 | powerpc64le | ppc64le)
-    CPU_ARCH=ppc64
-    ;;
-
-powerpc | ppc | rs6000)
-    CPU_ARCH=ppc
-    ;;
-
-Alpha | alpha | ALPHA)
-    CPU_ARCH=Alpha
-    ;;
-
-s390)
-    CPU_ARCH=s390
-    ;;
-
-s390x)
-    CPU_ARCH=s390x
-    ;;
-
-hppa* | parisc)
-    CPU_ARCH=hppa
-    ;;
-
-sun4u | sparc*)
-    CPU_ARCH=sparc
-    ;;
-
-x86_64 | ia64)
-    CPU_ARCH="$OS_TEST"
-    ;;
-
-arm*)
-    CPU_ARCH=arm
-    ;;
-
-mips|mipsel)
-    CPU_ARCH="mips32"
-    ;;
-
-mips64|mips64el)
-    CPU_ARCH="mips64"
-    ;;
-
-
-aarch64*)
-    CPU_ARCH=aarch64
-    ;;
-esac
-
-if test -z "$OS_TARGET"; then
-    OS_TARGET=$OS_ARCH
-fi
-
-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 Configure platform-specific CPU architecture compiler options.
 dnl ==============================================================
 if test "$COMPILE_ENVIRONMENT"; then
     MOZ_ARCH_OPTS
 else
     if test "$OS_TARGET" = Android -a x"$MOZ_WIDGET_TOOLKIT" != x"gonk"; then
         dnl Default Android builds to ARMv7.
         MOZ_ARCH=armv7-a
@@ -8649,29 +8469,23 @@ AC_SUBST(HOST_CFLAGS)
 AC_SUBST(HOST_CXXFLAGS)
 AC_SUBST(HOST_LDFLAGS)
 AC_SUBST(HOST_OPTIMIZE_FLAGS)
 AC_SUBST(HOST_AR)
 AC_SUBST(HOST_AR_FLAGS)
 AC_SUBST(HOST_LD)
 AC_SUBST(HOST_RANLIB)
 AC_SUBST(HOST_BIN_SUFFIX)
-AC_SUBST(HOST_OS_ARCH)
 
 AC_SUBST(RUSTFLAGS)
 
 AC_SUBST(TARGET_CPU)
 AC_SUBST(TARGET_VENDOR)
 AC_SUBST(TARGET_OS)
 AC_SUBST(TARGET_XPCOM_ABI)
-AC_SUBST(OS_TARGET)
-AC_SUBST(OS_ARCH)
-AC_SUBST(OS_TEST)
-AC_SUBST(CPU_ARCH)
-AC_SUBST(INTEL_ARCHITECTURE)
 AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSSE3)
 AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSE4_1)
 AC_SUBST(HAVE_X86_AVX2)
 AC_SUBST(GCC_USE_GNU_LD)
 
 AC_SUBST(MOZ_CHROME_FILE_FORMAT)
 
 AC_SUBST(WRAP_LDFLAGS)