aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2010-03-10 07:26:41 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2010-03-10 07:26:41 -0500
commit2db24e6471f4947f1779fb72109cadd9a62366f3 (patch)
tree9fed318884c191e40a47e7b1cbf02107c7a4c7c9
parentb7ff07fa268edf684eb97025958cb7b1acf1fe9f (diff)
Build fix: support building on i686 systems
32bit Intel systems don't actually report 'x86' as their architecture, rather, they are i?86 systems. Provide a lookup table to map these codes to the 'x86' name that is used in the SConstruct file.
-rw-r--r--SConstruct9
1 files changed, 9 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 8a40ace..e7885d3 100644
--- a/SConstruct
+++ b/SConstruct
@@ -9,12 +9,17 @@ API_FLAGS = '-D_XOPEN_SOURCE=600 -D_GNU_SOURCE'
9X86_32_FLAGS = '-m32' 9X86_32_FLAGS = '-m32'
10X86_64_FLAGS = '-m64' 10X86_64_FLAGS = '-m64'
11V9_FLAGS = '-mcpu=v9 -m64' 11V9_FLAGS = '-mcpu=v9 -m64'
12
12SUPPORTED_ARCHS = { 13SUPPORTED_ARCHS = {
13 'sparc64' : V9_FLAGS, 14 'sparc64' : V9_FLAGS,
14 'x86' : X86_32_FLAGS, 15 'x86' : X86_32_FLAGS,
15 'x86_64' : X86_64_FLAGS, 16 'x86_64' : X86_64_FLAGS,
16} 17}
17 18
19ARCH_ALIAS = {
20 'i686' : 'x86'
21}
22
18KERNEL_INCLUDE = '%s/include/' % LITMUS_KERNEL 23KERNEL_INCLUDE = '%s/include/' % LITMUS_KERNEL
19INCLUDE_DIRS = 'include/ ' + KERNEL_INCLUDE 24INCLUDE_DIRS = 'include/ ' + KERNEL_INCLUDE
20 25
@@ -50,6 +55,10 @@ if 'ARCH' in ARGUMENTS:
50elif 'ARCH' in environ: 55elif 'ARCH' in environ:
51 arch = environ['ARCH'] 56 arch = environ['ARCH']
52 57
58# replace if the arch has an alternative name
59if arch in ARCH_ALIAS:
60 arch = ARCH_ALIAS[arch]
61
53if arch not in SUPPORTED_ARCHS: 62if arch not in SUPPORTED_ARCHS:
54 print 'Error: Building liblitmus is only supported for the following', \ 63 print 'Error: Building liblitmus is only supported for the following', \
55 'architectures: %s.' % ', '.join(sorted(SUPPORTED_ARCHS)) 64 'architectures: %s.' % ', '.join(sorted(SUPPORTED_ARCHS))