[gnome-continuous] Provide fallback values for CC and CXX



commit 1fe570f36f229485edadd860279688f8d1f20613
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Wed Nov 29 20:31:46 2017 +0000

    Provide fallback values for CC and CXX
    
    If CC and CXX are unset, distutils will fail miserably and use the C
    compiler that was used to build it — which, in the case of Continuous,
    is the C compiler used inside the Yocto base, and which tries to access
    the system includes outside of the sandbox.
    
    Let's fall back to 'gcc' and 'g++' until the glorious day when we can
    take distutils and dump it in a very dark and deep pit.

 src/ostree-build-compile-one |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/ostree-build-compile-one b/src/ostree-build-compile-one
index aa524c2..8aed4fb 100755
--- a/src/ostree-build-compile-one
+++ b/src/ostree-build-compile-one
@@ -245,8 +245,12 @@ def main(args):
         env = os.environ.copy()
         if 'CC' in makeargs:
             env['CC'] = makeargs['CC']
+        else:
+            env['CC'] = os.environ.get('CC', 'gcc')
         if 'CXX' in makeargs:
             env['CXX'] = makeargs['CXX']
+        else:
+            env['CXX'] = os.environ.get('CXX', 'g++')
         log("makeargs = '%s', CC = '%s', CXX = '%s'" % (list(makeargs), env.get('CC', 'unset'), 
env.get('CXX', 'unset'),))
 
     user_specified_jobs = False


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]