aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--linden/indra/cmake/00-Common.cmake9
-rw-r--r--linden/indra/cmake/Variables.cmake26
-rwxr-xr-xlinden/indra/develop.py20
-rwxr-xr-xlinden/scripts/install.py7
4 files changed, 54 insertions, 8 deletions
diff --git a/linden/indra/cmake/00-Common.cmake b/linden/indra/cmake/00-Common.cmake
index d92aa0f..81bfbdf 100644
--- a/linden/indra/cmake/00-Common.cmake
+++ b/linden/indra/cmake/00-Common.cmake
@@ -233,6 +233,15 @@ if (LINUX OR DARWIN)
233 233
234 set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}") 234 set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}")
235 set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}") 235 set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
236
237 if (WORD_SIZE EQUAL 32)
238 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
239 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
240 elseif (WORD_SIZE EQUAL 64)
241 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
242 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
243 endif (WORD_SIZE EQUAL 32)
244
236endif (LINUX OR DARWIN) 245endif (LINUX OR DARWIN)
237 246
238 247
diff --git a/linden/indra/cmake/Variables.cmake b/linden/indra/cmake/Variables.cmake
index eb9c004..6b7ded3 100644
--- a/linden/indra/cmake/Variables.cmake
+++ b/linden/indra/cmake/Variables.cmake
@@ -50,8 +50,30 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
50 50
51if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") 51if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
52 set(LINUX ON BOOl FORCE) 52 set(LINUX ON BOOl FORCE)
53 execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/ 53
54 OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) 54 # If someone has specified a word size, use that to determine the
55 # architecture. Otherwise, let the architecture specify the word size.
56
57 if ("$ENV{WORD_SIZE}" MATCHES "32")
58 set(WORD_SIZE 32)
59 elseif ("$ENV{WORD_SIZE}" MATCHES "64")
60 set(WORD_SIZE 64)
61 endif ()
62
63 if (WORD_SIZE EQUAL 32)
64 set(ARCH i686)
65 elseif (WORD_SIZE EQUAL 64)
66 set(ARCH x86_64)
67 else (WORD_SIZE EQUAL 32)
68 execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/
69 OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
70 if (ARCH STREQUAL x86_64)
71 set(WORD_SIZE 64)
72 else (ARCH STREQUAL x86_64)
73 set(WORD_SIZE 32)
74 endif (ARCH STREQUAL x86_64)
75 endif (WORD_SIZE EQUAL 32)
76
55 set(LL_ARCH ${ARCH}_linux) 77 set(LL_ARCH ${ARCH}_linux)
56 set(LL_ARCH_DIR ${ARCH}-linux) 78 set(LL_ARCH_DIR ${ARCH}-linux)
57endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") 79endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
diff --git a/linden/indra/develop.py b/linden/indra/develop.py
index 8b23b1d..2f07e9e 100755
--- a/linden/indra/develop.py
+++ b/linden/indra/develop.py
@@ -223,14 +223,26 @@ class UnixSetup(PlatformSetup):
223 223
224 def arch(self): 224 def arch(self):
225 cpu = os.uname()[-1] 225 cpu = os.uname()[-1]
226 word_size = os.environ.get('WORD_SIZE')
226 if cpu.endswith('386'): 227 if cpu.endswith('386'):
227 cpu = 'i386' 228 cpu = 'i386'
229 if word_size == '64':
230 cpu = 'x86_64'
228 elif cpu.endswith('86'): 231 elif cpu.endswith('86'):
229 cpu = 'i686' 232 if word_size == '64':
233 cpu = 'x86_64'
234 else:
235 cpu = 'i686'
230 elif cpu in ('x86_64'): 236 elif cpu in ('x86_64'):
231 cpu = 'x86_64' 237 if word_size == '32':
232 elif cpu in ('athlon',): 238 cpu = 'i686'
233 cpu = 'i686' 239 else:
240 cpu = 'x86_64'
241 elif cpu in ('athlon',):
242 if word_size == '64':
243 cpu = 'x86_64'
244 else:
245 cpu = 'i686'
234 elif cpu == 'Power Macintosh': 246 elif cpu == 'Power Macintosh':
235 cpu = 'ppc' 247 cpu = 'ppc'
236 return cpu 248 return cpu
diff --git a/linden/scripts/install.py b/linden/scripts/install.py
index f09fc48..c69644b 100755
--- a/linden/scripts/install.py
+++ b/linden/scripts/install.py
@@ -805,11 +805,14 @@ def _get_platform():
805 } 805 }
806 this_platform = platform_map[sys.platform] 806 this_platform = platform_map[sys.platform]
807 if this_platform == 'linux': 807 if this_platform == 'linux':
808 if platform.architecture()[0] == '64bit': 808 word_size = os.environ.get('WORD_SIZE')
809 if platform.architecture()[0] == '64bit' or word_size == '64':
809 # TODO -- someday when install.py accepts a platform of the form 810 # TODO -- someday when install.py accepts a platform of the form
810 # os/arch/compiler/compiler_version then we can replace the 811 # os/arch/compiler/compiler_version then we can replace the
811 # 'linux64' platform with 'linux/x86_64/gcc/4.1' 812 # 'linux64' platform with 'linux/x86_64/gcc/4.1'
812 this_platform = 'linux64' 813 if not word_size == '32':
814 this_platform = 'linux64'
815
813 return this_platform 816 return this_platform
814 817
815def _getuser(): 818def _getuser():