Changeset 3badbb0 in rtems-tools for rtemstoolkit


Ignore:
Timestamp:
Jan 18, 2015, 7:12:18 AM (5 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, master
Children:
f381f26
Parents:
3f47178
Message:

Add support to cross-compile. Use --hosti=.

On FreeBSD use --host=mingw32 for Windows. If you use another
OS you might need to add the specific windows host to the
top level wscript file.

Location:
rtemstoolkit
Files:
1 edited
5 moved

Legend:

Unmodified
Added
Removed
  • rtemstoolkit/wscript

    r3f47178 r3badbb0  
    3939    #
    4040    conf['includes'] = ['elftoolchain/libelf', 'elftoolchain/common', 'libiberty']
    41     if sys.platform == 'win32':
     41    if bld.env.DEST_OS == 'win32':
    4242        conf['includes'] += ['win32']
    4343
     
    123123    if sys.platform == 'win32':
    124124        m4_rule = 'type ${SRC} | m4 -D SRCDIR=../rtemstoolkit/' + libelf[:-1] + '> ${TGT}"'
     125    else:
     126        m4_rule = 'm4 -D SRCDIR=../rtemstoolkit/' + libelf[:-1] + ' ${SRC} > ${TGT}'
     127    if bld.env.DEST_OS == 'win32':
    125128        includes = ['win32']
    126129    else:
    127         m4_rule = 'm4 -D SRCDIR=../rtemstoolkit/' + libelf[:-1] + ' ${SRC} > ${TGT}'
    128130        includes = []
    129131
     
    134136    host_source = []
    135137
    136     if sys.platform == 'linux2':
     138    if bld.env.DEST_OS == 'linux2':
    137139        common = 'elftoolchain/common/'
    138140        bld(target = common + 'native-elf-format.h',
     
    141143            rule   = './${SRC} > ${TGT}')
    142144        bld.add_group ()
    143     elif sys.platform == 'win32':
     145    elif bld.env.DEST_OS == 'win32':
    144146        host_source += [libelf + 'mmap_win32.c']
    145147
     
    148150              install_path = None,
    149151              uses = ['native-elf-format'],
    150               includes = [bld.bldnode.abspath(), 'elftoolchain/libelf', 'elftoolchain/common'] + includes,
     152              includes = [bld.bldnode.abspath(),
     153                          'elftoolchain/libelf', 'elftoolchain/common'] + includes,
    151154              cflags = conf['cflags'],
    152155              source =[libelf + 'elf.c',
     
    231234
    232235def bld_libiberty(bld, conf):
    233     if sys.platform == 'win32':
     236    if bld.env.DEST_OS == 'win32':
    234237        pex_host = 'libiberty/pex-win32.c'
    235238    else:
Note: See TracChangeset for help on using the changeset viewer.