blob: 4076d9b917c3c2d8734e2411065e3520ded46a08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
From 884e831ed07607097614276f6bbf192993228100 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Date: Tue, 2 Jun 2015 11:08:17 +0200
Subject: [PATCH 3/4] 004-use-env.patch
---
build_common/SConscript | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
--- a/build_common/SConscript
+++ b/build_common/SConscript
@@ -137,6 +137,26 @@ tc_set_msg = '''
* cause inexplicable errors. *
*******************************************************************************
'''
+env['ENV'] = os.environ
+if 'CC' in os.environ:
+ env['CC'] = Split(os.environ['CC'])
+ print "using CC from enviroment: %s" % env['CC']
+if 'CXX' in os.environ:
+ env['CXX'] = Split(os.environ['CXX'])
+ print "using CXX from enviroment: %s" % env['CXX']
+if 'CFLAGS' in os.environ:
+ env['CFLAGS'] = Split(os.environ['CFLAGS'])
+ print "using CFLAGS from enviroment: %s" % env['CFLAGS']
+if 'CXXFLAGS' in os.environ:
+ env['CXXFLAGS'] = Split(os.environ['CXXFLAGS'])
+ print "using CXXFLAGS from enviroment: %s" % env['CXXFLAGS']
+if 'CPPFLAGS' in os.environ:
+ env['CPPFLAGS'] = Split(os.environ['CPPFLAGS'])
+ print "using CPPFLAGS from enviroment: %s" % env['CPPFLAGS']
+if 'LDFLAGS' in os.environ:
+ env['LINKFLAGS'] = Split(os.environ['LDFLAGS'])
+ print "using LDFLAGS/LINKFLAGS from enviroment: %s" % env['LINKFLAGS']
+
if env.get('VERBOSE') == False:
env['CCCOMSTR'] = "Compiling $TARGET"
env['SHCCCOMSTR'] = "Compiling $TARGET"
|