Example #1
0
 append=ConfigValues(
     CCFLAGS=[
         '',
         # second level optimization
         '-O2',
         # treat warnings as errors
         '-Werror',
         # enable all warnings
         '-Wall',
         # extra warnings
         '-Wextra',
         # pedantic warnings
         # '-Wpedantic',
         # disable warnings due to gcc 4.8.5 issues
         '-Wno-missing-braces',
         '-Wno-missing-field-initializers',
         '-Wno-unknown-pragmas',
         '-Wno-unused-function',
         # do not assume strict aliasing
         '-fno-strict-aliasing',
         # do not warn about unused but set variables
         '-Wno-unused-but-set-variable',
         # do not warn about multiline comments
         '-Wno-comment',
         '-Wformat',
         '-Wformat-security',
         '-fstack-protector',
         '-fPIC'
     ],
     CPPDEFINES=['NDEBUG', '_FORTIFY_SOURCE=2'],
     LINKFLAGS=[
         '-fstack-protector', '-znoexecstack', '-zrelro', '-znow', '-pie'
     ],
 ))
Example #2
0
config.VersionRange(
    "3-*",
    append=ConfigValues(
        CCFLAGS=[
            '',
            # second level optimization
            '-O2',
            # treat warnings as errors
            '-Werror',
            # enable all warnings
            '-Wall',
            # extra warnings
            '-Wextra',
            # pedantic warnings
            # '-Wpedantic',
            # disable warnings due to gcc 4.8.5 issues
            '-Wno-missing-braces',
            '-Wno-missing-field-initializers',
            '-Wno-unknown-pragmas',
            '-Wno-unused-function',
            # do not assume strict aliasing
            '-fno-strict-aliasing',
            # do not warn about unused but set variables
            '-Wno-unused-but-set-variable',
            # do not warn about multiline comments
            '-Wno-comment',
        ],
        CPPDEFINES=['NDEBUG'],
    ))
Example #3
0
def map_default_version(env):
    return env['GCC_VERSION']


config = configuration(map_default_version)

config.VersionRange(
    "3-*",
    append=ConfigValues(
        CCFLAGS=[
            '',
            # produce debugging information
            '-g',
            # disable optimization
            '-O0',
            # treat warnings as errors
            '-Wno-error',
            # enable all warnings
            '-Wall',
            # extra warnings
            '-Wextra',
            # pedantic warnings
            # '-Wpedantic',
        ],
        CXXFLAGS=[
            # modern C++ features support
            '-std=c++0x',
        ],
    ))
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
############################################################################
"""Intel win32 compiler configuration for release
"""
from parts.config import ConfigValues, configuration


def map_default_version(env):
    return env['INTELC_VERSION']


config = configuration(map_default_version)

config.VersionRange("7-*",
                    append=ConfigValues(CCFLAGS=[
                        '/MP', '/GS', '/W4', '/Gy', '/Zc:wchar_t', '/Z7',
                        '/O2', '/fp:precise', '/WX', '/Zc:forScope', '/Gd',
                        '/Oi', '/MT', '/nologo'
                    ],
                                        CXXFLAGS=['/EHsc', '/GR'],
                                        LINKFLAGS=[
                                            '/LTCG', '/WX', '/SAFESEH',
                                            '/NXCOMPAT', '/DYNAMICBASE',
                                            '/nologo'
                                        ],
                                        CPPDEFINES=['NDEBUG']))
Example #5
0
"""g++ compiler configuration for release
"""
from parts.config import ConfigValues, configuration

def map_default_version(env):
    return env['GCC_VERSION']

config = configuration(map_default_version)

config.VersionRange("3-*",
                    append=ConfigValues(
                        CCFLAGS=['',
                                 # second level optimization
                                 '-O2',
                                 # treat warnings as errors
                                 '-Wno-error',
                                 # enable all warnings
                                 '-Wall',
                                 # extra warnings
                                 '-Wextra',
                                 # pedantic warnings
                                 # '-Wpedantic',
                                ],
                        CXXFLAGS=['',
                                  # modern C++ features support
                                  '-std=c++0x',
                                 ],
                        CPPDEFINES=['NDEBUG']
                    )
                   )
