Changeset d15a7f8 in rtems-source-builder for source-builder/sb/freebsd.py


Ignore:
Timestamp:
May 21, 2015, 9:53:48 PM (6 years ago)
Author:
Nick Withers <nick.withers@…>
Branches:
4.10, 4.11, 4.9, 5, master
Children:
4bd058e
Parents:
be7ffbf
git-author:
Nick Withers <nick.withers@…> (05/21/15 21:53:48)
git-committer:
Chris Johns <chrisj@…> (05/22/15 02:02:38)
Message:

Don't let a GCC port install override base Clang for FreeBSD 10+

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/freebsd.py

    rbe7ffbf rd15a7f8  
    8989            cc = '/usr/bin/clang'
    9090            if not check.check_exe(cc, cc):
    91                 raise error.general('no valid cc not found')
     91                raise error.general('no valid cc found')
    9292        cxx = '/usr/bin/c++'
    9393        if check.check_exe(cxx, cxx):
     
    9696            cxx = '/usr/bin/clang++'
    9797            if check.check_exe(cxx, cxx):
    98                 raise error.general('no valid c++ not found')
     98                raise error.general('no valid c++ found')
    9999        #
    100100        # Assume the compiler is clang and so we need to increase
     
    110110        #
    111111        defines['iconv_includes'] = ('none', 'none', '-I/usr/local/include -L/usr/local/lib')
    112 
    113     for gv in ['47', '48', '49']:
    114         gcc = '%s-portbld-freebsd%s-gcc%s' % (cpu, version, gv)
    115         if check.check_exe(gcc, gcc):
    116             defines['__cc'] = gcc
    117             break
    118     for gv in ['47', '48', '49']:
    119         gxx = '%s-portbld-freebsd%s-g++%s' % (cpu, version, gv)
    120         if check.check_exe(gxx, gxx):
    121             defines['__cxx'] = gxx
    122             break
     112    else:
     113        for gv in ['49', '48', '47']:
     114            gcc = '%s-portbld-freebsd%s-gcc%s' % (cpu, version, gv)
     115            if check.check_exe(gcc, gcc):
     116                defines['__cc'] = gcc
     117                break
     118        for gv in ['49', '48', '47']:
     119            gxx = '%s-portbld-freebsd%s-g++%s' % (cpu, version, gv)
     120            if check.check_exe(gxx, gxx):
     121                defines['__cxx'] = gxx
     122                break
    123123
    124124    return defines
Note: See TracChangeset for help on using the changeset viewer.