Package: sra-sdk / 2.8.1-2+dfsg-2

10_portability.patch Patch series | 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
61
62
Author: Andreas Tille <tille@debian.org>
LastChanged: Tue, 10 Jan 2012 09:06:14 +0900
Description: Drop redundant -m32/-m64 option to enable build
             on all Debian architectures

--- a/build/Makefile.shell
+++ b/build/Makefile.shell
@@ -30,6 +30,7 @@ endif
 # determine OS
 UNAME = $(shell uname -s)
 
+HOST_OS = ''
 ifeq (Darwin, $(UNAME))
 	HOST_OS = mac
 endif
@@ -51,12 +52,17 @@ endif
 ifeq (xMINGW, $(findstring xMINGW,x$(UNAME)))
 	HOST_OS = win
 endif
+# handle all other OSes (like BSD or Hurd) as if they were linux (see bug #627861)
+ifeq ($(HOST_OS), '')
+	HOST_OS = linux
+endif
 
 # assume build OS is the same as host OS
 OS = $(HOST_OS)
 BUILD_OS = $(OS)
 
 # determine ARCH
+HOST_ARCH=''
 ARCHITECTURES = default
 ifeq (mac,$(HOST_OS))
 	HOST_ARCH = $(shell $(TOP)/build/mac.arch.sh)
@@ -105,6 +111,10 @@ else
 		ARCHITECTURES = sparc64 sparc32
 	endif
 endif
+# Handle all other architectures equivalent as i386 (see bug #627861)
+ifeq ($(ARCH),'')
+	ARCH = i386
+endif
 
 ARCH = $(HOST_ARCH)
 REMOTE_ARCH = $(ARCH)
@@ -174,16 +184,4 @@ ifeq (yes,$(HAS_RHOST))
 endif
 
 # determine BITS
-ifeq (x86_64, $(ARCH))
-	BITS = 64
-endif
-ifeq (sparc64, $(ARCH))
-	BITS = 64
-endif
-ifeq (i386, $(ARCH))
-	BITS = 32
-endif
-ifeq (sparc32, $(ARCH))
-	BITS = 32
-endif
-
+BITS = $(shell dpkg-architecture -qDEB_BUILD_ARCH_BITS)