xpcom/reflect/xptcall/src/md/unix/moz.build

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/reflect/xptcall/src/md/unix/moz.build	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,337 @@
     1.4 +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
     1.5 +# vim: set filetype=python:
     1.6 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 +
    1.10 +if CONFIG['OS_ARCH'] == 'Darwin':
    1.11 +    SOURCES += [
    1.12 +        'xptcinvoke_darwin.cpp',
    1.13 +        'xptcstubs_darwin.cpp',
    1.14 +    ]
    1.15 +    if CONFIG['OS_TEST'] == 'powerpc':
    1.16 +        SOURCES += [
    1.17 +            'xptcinvoke_asm_ppc_rhapsody.s',
    1.18 +        ]
    1.19 +        GENERATED_SOURCES += [
    1.20 +            'xptcstubs_asm_ppc_darwin.s',
    1.21 +        ]
    1.22 +    if '86' in CONFIG['OS_TEST'] and CONFIG['OS_TEST'] != 'x86_64':
    1.23 +        DEFINES['MOZ_NEED_LEADING_UNDERSCORE'] = True
    1.24 +
    1.25 +if CONFIG['OS_ARCH'] in ('NetBSD', 'OpenBSD', 'GNU'):
    1.26 +    if CONFIG['CPU_ARCH'] == 'x86':
    1.27 +        SOURCES += [
    1.28 +            'xptcinvoke_gcc_x86_unix.cpp',
    1.29 +            'xptcstubs_gcc_x86_unix.cpp'
    1.30 +        ]
    1.31 +
    1.32 +if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD') or \
    1.33 +   CONFIG['OS_ARCH'].startswith('GNU_'):
    1.34 +    if CONFIG['OS_TEST'] == 'x86_64':
    1.35 +        SOURCES += [
    1.36 +            'xptcinvoke_x86_64_unix.cpp',
    1.37 +            'xptcstubs_x86_64_linux.cpp',
    1.38 +        ]
    1.39 +    elif CONFIG['OS_TEST'].find('86') != -1:
    1.40 +        SOURCES += [
    1.41 +            'xptcinvoke_gcc_x86_unix.cpp',
    1.42 +            'xptcstubs_gcc_x86_unix.cpp'
    1.43 +        ]
    1.44 +
    1.45 +if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'):
    1.46 +    if CONFIG['OS_TEST'].find('ia64') != -1:
    1.47 +        SOURCES += [
    1.48 +            'xptcinvoke_asm_ipf64.s',
    1.49 +            'xptcinvoke_ipf64.cpp',
    1.50 +            'xptcstubs_asm_ipf64.s',
    1.51 +            'xptcstubs_ipf64.cpp'
    1.52 +        ]
    1.53 +
    1.54 +if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'x86_64':
    1.55 +    SOURCES += [
    1.56 +        'xptcinvoke_amd64_openbsd.cpp',
    1.57 +        'xptcstubs_amd64_openbsd.cpp'
    1.58 +    ]
    1.59 +
    1.60 +if CONFIG['OS_ARCH'] == 'SunOS':
    1.61 +    if CONFIG['OS_TEST'] == 'x86_64':
    1.62 +        if CONFIG['GNU_CC']:
    1.63 +            SOURCES += [
    1.64 +                'xptcinvoke_x86_64_unix.cpp',
    1.65 +                'xptcstubs_x86_64_linux.cpp'
    1.66 +            ]
    1.67 +        else:
    1.68 +            SOURCES += [
    1.69 +                'xptcinvoke_x86_64_solaris.cpp',
    1.70 +                'xptcstubs_asm_x86_64_solaris_SUNW.s',
    1.71 +                'xptcstubs_x86_64_solaris.cpp',
    1.72 +            ]
    1.73 +    elif CONFIG['OS_TEST'].find('86') != -1:
    1.74 +        if CONFIG['GNU_CC']:
    1.75 +            SOURCES += [
    1.76 +                'xptcinvoke_gcc_x86_unix.cpp',
    1.77 +                'xptcstubs_gcc_x86_unix.cpp'
    1.78 +            ]
    1.79 +        else:
    1.80 +            SOURCES += [
    1.81 +                'xptcinvoke_asm_x86_solaris_SUNW.s',
    1.82 +                'xptcinvoke_x86_solaris.cpp',
    1.83 +                'xptcstubs_asm_x86_solaris_SUNW.s',
    1.84 +                'xptcstubs_x86_solaris.cpp'
    1.85 +            ]
    1.86 +
    1.87 +if CONFIG['OS_TEST'] == 'alpha':
    1.88 +    if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD'):
    1.89 +        SOURCES += [
    1.90 +            'xptcinvoke_linux_alpha.cpp',
    1.91 +            'xptcstubs_linux_alpha.cpp',
    1.92 +        ]
    1.93 +    elif CONFIG['OS_ARCH'] == 'OpenBSD':
    1.94 +        SOURCES += [
    1.95 +            'xptcinvoke_alpha_openbsd.cpp',
    1.96 +            'xptcstubs_alpha_openbsd.cpp',
    1.97 +        ]
    1.98 +
    1.99 +if CONFIG['CPU_ARCH'] == 'arm' or CONFIG['OS_TEST'] == 'sa110':
   1.100 +    if CONFIG['OS_ARCH'] == 'Linux':
   1.101 +        SOURCES += [
   1.102 +            'xptcinvoke_arm.cpp',
   1.103 +            'xptcstubs_arm.cpp'
   1.104 +        ]
   1.105 +        CXXFLAGS += ['-O2']
   1.106 +    elif CONFIG['OS_ARCH'] == 'NetBSD':
   1.107 +        SOURCES += [
   1.108 +            'xptcinvoke_arm_netbsd.cpp',
   1.109 +            'xptcstubs_arm_netbsd.cpp',
   1.110 +        ]
   1.111 +
   1.112 +if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['OS_ARCH'] == 'OpenBSD':
   1.113 +    SOURCES += [
   1.114 +        'xptcinvoke_arm_openbsd.cpp',
   1.115 +        'xptcstubs_arm_openbsd.cpp',
   1.116 +    ]
   1.117 +
   1.118 +if CONFIG['OS_ARCH'] == 'HP-UX':
   1.119 +    if CONFIG['CC'] != 'gcc':
   1.120 +        if CONFIG['OS_TEST'] == 'ia64':
   1.121 +            SOURCES += [
   1.122 +                'xptcinvoke_asm_ipf32.s',
   1.123 +                'xptcinvoke_ipf32.cpp',
   1.124 +                'xptcstubs_asm_ipf32.s',
   1.125 +                'xptcstubs_ipf32.cpp',
   1.126 +            ]
   1.127 +        else:
   1.128 +            SOURCES += [
   1.129 +                'xptcinvoke_asm_pa32.s',
   1.130 +                'xptcinvoke_pa32.cpp',
   1.131 +                'xptcstubs_asm_pa32.s',
   1.132 +                'xptcstubs_pa32.cpp'
   1.133 +            ]
   1.134 +
   1.135 +if CONFIG['OS_ARCH'] == 'Linux':
   1.136 +    if CONFIG['OS_TEST'] in ('hppa', 'hppa2.0', 'hppa1.1'):
   1.137 +        if CONFIG['GNU_CXX']:
   1.138 +            SOURCES += [
   1.139 +                'xptcinvoke_asm_parisc_linux.s',
   1.140 +                'xptcinvoke_pa32.cpp',
   1.141 +                'xptcstubs_asm_parisc_linux.s',
   1.142 +                'xptcstubs_pa32.cpp',
   1.143 +            ]
   1.144 +        elif CONFIG['COMPILE_ENVIRONMENT']:
   1.145 +            error('Unknown C++ compiler, xptcall assembly will probably be incorrect.')
   1.146 +
   1.147 +if CONFIG['OS_ARCH'] == 'NetBSD':
   1.148 +    if CONFIG['OS_TEST'] in ('amiga', 'atari', 'hp300', 'mac68k', 'mvme68k',
   1.149 +                             'next68k', 'sun3', 'sun3x', 'x68k'):
   1.150 +        SOURCES += [
   1.151 +            'xptcinvoke_netbsd_m68k.cpp',
   1.152 +            'xptcstubs_netbsd_m68k.cpp'
   1.153 +        ]
   1.154 +
   1.155 +if CONFIG['OS_ARCH'] == 'Linux':
   1.156 +    if CONFIG['OS_TEST'] == 'aarch64':
   1.157 +        SOURCES += [
   1.158 +            'xptcinvoke_aarch64.cpp',
   1.159 +            'xptcinvoke_asm_aarch64.s',
   1.160 +            'xptcstubs_aarch64.cpp',
   1.161 +            'xptcstubs_asm_aarch64.s',
   1.162 +        ]
   1.163 +    if CONFIG['OS_TEST'] == 'm68k':
   1.164 +        SOURCES += [
   1.165 +            'xptcinvoke_linux_m68k.cpp',
   1.166 +            'xptcstubs_linux_m68k.cpp',
   1.167 +        ]
   1.168 +    if CONFIG['OS_TEST'].find('mips') != -1:
   1.169 +        if CONFIG['OS_TEST'].find('mips64') != -1:
   1.170 +            SOURCES += [
   1.171 +                'xptcinvoke_asm_mips64.S',
   1.172 +                'xptcinvoke_mips64.cpp',
   1.173 +                'xptcstubs_asm_mips64.S',
   1.174 +                'xptcstubs_mips64.cpp',
   1.175 +            ]
   1.176 +        else:
   1.177 +            SOURCES += [
   1.178 +                'xptcinvoke_asm_mips.S',
   1.179 +                'xptcinvoke_mips.cpp',
   1.180 +                'xptcstubs_asm_mips.S',
   1.181 +                'xptcstubs_mips.cpp',
   1.182 +            ]
   1.183 +
   1.184 +if CONFIG['OS_ARCH'] == 'AIX':
   1.185 +    if CONFIG['HAVE_64BIT_OS']:
   1.186 +        SOURCES += [
   1.187 +            'xptcinvoke_asm_ppc_aix64.s',
   1.188 +            'xptcinvoke_ppc_aix64.cpp',
   1.189 +            'xptcstubs_ppc_aix64.cpp',
   1.190 +        ]
   1.191 +        GENERATED_SOURCES += [
   1.192 +            'xptcstubs_asm_ppc_aix64.s',
   1.193 +        ]
   1.194 +    else:
   1.195 +        SOURCES += [
   1.196 +            'xptcinvoke_ppc_aix.cpp',
   1.197 +            'xptcstubs_ppc_aix.cpp',
   1.198 +        ]
   1.199 +        if CONFIG['AIX_OBJMODEL'] == 'ibm':
   1.200 +            SOURCES += [
   1.201 +                'xptcinvoke_asm_ppc_ibmobj_aix.s',
   1.202 +            ]
   1.203 +        else:
   1.204 +            SOURCES += [
   1.205 +                'xptcinvoke_asm_ppc_aix.s',
   1.206 +            ]
   1.207 +        GENERATED_SOURCES += [
   1.208 +            'xptcstubs_asm_ppc_aix.s',
   1.209 +        ]
   1.210 +
   1.211 +if CONFIG['OS_TEST'] == 'powerpc':
   1.212 +    if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'):
   1.213 +        SOURCES += [
   1.214 +            'xptcinvoke_asm_ppc_linux.S',
   1.215 +            'xptcinvoke_ppc_linux.cpp',
   1.216 +            'xptcstubs_asm_ppc_linux.S',
   1.217 +            'xptcstubs_ppc_linux.cpp',
   1.218 +        ]
   1.219 +
   1.220 +if CONFIG['OS_TEST'] in ('powerpc64', 'powerpc64le'):
   1.221 +    if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'):
   1.222 +          SOURCES += [
   1.223 +              'xptcinvoke_asm_ppc64_linux.S',
   1.224 +              'xptcinvoke_ppc64_linux.cpp',
   1.225 +              'xptcstubs_asm_ppc64_linux.S',
   1.226 +              'xptcstubs_ppc64_linux.cpp',
   1.227 +          ]
   1.228 +
   1.229 +if CONFIG['OS_TEST'] in ('macppc', 'bebox', 'ofppc', 'prep', 'amigappc'):
   1.230 +    if CONFIG['OS_ARCH'] == 'NetBSD':
   1.231 +        SOURCES += [
   1.232 +            'xptcinvoke_asm_ppc_netbsd.s',
   1.233 +            'xptcinvoke_ppc_netbsd.cpp',
   1.234 +            'xptcstubs_asm_ppc_netbsd.s',
   1.235 +            'xptcstubs_ppc_netbsd.cpp',
   1.236 +        ]
   1.237 +
   1.238 +if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'powerpc':
   1.239 +    SOURCES += [
   1.240 +        'xptcinvoke_asm_ppc_openbsd.S',
   1.241 +        'xptcinvoke_ppc_openbsd.cpp',
   1.242 +        'xptcstubs_asm_ppc_openbsd.S',
   1.243 +        'xptcstubs_ppc_openbsd.cpp',
   1.244 +    ]
   1.245 +
   1.246 +if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TEST'].find('sparc') != -1:
   1.247 +    SOURCES += [
   1.248 +        'xptcinvoke_asm_sparc_linux_GCC3.s',
   1.249 +        'xptcinvoke_sparc_solaris.cpp',
   1.250 +        'xptcstubs_asm_sparc_solaris.s',
   1.251 +        'xptcstubs_sparc_solaris.cpp',
   1.252 +    ]
   1.253 +
   1.254 +if CONFIG['OS_ARCH'] == 'NetBSD' and CONFIG['OS_TEST'] == 'sparc':
   1.255 +    SOURCES += [
   1.256 +        'xptcinvoke_asm_sparc_netbsd.s',
   1.257 +        'xptcinvoke_sparc_netbsd.cpp',
   1.258 +        'xptcstubs_asm_sparc_netbsd.s',
   1.259 +        'xptcstubs_sparc_netbsd.cpp',
   1.260 +    ]
   1.261 +
   1.262 +if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'sparc':
   1.263 +    SOURCES += [
   1.264 +        'xptcinvoke_asm_sparc_openbsd.s',
   1.265 +        'xptcinvoke_sparc_openbsd.cpp',
   1.266 +        'xptcstubs_asm_sparc_openbsd.s',
   1.267 +        'xptcstubs_sparc_openbsd.cpp',
   1.268 +    ]
   1.269 +
   1.270 +if CONFIG['OS_ARCH'] in ('OpenBSD', 'FreeBSD') and CONFIG['OS_TEST'] == 'sparc64':
   1.271 +    SOURCES += [
   1.272 +        'xptcinvoke_asm_sparc64_openbsd.s',
   1.273 +        'xptcinvoke_sparc64_openbsd.cpp',
   1.274 +        'xptcstubs_asm_sparc64_openbsd.s',
   1.275 +        'xptcstubs_sparc64_openbsd.cpp',
   1.276 +    ]
   1.277 +
   1.278 +if CONFIG['OS_ARCH'] == 'SunOS' and CONFIG['OS_TEST'].find('86') == -1:
   1.279 +    GENERATED_FILES = [
   1.280 +        'xptcstubsdef_asm.solx86',
   1.281 +    ]
   1.282 +    if CONFIG['HAVE_64BIT_OS']:
   1.283 +        SOURCES += [
   1.284 +            'xptcinvoke_sparcv9_solaris.cpp',
   1.285 +            'xptcstubs_sparcv9_solaris.cpp',
   1.286 +        ]
   1.287 +    else:
   1.288 +        SOURCES += [
   1.289 +            'xptcinvoke_sparc_solaris.cpp',
   1.290 +            'xptcstubs_sparc_solaris.cpp',
   1.291 +        ]
   1.292 +    if CONFIG['GNU_CC']:
   1.293 +        SOURCES += [
   1.294 +            'xptcinvoke_asm_sparc_solaris_GCC3.s',
   1.295 +            'xptcstubs_asm_sparc_solaris.s',
   1.296 +        ]
   1.297 +    else:
   1.298 +        if CONFIG['HAVE_64BIT_OS']:
   1.299 +            SOURCES += [
   1.300 +                'xptcinvoke_asm_sparcv9_solaris_SUNW.s',
   1.301 +                'xptcstubs_asm_sparcv9_solaris.s',
   1.302 +            ]
   1.303 +        else:
   1.304 +            SOURCES += [
   1.305 +                'xptcinvoke_asm_sparc_solaris_SUNW.s',
   1.306 +                'xptcstubs_asm_sparc_solaris.s',
   1.307 +            ]
   1.308 +
   1.309 +if CONFIG['OS_ARCH'] == 'Linux':
   1.310 +    if CONFIG['OS_TEST'] == 's390':
   1.311 +        SOURCES += [
   1.312 +            'xptcinvoke_linux_s390.cpp',
   1.313 +            'xptcstubs_linux_s390.cpp',
   1.314 +        ]
   1.315 +        CXXFLAGS += [
   1.316 +            '-fno-strict-aliasing',
   1.317 +            '-fno-inline',
   1.318 +            '-fomit-frame-pointer',
   1.319 +            '-mbackchain',
   1.320 +        ]
   1.321 +    elif CONFIG['OS_TEST'] == 's390x':
   1.322 +        SOURCES += [
   1.323 +            'xptcinvoke_linux_s390x.cpp',
   1.324 +            'xptcstubs_linux_s390x.cpp',
   1.325 +        ]
   1.326 +        CXXFLAGS += [
   1.327 +            '-fno-strict-aliasing',
   1.328 +            '-fno-inline',
   1.329 +            '-fomit-frame-pointer',
   1.330 +            '-mbackchain',
   1.331 +        ]
   1.332 +
   1.333 +FINAL_LIBRARY = 'xpcom_core'
   1.334 +
   1.335 +LOCAL_INCLUDES += [
   1.336 +    '../..',
   1.337 +    '../../../../xptinfo/src',
   1.338 +]
   1.339 +
   1.340 +NO_PGO = True

mercurial