Example #6
0
config.VersionRange("3-*",
                    append=ConfigValues(
                        CCFLAGS=['',
                                 # produce debugging information
                                 '-g',
                                 # disable optimization
                                 '-O0',
                                 # treat warnings as errors
                                 '-Werror',
                                 # enable all warnings
                                 '-Wall',
                                 # extra warnings
                                 '-Wextra',
                                 '-Wno-empty-body',
                                 '-Wno-missing-braces',
                                 '-Wno-missing-field-initializers',
                                 '-Wno-unknown-pragmas',
                                 # do not assume strict aliasing
                                 '-fno-strict-aliasing',
                                 '-Wformat',
                                 '-Wformat-security',
                                 '-fstack-protector',
                                 '-fPIC'],
                        CXXFLAGS=['',
                                  # modern C++ features support
                                  '-std=c++0x'],
                        CPPDEFINES=['NDEBUG',
                                    '_FORTIFY_SOURCE=2'],
                        LINKFLAGS=['-Wl,-znoexecstack',
                                   '-Wl,-zrelro',
                                   '-Wl,-znow'], ))
Example #7
0
config.VersionRange(
    "7-*",
    append=ConfigValues(
        CCFLAGS=[
            '/MP',
            '/GS',
            '/W4',
            '/wd4127',  # allow while (0)
            '/wd4592',  # VS2015U1 limitation
            #'/wd4366',  # ok unaligned &
            #'/wd4204',  # allow x= {a,b}
            #'/wd4221',  # allow x = {&y}
            '/Gy',
            '/Zc:wchar_t',
            '/Z7',
            '/O2',
            '/fp:precise',
            '/WX',
            '/Zc:forScope',
            '/Oi',
            '/MT',
            '/nologo'
        ],
        CXXFLAGS=['/EHsc', '/GR'],
        LINKFLAGS=[
            '/LTCG', '/WX', '/NXCOMPAT', '/DYNAMICBASE', '/MACHINE:X64',
            '/nologo'
        ],
        CPPDEFINES=['NDEBUG']))

config = configuration(map_default_version)

config.VersionRange(
    "7-*",
    append=ConfigValues(
        CCFLAGS=[
            '/MP',
            '/GS',
            '/W4',
            '/wd4127',  # allow while (0)
            '/wd4592',  # VS2015U1 limitation
            '/wd4068',  # ignore unknown pragmas
            #'/wd4366',  # ok unaligned &
            #'/wd4204',  # allow x= {a,b}
            #'/wd4221',  # allow x = {&y}
            '/Zc:wchar_t',
            '/Z7',
            '/Od',
            '/fp:precise',
            '/WX',
            '/Zc:forScope',
            '/Gd',
            '/MTd',
            '/nologo'
        ],
        CXXFLAGS=['/EHsc'],
        LINKFLAGS=['/WX', '/SAFESEH', '/NXCOMPAT', '/DYNAMICBASE', '/nologo'],
        CPPDEFINES=['DEBUG']))
Example #9
0
config.VersionRange("3-*",
                    append=ConfigValues(
                        CCFLAGS=['',
                                 # second level optimization
                                 '-O2',
                                 # treat warnings as errors
                                 '-Werror',
                                 # enable all warnings
                                 '-Wall',
                                 # extra warnings
                                 '-Wextra',
                                 # pedantic warnings
                                 # '-Wpedantic',
                                 '-Wformat',
                                 '-Wformat-security',
                                 '-fstack-protector',
                                 '-fPIC'],
                        CXXFLAGS=['',
                                  # modern C++ features support
                                  '-std=c++0x'],
                        CPPDEFINES=['NDEBUG',
                                    '_FORTIFY_SOURCE=2'],
                        LINKFLAGS=['-fstack-protector',
                                   '-znoexecstack',
                                   '-zrelro',
                                   '-znow',
                                   '-pie'],
                    )
                   )
Example #10
0
 append=ConfigValues(
     CCFLAGS=[
         # optimize for size
         '-Os',
         # prevent using built in stdlib replacement functions
         '-fno-builtin',
         '-fno-stack-protector',
         '-fomit-frame-pointer',
         '-fno-asynchronous-unwind-tables',
         # allow linker to optimize out not used stuff
         '-fdata-sections',
         '-ffunction-sections',
         # only export specified functions
         '-fvisibility=hidden',
         # shared object friendly
         '-fPIC',
         # treat warnings as errors
         '-Werror',
         # enable all warnings
         '-Wall',
         # extra warnings
         '-Wextra',
         # Allow struct initilization with {0}
         '-Wno-missing-braces',
     ],
     CPPDEFINES=[
         'NDEBUG',
     ],
     LINKFLAGS=[
         # do not link standard system libraries
         '-nodefaultlibs',
         '-nostdlib',
         # do not use stadard system startup
         '-nostartfiles',
         # remove all symbol table and relocation information
         '-s',
         # link only what is used
         '-Xlinker',
         '--gc-sections',
         # Deny undefined symbols
         '-Wl,--no-undefined',
     ], ))
