[rtems-source-builder commit] Don' t let a GCC port install override base Clang for FreeBSD 10+

Chris Johns chrisj at rtems.org
Fri May 22 02:02:52 UTC 2015


Module:    rtems-source-builder
Branch:    master
Commit:    d15a7f88614bd01ea5c122751b65747e6fbc9c2a
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=d15a7f88614bd01ea5c122751b65747e6fbc9c2a

Author:    Nick Withers <nick.withers at anu.edu.au>
Date:      Fri May 22 07:53:48 2015 +1000

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

---

 source-builder/sb/freebsd.py | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/source-builder/sb/freebsd.py b/source-builder/sb/freebsd.py
index 714798f..0c00edd 100644
--- a/source-builder/sb/freebsd.py
+++ b/source-builder/sb/freebsd.py
@@ -88,14 +88,14 @@ def load():
         else:
             cc = '/usr/bin/clang'
             if not check.check_exe(cc, cc):
-                raise error.general('no valid cc not found')
+                raise error.general('no valid cc found')
         cxx = '/usr/bin/c++'
         if check.check_exe(cxx, cxx):
             defines['__cxx'] = cxx
         else:
             cxx = '/usr/bin/clang++'
             if check.check_exe(cxx, cxx):
-                raise error.general('no valid c++ not found')
+                raise error.general('no valid c++ found')
         #
         # Assume the compiler is clang and so we need to increase
         # bracket depth build build the gcc ARM compiler.
@@ -109,17 +109,17 @@ def load():
         # Fix the mess iconv is on FreeBSD 10.0.
         #
         defines['iconv_includes'] = ('none', 'none', '-I/usr/local/include -L/usr/local/lib')
-
-    for gv in ['47', '48', '49']:
-        gcc = '%s-portbld-freebsd%s-gcc%s' % (cpu, version, gv)
-        if check.check_exe(gcc, gcc):
-            defines['__cc'] = gcc
-            break
-    for gv in ['47', '48', '49']:
-        gxx = '%s-portbld-freebsd%s-g++%s' % (cpu, version, gv)
-        if check.check_exe(gxx, gxx):
-            defines['__cxx'] = gxx
-            break
+    else:
+        for gv in ['49', '48', '47']:
+            gcc = '%s-portbld-freebsd%s-gcc%s' % (cpu, version, gv)
+            if check.check_exe(gcc, gcc):
+                defines['__cc'] = gcc
+                break
+        for gv in ['49', '48', '47']:
+            gxx = '%s-portbld-freebsd%s-g++%s' % (cpu, version, gv)
+            if check.check_exe(gxx, gxx):
+                defines['__cxx'] = gxx
+                break
 
     return defines
 




More information about the vc mailing list