本文整理汇总了Python中waflib.Configure.conf.mkspec_gxx_configure函数的典型用法代码示例。如果您正苦于以下问题:Python mkspec_gxx_configure函数的具体用法?Python mkspec_gxx_configure怎么用?Python mkspec_gxx_configure使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mkspec_gxx_configure函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: cxx_poky_gxx63_armv7
def cxx_poky_gxx63_armv7(conf):
"""
Detect and setup the g++ 6.3 cross compiler for the
Yocto based Poky distribution.
"""
conf.mkspec_gxx_configure(
major=6, minor=3, prefix='arm-poky-linux-gnueabi')
# Note: A static version of libstdc++ is not available in the
# poky SDK so we cannot use -static-libstdc++ for statically
# linking.
flags = ['-march=armv7-a', '-marm', '-mfpu=neon',
'-mfloat-abi=hard', '-mcpu=cortex-a9']
if conf.has_tool_option('poky_sdk_path'):
sdk_path = conf.get_tool_option('poky_sdk_path')
sysroot = os.path.join(
sdk_path, 'sysroots', 'cortexa9hf-neon-poky-linux-gnueabi')
flags.append('--sysroot=%s' % sysroot)
conf.env['LINKFLAGS'] += flags
conf.env['CXXFLAGS'] += flags
# Set the target CPU
conf.env['DEST_CPU'] = 'arm'
示例2: cxx_gxx63_armv7_softfp
def cxx_gxx63_armv7_softfp(conf):
"""
Detect and setup the g++ 6.3 cross-compiler for ARM Linux running on ARMv7
CPU with a hardware FPU, but on a system where a soft-float ABI is required.
The 'g++-arm-linux-gnueabi' Debian package should provide a compatible
toolchain, or the standalone version can be downloaded from the Linaro
releases:
https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabi/
"""
conf.mkspec_gxx_configure(6, 3, 'arm-linux-gnueabi')
# Specify the ARMv7 architecture and the 'softfp' float ABI to compile for
# hardware FPU, but with software linkage (required for -mfpu=neon flag).
# The __ARM_NEON__ macro will be defined only if the -mfloat-abi=softfp and
# -mfpu=neon flags are used together.
flags = ['-march=armv7-a', '-mfloat-abi=softfp']
conf.env['CFLAGS'] += flags
conf.env['CXXFLAGS'] += flags
# Specify the ARMv7 architecture in the LINKFLAGS to link with the
# atomic support that is required for std::threads (without this flag,
# the threading code might call pure virtual methods)
conf.env['LINKFLAGS'] += ['-march=armv7-a']
# Note: libstdc++ might not be available on the target platform
# Statically link with the C++ standard library
conf.env['LINKFLAGS'] += ['-static-libstdc++']
# Set the target CPU
conf.env['DEST_CPU'] = 'arm'
示例3: cxx_crosslinux_gxx47_mips
def cxx_crosslinux_gxx47_mips(conf):
"""
Detect and setup the g++ 4.7 cross-compiler for MIPS 32-bit Linux
"""
conf.mkspec_gxx_configure(4, 7, 'crosslinux-gxx47-mips')
# Statically link in the C++ standard library
conf.env['LINKFLAGS'] += ['-static-libstdc++']
示例4: cxx_openwrt_gxx53_mips
def cxx_openwrt_gxx53_mips(conf):
"""
Detect and setup the g++ 5.3 cross-compiler for OpenWRT MIPS
"""
conf.mkspec_gxx_configure(5, 3, 'mips-openwrt-linux')
# Note: libstdc++ might not be available on the target platform
# Statically link with the C++ standard library
conf.env['LINKFLAGS'] += ['-static-libstdc++']
示例5: cxx_crosslinux_gxx46_x86
def cxx_crosslinux_gxx46_x86(conf):
"""
Detect and setup the g++ 4.6 cross-compiler for 32-bit Linux
"""
conf.mkspec_gxx_configure(4, 6, 'crosslinux-gxx46-x86')
conf.mkspec_add_common_flag('-m32')
# Note: libstdc++ might not be available on the target platform
# Statically link the GCC runtime and the C++ standard library
conf.env['LINKFLAGS'] += ['-static-libgcc', '-static-libstdc++']
示例6: cxx_raspberry_gxx49_arm
def cxx_raspberry_gxx49_arm(conf):
"""
Detect and setup the g++ 4.9 cross-compiler for Raspberry Pi (Linux)
"""
conf.mkspec_gxx_configure(4, 9, 'raspberry-gxx49-arm')
# Note: libstdc++ might not be available on the target platform
# Statically link with the C++ standard library
conf.env['LINKFLAGS'] += ['-static-libstdc++']
# Set the target CPU
conf.env['DEST_CPU'] = 'arm'
示例7: cxx_crosslinux_gxx47_arm
def cxx_crosslinux_gxx47_arm(conf):
"""
Detect and setup the g++ 4.7 cross-compiler for ARM 32-bit Linux
"""
conf.mkspec_gxx_configure(4, 7, 'arm-openwrt-linux')
# Note: libstdc++ might not be available on the target platform
# Statically link the GCC runtime and the C++ standard library
conf.env['LINKFLAGS'] += ['-static-libgcc', '-static-libstdc++']
# The GCC runtime does not contain the C++ exception handling functions,
# so libgcc_eh.a should also be statically linked
conf.env['STLIB'] += ['gcc_eh']
示例8: cxx_openwrt_gxx73_mips
def cxx_openwrt_gxx73_mips(conf):
"""
Detect and setup the g++ 7.3 cross-compiler for OpenWRT MIPS
"""
conf.mkspec_gxx_configure(7, 3, 'mips-openwrt-linux')
# Enable atomic support (without these flags, the linker might have
# undefined references to atomic functions)
conf.env['LINKFLAGS'] += ['-latomic']
# Note: libstdc++ might not be available on the target platform
# Statically link with the C++ standard library
conf.env['LINKFLAGS'] += ['-static-libstdc++']
示例9: cxx_raspberry_gxx49_armv7
def cxx_raspberry_gxx49_armv7(conf):
"""
Detect and setup the g++ 4.9 cross-compiler for Raspberry Pi (Linux)
running on ARMv7 compatible hardware (Raspberry Pi 2)
"""
conf.mkspec_gxx_configure(4, 9, 'raspberry-gxx49-arm')
# atomic support that is required for std::threads (without this flag,
# the threading code might call pure virtual methods)
conf.env['LINKFLAGS'] += ['-march=armv7-a']
# Note: libstdc++ might not be available on the target platform
# Statically link with the C++ standard library
conf.env['LINKFLAGS'] += ['-static-libstdc++']
# Set the target CPU
conf.env['DEST_CPU'] = 'arm'
示例10: mkspec_setup_gcov
def mkspec_setup_gcov(conf, major, minor, minimum=False):
"""
Setup g++ for coverage analysis with gcov
"""
# Don't add any optimization flags (these might lead to incorrect results)
conf.env['MKSPEC_DISABLE_OPTIMIZATION'] = True
conf.mkspec_gxx_configure(major, minor, minimum=minimum)
# Set flag to compile and link code instrumented for coverage analysis
conf.mkspec_add_common_flag('--coverage')
# Add flags to disable optimization and all function inlining
flags = ['-O0', '-fPIC', '-fno-inline', '-fno-inline-small-functions',
'-fno-default-inline']
conf.env['CFLAGS'] += flags
conf.env['CXXFLAGS'] += flags
示例11: cxx_gxx63_armv7
def cxx_gxx63_armv7(conf):
"""
Detect and setup the g++ 6.3 cross-compiler for ARM Linux running on ARMv7
CPU with a hardware FPU. The 'g++-arm-linux-gnueabihf' Debian package
should provide a compatible toolchain, or the standalone version can be
downloaded from the Linaro releases:
https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabihf/
"""
conf.mkspec_gxx_configure(6, 3, 'arm-linux-gnueabihf')
# Specify the ARMv7 architecture in the LINKFLAGS to link with the
# atomic support that is required for std::threads (without this flag,
# the threading code might call pure virtual methods)
conf.env['LINKFLAGS'] += ['-march=armv7-a']
# Note: libstdc++ might not be available on the target platform
# Statically link with the C++ standard library
conf.env['LINKFLAGS'] += ['-static-libstdc++']
# Set the target CPU
conf.env['DEST_CPU'] = 'arm'
示例12: cxx_gxx54_x86
def cxx_gxx54_x86(conf):
"""
Detect and setup the g++ 5.4 compiler for 32 bit
"""
conf.mkspec_gxx_configure(5, 4)
conf.mkspec_add_common_flag('-m32')
示例13: cxx_gxx83_x86
def cxx_gxx83_x86(conf):
"""
Detect and setup the g++ 8.3 compiler for 32 bit
"""
conf.mkspec_gxx_configure(8, 3)
conf.mkspec_add_common_flag('-m32')
示例14: cxx_gxx82_x64
def cxx_gxx82_x64(conf):
"""
Detect and setup the g++ 8.2 compiler for 64 bit
"""
conf.mkspec_gxx_configure(8, 2)
conf.mkspec_add_common_flag('-m64')
示例15: cxx_gxx73_x64
def cxx_gxx73_x64(conf):
"""
Detect and setup the g++ 7.3 compiler for 64 bit
"""
conf.mkspec_gxx_configure(7, 3)
conf.mkspec_add_common_flag('-m64')