Example #11
0
    "3-*",
    append=ConfigValues(
        CCFLAGS=[
            '',
            # produce debugging information
            '-g',
            # disable optimization
            '-O0',
            # treat warnings as errors
            '-Werror',
            # enable all warnings
            '-Wall',
            # extra warnings
            '-Wextra',
            # pedantic warnings
            # '-Wpedantic',
        ],
        CXXFLAGS=[
            # modern C++ features support
            #'-std=c++0x',
            # modern C++ features with gcc extensions
            '-std=gnu++11'
        ],
        CPPDEFINES=[
            '_FORTIFY_SOURCE=2',
            '__int64=long long',
        ],
        LINKFLAGS=[
            '-fstack-protector',
        ],
    ))
Example #12
0
config = configuration(map_default_version)

config.VersionRange(
    "3-*",
    append=ConfigValues(
        CCFLAGS=[
            '',
            # produce debugging information
            '-g',
            # disable optimization
            '-O0',
            # treat warnings as errors
            '-Werror',
            # enable all warnings
            '-Wall',
            # extra warnings
            '-Wextra',
            # pedantic warnings
            # '-Wpedantic',
            # disable warnings due to gcc 4.8.5 issues
            '-Wno-missing-braces',
            '-Wno-missing-field-initializers',
            '-Wno-unknown-pragmas',
            '-Wno-unused-function',
            # do not warn about unused but set variables
            '-Wno-unused-but-set-variable',
            # do not warn about multiline comments
            '-Wno-comment',
        ], ))
Example #13
0
 append=ConfigValues(
     CCFLAGS=[
         '',
         # second level optimization
         '-O2',
         # treat warnings as errors
         '-Werror',
         # enable all warnings
         '-Wall',
         # extra warnings
         '-Wextra',
         # pedantic warnings
         # '-Wpedantic',
         '-Wformat',
         '-Wformat-security',
         '-fstack-protector',
     ],
     CXXFLAGS=[
         '',
         # modern C++ features support
         #'-std=c++0x',
         # modern C++ features with gcc extensions
         '-std=gnu++11'
     ],
     CPPDEFINES=[
         'NDEBUG',
         '_FORTIFY_SOURCE=2',
         '__int64=long long',
     ],
     LINKFLAGS=[
         '-fstack-protector',
     ],
 ))
Example #14
0
 append=ConfigValues(
     CCFLAGS=[
         # optimize for size
         '-Os',
         # prevent using built in stdlib replacement functions
         '-fno-builtin',
         '-fno-stack-protector',
         '-fomit-frame-pointer',
         '-fno-asynchronous-unwind-tables',
         # allow linker to optimize out not used stuff
         '-fdata-sections',
         '-ffunction-sections',
         # treat warnings as errors
         '-Werror',
         # enable all warnings
         '-Wall',
         # extra warnings
         '-Wextra',
         # Allow struct initialization with {0}
         '-Wno-missing-braces',
         # dump stack usage to file
         '-fstack-usage',
         # dump control flow graph
         '-fdump-tree-cfg-raw',
     ],
     CPPDEFINES=[
         'NDEBUG',
     ],
     SHLINKFLAGS=[
         # do not use standard system entry-point
         '-e 0',
     ],
     LINKFLAGS=[
         # do not link standard system libraries
         '-nodefaultlibs',
         '-nostdlib',
         # do not use standard system startup
         '-nostartfiles',
         # remove all symbol table and relocation information
         '-s',
         # link only what is used
         '-Xlinker',
         '--gc-sections',
         # Deny undefined symbols
         '-Wl,--no-undefined',
     ],))
"""
from parts.config import ConfigValues, configuration

def map_default_version(env):
    return env['INTELC_VERSION']

config = configuration(map_default_version)

config.VersionRange("7-*",
                    append=ConfigValues(
                        CCFLAGS=['/MP',
                                 '/GS',
                                 '/W4',
                                 '/Zc:wchar_t',
                                 '/Z7',
                                 '/Od',
                                 '/fp:precise',
                                 '/WX',
                                 '/Zc:forScope',
                                 '/MTd',
                                 '/nologo'],
                        CXXFLAGS=['/EHsc'],
                        LINKFLAGS=['/WX',
                                   '/NXCOMPAT',
                                   '/DYNAMICBASE',
                                   '/MACHINE:X64',
                                   '/nologo'],
                        CPPDEFINES=['DEBUG']
                    )
                   )