1From 8295bb6a60896fed54d6450bca091aea4eea4fb2 Mon Sep 17 00:00:00 2001
2From: Vincent Prince <vincent.prince.fr@gmail.com>
3Date: Mon, 16 Sep 2019 13:21:44 +0200
4Subject: [PATCH 01/10] Tell scons to use build settings from environment
5 variables
6
7Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
8Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
9
10Upstream-Status: Pending
11---
12 SConstruct | 8 ++++++--
13 1 file changed, 6 insertions(+), 2 deletions(-)
14
15diff --git a/SConstruct b/SConstruct
16index 89c044ab78..2044c0ddb8 100644
17--- a/SConstruct
18+++ b/SConstruct
19@@ -593,6 +593,7 @@ def variable_arch_converter(val):
20         'amd64':  'x86_64',
21         'emt64':   'x86_64',
22         'x86':    'i386',
23+        'aarch64': 'arm64',
24     }
25     val = val.lower()
26
27@@ -723,7 +724,8 @@ env_vars.Add(
28 )
29
30 env_vars.Add('CC',
31-    help='Select the C compiler to use')
32+    help='Select the C compiler to use',
33+    default=os.getenv('CC'))
34
35 env_vars.Add('CCFLAGS',
36     help='Sets flags for the C and C++ compiler',
37@@ -743,7 +745,8 @@ env_vars.Add('CPPPATH',
38     converter=variable_shlex_converter)
39
40 env_vars.Add('CXX',
41-    help='Select the C++ compiler to use')
42+    help='Select the C++ compiler to use',
43+    default=os.getenv('CXX'))
44
45 env_vars.Add('CXXFLAGS',
46     help='Sets flags for the C++ compiler',
47@@ -1127,6 +1130,7 @@ if get_option('build-tools') == 'next' or get_option('ninja') == 'next':
48     SCons.Tool.DefaultToolpath.insert(0, os.path.abspath('site_scons/site_tools/next'))
49
50 env = Environment(variables=env_vars, **envDict)
51+env.PrependENVPath('PATH', os.getenv('PATH'))
52
53 # Only print the spinner if stdout is a tty
54 if sys.stdout.isatty():
55--
562.24.0
57
58