Changeset d4eb08f in rtems-source-builder


Ignore:
Timestamp:
Feb 7, 2015, 6:58:17 AM (5 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, master
Children:
d4c2210
Parents:
81ccf41
Message:

Windows native build fixes.

The testing of building on Windows is done using MSYS2.

Location:
source-builder
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • source-builder/config/gcc-common-1.cfg

    r81ccf41 rd4eb08f  
    191191
    192192  # Clean the symlinks away incase the source is a repo
    193   %{__rmfile} ${source_dir_gcc}/newlib
    194   %{__rmfile} ${source_dir_gcc}/mpfr
    195   %{__rmfile} ${source_dir_gcc}/mpc
    196   %{__rmfile} ${source_dir_gcc}/gmp
     193  # Note, delete as a directory because of MSYS2 support on Windows.
     194  %{__rmdir} ${source_dir_gcc}/newlib
     195  %{__rmdir} ${source_dir_gcc}/mpfr
     196  %{__rmdir} ${source_dir_gcc}/mpc
     197  %{__rmdir} ${source_dir_gcc}/gmp
    197198
    198199%testing
  • source-builder/sb/build.py

    r81ccf41 rd4eb08f  
    228228                else:
    229229                    name = opt_name
    230                 name = self._name_(name)
    231230            self.script.append(self.config.expand('cd %{_builddir}'))
    232231            if not deleted_dir and  delete_before_unpack:
  • source-builder/sb/check.py

    r81ccf41 rd4eb08f  
    105105                    log.notice('error: environment PATH contains an empty path')
    106106                return False
    107             elif p.strip() == '.' or p.strip() == '..':
     107            elif not options.host_windows and (p.strip() == '.' or p.strip() == '..'):
    108108                if not silent:
    109109                    log.notice('error: environment PATH invalid path: %s' % (p))
  • source-builder/sb/download.py

    r81ccf41 rd4eb08f  
    7070        try:
    7171            hasher = hashlib.new(hash[0])
    72             _in = open(absfile, 'rb')
     72            _in = open(path.host(absfile), 'rb')
    7373            hasher.update(_in.read())
    7474        except IOError, err:
     
    9191            log.warning('removing: %s' % (file_))
    9292            if path.exists(absfile):
    93                 os.remove(path.host(absfile))
     93                try:
     94                    os.remove(path.host(absfile))
     95                except IOError, err:
     96                    raise error.general('hash: %s: remove: %s' % (absfile, str(err)))
     97                except:
     98                    raise error.general('hash: %s: remove error' % (file_))
    9499        if hasher is not None:
    95100            del hasher
  • source-builder/sb/ereport.py

    r81ccf41 rd4eb08f  
    3737    else:
    3838        r += [' RSB: not a valid repo']
    39     r += [' %s' % (' '.join(os.uname()))]
     39    if os.name == 'nt':
     40        r += [' Windows']
     41    else:
     42        r += [' %s' % (' '.join(os.uname()))]
    4043    r += []
    4144    r += ['Tail of the build log:']
  • source-builder/sb/log.py

    r81ccf41 rd4eb08f  
    7575        for l in text.replace(chr(13), '').splitlines():
    7676            print l
     77        sys.stdout.flush()
    7778    _output(text, log)
    7879
  • source-builder/sb/path.py

    r81ccf41 rd4eb08f  
    128128
    129129    def _onerror(function, path, excinfo):
    130         print 'removeall error: (%s) %s' % (excinfo, path)
     130        import stat
     131        if not os.access(path, os.W_OK):
     132            # Is the error an access error ?
     133            os.chmod(path, stat.S_IWUSR)
     134            function(path)
     135        else:
     136            print 'removeall error: %s' % (path)
     137            raise
    131138
    132139    path = host(path)
  • source-builder/sb/windows.py

    r81ccf41 rd4eb08f  
    3131    # Default to the native Windows Python.
    3232    uname = 'win32'
    33     system = 'mingw32'
    34     if os.environ.has_key('HOSTTYPE'):
    35         hosttype = os.environ['HOSTTYPE']
     33    if os.environ.has_key('PROCESSOR_ARCHITECTURE'):
     34        if os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64':
     35            hosttype = 'x86_64'
     36            machsize = '64'
     37        else:
     38            hosttype = 'i686'
     39            machsize = '32'
    3640    else:
    37         hosttype = 'i686'
    38     host_triple = hosttype + '-pc-' + system
    39     build_triple = hosttype + '-pc-' + system
     41        hosttype = 'x86_64'
     42        machsize = '32'
     43    host_triple = '%s-w%s-mingw32' % (hosttype, machsize)
     44    build_triple = '%s-w%s-mingw32' % (hosttype, machsize)
    4045
    4146    # See if this is actually Cygwin Python
Note: See TracChangeset for help on using the changeset viewer.