aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/mongodb/mongodb/0004-replace-os.uname-with-os.getenv-OE_TARGET_ARCH.patch
blob: ade7ec02ab8afb53fcffbafd67b25cc1d8590da1 (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
39
40
41
42
43
44
45
46
47
48
49
50
From d02f33d860f2d11f71e9056782a2e75603d6ec25 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen.kooi@linaro.org>
Date: Tue, 4 Feb 2014 10:56:35 +0100
Subject: [PATCH 4/5] replace os.uname with os.getenv(OE_TARGET_ARCH)

This fixes crosscompilation

Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Upstream-Status: Inappropiate [OE specific]
---
 SConstruct | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/SConstruct b/SConstruct
index c84a669..05e2ea0 100644
--- a/SConstruct
+++ b/SConstruct
@@ -257,9 +257,9 @@ add_option( "pch" , "use precompiled headers to speed up the build (experimental
 add_option( "distcc" , "use distcc for distributing builds" , 0 , False )
 
 # debugging/profiling help
-if os.sys.platform.startswith("linux") and (os.uname()[-1] == 'x86_64'):
+if os.sys.platform.startswith("linux") and (os.getenv("OE_TARGET_ARCH") == 'x86_64'):
     defaultAllocator = 'tcmalloc'
-elif (os.sys.platform == "darwin") and (os.uname()[-1] == 'x86_64'):
+elif (os.sys.platform == "darwin") and (os.getenv("OE_TARGET_ARCH") == 'x86_64'):
     defaultAllocator = 'tcmalloc'
 else:
     defaultAllocator = 'system'
@@ -633,7 +633,7 @@ if has_option( "extralib" ):
 # ---- other build setup -----
 
 if "uname" in dir(os):
-    processor = os.uname()[4]
+    processor = os.getenv("OE_TARGET_ARCH")
 else:
     processor = "i386"
 
@@ -662,7 +662,7 @@ elif linux:
 
     env.Append( LIBS=['m'] )
 
-    if os.uname()[4] == "x86_64" and not force32:
+    if os.getenv("OE_TARGET_ARCH") == "x86_64" and not force32:
         linux64 = True
         nixLibPrefix = "lib64"
         env.Append( EXTRALIBPATH=["/usr/lib64" , "/lib64" ] )
-- 
1.9.0