michael@0: # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- michael@0: # vim: set filetype=python: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: if CONFIG['OS_ARCH'] == 'Darwin': michael@0: SOURCES += [ michael@0: 'xptcinvoke_darwin.cpp', michael@0: 'xptcstubs_darwin.cpp', michael@0: ] michael@0: if CONFIG['OS_TEST'] == 'powerpc': michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_ppc_rhapsody.s', michael@0: ] michael@0: GENERATED_SOURCES += [ michael@0: 'xptcstubs_asm_ppc_darwin.s', michael@0: ] michael@0: if '86' in CONFIG['OS_TEST'] and CONFIG['OS_TEST'] != 'x86_64': michael@0: DEFINES['MOZ_NEED_LEADING_UNDERSCORE'] = True michael@0: michael@0: if CONFIG['OS_ARCH'] in ('NetBSD', 'OpenBSD', 'GNU'): michael@0: if CONFIG['CPU_ARCH'] == 'x86': michael@0: SOURCES += [ michael@0: 'xptcinvoke_gcc_x86_unix.cpp', michael@0: 'xptcstubs_gcc_x86_unix.cpp' michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD') or \ michael@0: CONFIG['OS_ARCH'].startswith('GNU_'): michael@0: if CONFIG['OS_TEST'] == 'x86_64': michael@0: SOURCES += [ michael@0: 'xptcinvoke_x86_64_unix.cpp', michael@0: 'xptcstubs_x86_64_linux.cpp', michael@0: ] michael@0: elif CONFIG['OS_TEST'].find('86') != -1: michael@0: SOURCES += [ michael@0: 'xptcinvoke_gcc_x86_unix.cpp', michael@0: 'xptcstubs_gcc_x86_unix.cpp' michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'): michael@0: if CONFIG['OS_TEST'].find('ia64') != -1: michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_ipf64.s', michael@0: 'xptcinvoke_ipf64.cpp', michael@0: 'xptcstubs_asm_ipf64.s', michael@0: 'xptcstubs_ipf64.cpp' michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'x86_64': michael@0: SOURCES += [ michael@0: 'xptcinvoke_amd64_openbsd.cpp', michael@0: 'xptcstubs_amd64_openbsd.cpp' michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'SunOS': michael@0: if CONFIG['OS_TEST'] == 'x86_64': michael@0: if CONFIG['GNU_CC']: michael@0: SOURCES += [ michael@0: 'xptcinvoke_x86_64_unix.cpp', michael@0: 'xptcstubs_x86_64_linux.cpp' michael@0: ] michael@0: else: michael@0: SOURCES += [ michael@0: 'xptcinvoke_x86_64_solaris.cpp', michael@0: 'xptcstubs_asm_x86_64_solaris_SUNW.s', michael@0: 'xptcstubs_x86_64_solaris.cpp', michael@0: ] michael@0: elif CONFIG['OS_TEST'].find('86') != -1: michael@0: if CONFIG['GNU_CC']: michael@0: SOURCES += [ michael@0: 'xptcinvoke_gcc_x86_unix.cpp', michael@0: 'xptcstubs_gcc_x86_unix.cpp' michael@0: ] michael@0: else: michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_x86_solaris_SUNW.s', michael@0: 'xptcinvoke_x86_solaris.cpp', michael@0: 'xptcstubs_asm_x86_solaris_SUNW.s', michael@0: 'xptcstubs_x86_solaris.cpp' michael@0: ] michael@0: michael@0: if CONFIG['OS_TEST'] == 'alpha': michael@0: if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD'): michael@0: SOURCES += [ michael@0: 'xptcinvoke_linux_alpha.cpp', michael@0: 'xptcstubs_linux_alpha.cpp', michael@0: ] michael@0: elif CONFIG['OS_ARCH'] == 'OpenBSD': michael@0: SOURCES += [ michael@0: 'xptcinvoke_alpha_openbsd.cpp', michael@0: 'xptcstubs_alpha_openbsd.cpp', michael@0: ] michael@0: michael@0: if CONFIG['CPU_ARCH'] == 'arm' or CONFIG['OS_TEST'] == 'sa110': michael@0: if CONFIG['OS_ARCH'] == 'Linux': michael@0: SOURCES += [ michael@0: 'xptcinvoke_arm.cpp', michael@0: 'xptcstubs_arm.cpp' michael@0: ] michael@0: CXXFLAGS += ['-O2'] michael@0: elif CONFIG['OS_ARCH'] == 'NetBSD': michael@0: SOURCES += [ michael@0: 'xptcinvoke_arm_netbsd.cpp', michael@0: 'xptcstubs_arm_netbsd.cpp', michael@0: ] michael@0: michael@0: if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['OS_ARCH'] == 'OpenBSD': michael@0: SOURCES += [ michael@0: 'xptcinvoke_arm_openbsd.cpp', michael@0: 'xptcstubs_arm_openbsd.cpp', michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'HP-UX': michael@0: if CONFIG['CC'] != 'gcc': michael@0: if CONFIG['OS_TEST'] == 'ia64': michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_ipf32.s', michael@0: 'xptcinvoke_ipf32.cpp', michael@0: 'xptcstubs_asm_ipf32.s', michael@0: 'xptcstubs_ipf32.cpp', michael@0: ] michael@0: else: michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_pa32.s', michael@0: 'xptcinvoke_pa32.cpp', michael@0: 'xptcstubs_asm_pa32.s', michael@0: 'xptcstubs_pa32.cpp' michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'Linux': michael@0: if CONFIG['OS_TEST'] in ('hppa', 'hppa2.0', 'hppa1.1'): michael@0: if CONFIG['GNU_CXX']: michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_parisc_linux.s', michael@0: 'xptcinvoke_pa32.cpp', michael@0: 'xptcstubs_asm_parisc_linux.s', michael@0: 'xptcstubs_pa32.cpp', michael@0: ] michael@0: elif CONFIG['COMPILE_ENVIRONMENT']: michael@0: error('Unknown C++ compiler, xptcall assembly will probably be incorrect.') michael@0: michael@0: if CONFIG['OS_ARCH'] == 'NetBSD': michael@0: if CONFIG['OS_TEST'] in ('amiga', 'atari', 'hp300', 'mac68k', 'mvme68k', michael@0: 'next68k', 'sun3', 'sun3x', 'x68k'): michael@0: SOURCES += [ michael@0: 'xptcinvoke_netbsd_m68k.cpp', michael@0: 'xptcstubs_netbsd_m68k.cpp' michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'Linux': michael@0: if CONFIG['OS_TEST'] == 'aarch64': michael@0: SOURCES += [ michael@0: 'xptcinvoke_aarch64.cpp', michael@0: 'xptcinvoke_asm_aarch64.s', michael@0: 'xptcstubs_aarch64.cpp', michael@0: 'xptcstubs_asm_aarch64.s', michael@0: ] michael@0: if CONFIG['OS_TEST'] == 'm68k': michael@0: SOURCES += [ michael@0: 'xptcinvoke_linux_m68k.cpp', michael@0: 'xptcstubs_linux_m68k.cpp', michael@0: ] michael@0: if CONFIG['OS_TEST'].find('mips') != -1: michael@0: if CONFIG['OS_TEST'].find('mips64') != -1: michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_mips64.S', michael@0: 'xptcinvoke_mips64.cpp', michael@0: 'xptcstubs_asm_mips64.S', michael@0: 'xptcstubs_mips64.cpp', michael@0: ] michael@0: else: michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_mips.S', michael@0: 'xptcinvoke_mips.cpp', michael@0: 'xptcstubs_asm_mips.S', michael@0: 'xptcstubs_mips.cpp', michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'AIX': michael@0: if CONFIG['HAVE_64BIT_OS']: michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_ppc_aix64.s', michael@0: 'xptcinvoke_ppc_aix64.cpp', michael@0: 'xptcstubs_ppc_aix64.cpp', michael@0: ] michael@0: GENERATED_SOURCES += [ michael@0: 'xptcstubs_asm_ppc_aix64.s', michael@0: ] michael@0: else: michael@0: SOURCES += [ michael@0: 'xptcinvoke_ppc_aix.cpp', michael@0: 'xptcstubs_ppc_aix.cpp', michael@0: ] michael@0: if CONFIG['AIX_OBJMODEL'] == 'ibm': michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_ppc_ibmobj_aix.s', michael@0: ] michael@0: else: michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_ppc_aix.s', michael@0: ] michael@0: GENERATED_SOURCES += [ michael@0: 'xptcstubs_asm_ppc_aix.s', michael@0: ] michael@0: michael@0: if CONFIG['OS_TEST'] == 'powerpc': michael@0: if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'): michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_ppc_linux.S', michael@0: 'xptcinvoke_ppc_linux.cpp', michael@0: 'xptcstubs_asm_ppc_linux.S', michael@0: 'xptcstubs_ppc_linux.cpp', michael@0: ] michael@0: michael@0: if CONFIG['OS_TEST'] in ('powerpc64', 'powerpc64le'): michael@0: if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'): michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_ppc64_linux.S', michael@0: 'xptcinvoke_ppc64_linux.cpp', michael@0: 'xptcstubs_asm_ppc64_linux.S', michael@0: 'xptcstubs_ppc64_linux.cpp', michael@0: ] michael@0: michael@0: if CONFIG['OS_TEST'] in ('macppc', 'bebox', 'ofppc', 'prep', 'amigappc'): michael@0: if CONFIG['OS_ARCH'] == 'NetBSD': michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_ppc_netbsd.s', michael@0: 'xptcinvoke_ppc_netbsd.cpp', michael@0: 'xptcstubs_asm_ppc_netbsd.s', michael@0: 'xptcstubs_ppc_netbsd.cpp', michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'powerpc': michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_ppc_openbsd.S', michael@0: 'xptcinvoke_ppc_openbsd.cpp', michael@0: 'xptcstubs_asm_ppc_openbsd.S', michael@0: 'xptcstubs_ppc_openbsd.cpp', michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TEST'].find('sparc') != -1: michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_sparc_linux_GCC3.s', michael@0: 'xptcinvoke_sparc_solaris.cpp', michael@0: 'xptcstubs_asm_sparc_solaris.s', michael@0: 'xptcstubs_sparc_solaris.cpp', michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'NetBSD' and CONFIG['OS_TEST'] == 'sparc': michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_sparc_netbsd.s', michael@0: 'xptcinvoke_sparc_netbsd.cpp', michael@0: 'xptcstubs_asm_sparc_netbsd.s', michael@0: 'xptcstubs_sparc_netbsd.cpp', michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'sparc': michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_sparc_openbsd.s', michael@0: 'xptcinvoke_sparc_openbsd.cpp', michael@0: 'xptcstubs_asm_sparc_openbsd.s', michael@0: 'xptcstubs_sparc_openbsd.cpp', michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] in ('OpenBSD', 'FreeBSD') and CONFIG['OS_TEST'] == 'sparc64': michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_sparc64_openbsd.s', michael@0: 'xptcinvoke_sparc64_openbsd.cpp', michael@0: 'xptcstubs_asm_sparc64_openbsd.s', michael@0: 'xptcstubs_sparc64_openbsd.cpp', michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'SunOS' and CONFIG['OS_TEST'].find('86') == -1: michael@0: GENERATED_FILES = [ michael@0: 'xptcstubsdef_asm.solx86', michael@0: ] michael@0: if CONFIG['HAVE_64BIT_OS']: michael@0: SOURCES += [ michael@0: 'xptcinvoke_sparcv9_solaris.cpp', michael@0: 'xptcstubs_sparcv9_solaris.cpp', michael@0: ] michael@0: else: michael@0: SOURCES += [ michael@0: 'xptcinvoke_sparc_solaris.cpp', michael@0: 'xptcstubs_sparc_solaris.cpp', michael@0: ] michael@0: if CONFIG['GNU_CC']: michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_sparc_solaris_GCC3.s', michael@0: 'xptcstubs_asm_sparc_solaris.s', michael@0: ] michael@0: else: michael@0: if CONFIG['HAVE_64BIT_OS']: michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_sparcv9_solaris_SUNW.s', michael@0: 'xptcstubs_asm_sparcv9_solaris.s', michael@0: ] michael@0: else: michael@0: SOURCES += [ michael@0: 'xptcinvoke_asm_sparc_solaris_SUNW.s', michael@0: 'xptcstubs_asm_sparc_solaris.s', michael@0: ] michael@0: michael@0: if CONFIG['OS_ARCH'] == 'Linux': michael@0: if CONFIG['OS_TEST'] == 's390': michael@0: SOURCES += [ michael@0: 'xptcinvoke_linux_s390.cpp', michael@0: 'xptcstubs_linux_s390.cpp', michael@0: ] michael@0: CXXFLAGS += [ michael@0: '-fno-strict-aliasing', michael@0: '-fno-inline', michael@0: '-fomit-frame-pointer', michael@0: '-mbackchain', michael@0: ] michael@0: elif CONFIG['OS_TEST'] == 's390x': michael@0: SOURCES += [ michael@0: 'xptcinvoke_linux_s390x.cpp', michael@0: 'xptcstubs_linux_s390x.cpp', michael@0: ] michael@0: CXXFLAGS += [ michael@0: '-fno-strict-aliasing', michael@0: '-fno-inline', michael@0: '-fomit-frame-pointer', michael@0: '-mbackchain', michael@0: ] michael@0: michael@0: FINAL_LIBRARY = 'xpcom_core' michael@0: michael@0: LOCAL_INCLUDES += [ michael@0: '../..', michael@0: '../../../../xptinfo/src', michael@0: ] michael@0: michael@0: NO_PGO = True