From: Mattia Rizzolo <mattia@debian.org>
Date: Mon Aug 5 01:25:48 2019 +0200
Subject: Do not use config.guess to get the CPU type

config.guess needs regular updates to stay up-to-date.  CDBS would automatically
update it before configure, but the way this SConstruct is written, it runs it
also when running --clean, thus breaking on new architectures nonetheless.
Given that we are running this in Debian, just rely on DEB_HOST_GNU_CPU.

Bug-Debian: https://bugs.debian.org/933813
---
 libffado/SConstruct | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/libffado/SConstruct b/libffado/SConstruct
index 2ea3c94..3cb8df9 100644
--- a/libffado/SConstruct
+++ b/libffado/SConstruct
@@ -154,12 +154,6 @@ CacheDir( 'cache/objects' )
 
 opts.Save( 'cache/options.cache', env )
 
-def ConfigGuess( context ):
-    context.Message( "Trying to find the system triple: " )
-    ret = check_output(("/bin/sh", "admin/config.guess")).rstrip()
-    context.Result( ret )
-    return ret.decode()
-
 def CheckForApp( context, app ):
     context.Message( "Checking whether '" + app + "' executes " )
     ret = context.TryAction( app )
@@ -202,7 +196,6 @@ def CheckPKG(context, name):
     return ret
 
 tests = {
-    "ConfigGuess" : ConfigGuess,
     "CheckForApp" : CheckForApp,
     "CheckForPyModule": CheckForPyModule,
     "CompilerCheck" : CompilerCheck,
@@ -469,8 +462,6 @@ else:
     # code, suppress the "set but not used" warning.
     env['DBUS1_FLAGS'] += b" -Wno-unused-but-set-variable"
 
-config_guess = conf.ConfigGuess()
-
 conf.Finish()
 
 if env['DEBUG']:
@@ -564,7 +555,9 @@ config_cpu = 0
 config_arch = 1
 config_kernel = 2
 config_os = 3
-config = config_guess.split ("-")
+config = (
+    os.environ['DEB_HOST_GNU_CPU'],
+)  # the other variables are not used, so whatever…
 
 needs_fPIC = False
 
