diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-03-10 07:26:41 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-03-10 07:26:41 -0500 |
commit | 2db24e6471f4947f1779fb72109cadd9a62366f3 (patch) | |
tree | 9fed318884c191e40a47e7b1cbf02107c7a4c7c9 | |
parent | b7ff07fa268edf684eb97025958cb7b1acf1fe9f (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-- | SConstruct | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -9,12 +9,17 @@ API_FLAGS = '-D_XOPEN_SOURCE=600 -D_GNU_SOURCE' | |||
9 | X86_32_FLAGS = '-m32' | 9 | X86_32_FLAGS = '-m32' |
10 | X86_64_FLAGS = '-m64' | 10 | X86_64_FLAGS = '-m64' |
11 | V9_FLAGS = '-mcpu=v9 -m64' | 11 | V9_FLAGS = '-mcpu=v9 -m64' |
12 | |||
12 | SUPPORTED_ARCHS = { | 13 | SUPPORTED_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 | ||
19 | ARCH_ALIAS = { | ||
20 | 'i686' : 'x86' | ||
21 | } | ||
22 | |||
18 | KERNEL_INCLUDE = '%s/include/' % LITMUS_KERNEL | 23 | KERNEL_INCLUDE = '%s/include/' % LITMUS_KERNEL |
19 | INCLUDE_DIRS = 'include/ ' + KERNEL_INCLUDE | 24 | INCLUDE_DIRS = 'include/ ' + KERNEL_INCLUDE |
20 | 25 | ||
@@ -50,6 +55,10 @@ if 'ARCH' in ARGUMENTS: | |||
50 | elif 'ARCH' in environ: | 55 | elif 'ARCH' in environ: |
51 | arch = environ['ARCH'] | 56 | arch = environ['ARCH'] |
52 | 57 | ||
58 | # replace if the arch has an alternative name | ||
59 | if arch in ARCH_ALIAS: | ||
60 | arch = ARCH_ALIAS[arch] | ||
61 | |||
53 | if arch not in SUPPORTED_ARCHS: | 62 | if 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)) |