File: 0001-disable-config-guess

package info (click to toggle)
libffado 2.4.9-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,604 kB
  • sloc: cpp: 77,151; python: 8,997; ansic: 2,951; sh: 1,429; xml: 855; makefile: 29
file content (60 lines) | stat: -rw-r--r-- 1,837 bytes parent folder | download
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
51
52
53
54
55
56
57
58
59
60
From: Mattia Rizzolo <mattia@debian.org>
Date: Fri, 19 Dec 2025 13:25:23 +0100
Subject: Do not use config.guess to get the CPU type

Last-Update: 2019-08-05
Bug-Debian: https://bugs.debian.org/933813

config.guess needs regular updates to stay up-to-date. dh_autoreconf 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.
---
 SConstruct | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/SConstruct b/SConstruct
index 54bfccd..3273a22 100644
--- a/SConstruct
+++ b/SConstruct
@@ -155,12 +155,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 )
@@ -203,7 +197,6 @@ def CheckPKG(context, name):
     return ret
 
 tests = {
-    "ConfigGuess" : ConfigGuess,
     "CheckForApp" : CheckForApp,
     "CheckForPyModule": CheckForPyModule,
     "CompilerCheck" : CompilerCheck,
@@ -470,8 +463,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']:
@@ -573,7 +564,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