From d02f33d860f2d11f71e9056782a2e75603d6ec25 Mon Sep 17 00:00:00 2001 From: Koen Kooi 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 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