diff options
-rw-r--r-- | indra/cmake/00-Common.cmake | 8 | ||||
-rw-r--r-- | indra/cmake/APR.cmake | 2 | ||||
-rw-r--r-- | indra/cmake/MySQL.cmake | 21 | ||||
-rw-r--r-- | indra/cmake/Variables.cmake | 21 | ||||
-rwxr-xr-x | indra/develop.py | 34 | ||||
-rw-r--r-- | install.xml | 15 | ||||
-rwxr-xr-x | scripts/install.py | 2 |
7 files changed, 79 insertions, 24 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 42f43f9d4e..ad7529ea0a 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -202,6 +202,14 @@ if (LINUX OR DARWIN) set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}") + + if (WORD_SIZE EQUAL 32) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") + elseif (WORD_SIZE EQUAL 64) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64") + endif (WORD_SIZE EQUAL 32) endif (LINUX OR DARWIN) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index 25ee364db8..0755aeee03 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -43,6 +43,6 @@ else (STANDALONE) set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/apr-1) if (LINUX AND VIEWER) - list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES}) + list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} uuid) endif (LINUX AND VIEWER) endif (STANDALONE) diff --git a/indra/cmake/MySQL.cmake b/indra/cmake/MySQL.cmake index e124ebb45e..e591fbc3d8 100644 --- a/indra/cmake/MySQL.cmake +++ b/indra/cmake/MySQL.cmake @@ -1,14 +1,20 @@ # -*- cmake -*- include(Linking) include(Prebuilt) -# We don't prebuild our own MySQL client library. use_prebuilt_binary(mysql) -set(MYSQL_FIND_QUIETLY ON) -set(MYSQL_FIND_REQUIRED ON) - -if (WINDOWS) +if (LINUX) + if (WORD_SIZE EQUAL 32 OR DEBIAN_VERSION STREQUAL "3.1") + set(MYSQL_LIBRARIES mysqlclient) + set(MYSQL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include) + else (WORD_SIZE EQUAL 32 OR DEBIAN_VERSION STREQUAL "3.1") + # Use the native MySQL library on a 64-bit system. + set(MYSQL_FIND_QUIETLY ON) + set(MYSQL_FIND_REQUIRED ON) + include(FindMySQL) + endif (WORD_SIZE EQUAL 32 OR DEBIAN_VERSION STREQUAL "3.1") +elseif (WINDOWS) set(MYSQL_LIBRARIES mysqlclient) set(MYSQL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include) elseif (DARWIN) @@ -17,7 +23,4 @@ elseif (DARWIN) optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libmysqlclient.a debug ${ARCH_PREBUILT_DIRS_DEBUG}/libmysqlclient.a ) -else (WINDOWS) - set(MYSQL_FIND_REQUIRED) - include(FindMySQL) -endif (WINDOWS) +endif (LINUX) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 2fbd5a3fb8..c4dcc7eae7 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -45,12 +45,28 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(ARCH i686) set(LL_ARCH ${ARCH}_win32) set(LL_ARCH_DIR ${ARCH}-win32) + set(WORD_SIZE 32) endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(LINUX ON BOOl FORCE) - execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/ - OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) + + # If someone has specified a word size, use that to determine the + # architecture. Otherwise, let the architecture specify the word size. + if (WORD_SIZE EQUAL 32) + set(ARCH i686) + elseif (WORD_SIZE EQUAL 64) + set(ARCH x86_64) + else (WORD_SIZE EQUAL 32) + execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/ + OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) + if (ARCH STREQUAL x86_64) + set(WORD_SIZE 64) + else (ARCH STREQUAL x86_64) + set(WORD_SIZE 64) + endif (ARCH STREQUAL x86_64) + endif (WORD_SIZE EQUAL 32) + set(LL_ARCH ${ARCH}_linux) set(LL_ARCH_DIR ${ARCH}-linux) endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") @@ -73,6 +89,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") endif (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc") set(LL_ARCH ${ARCH}_darwin) set(LL_ARCH_DIR universal-darwin) + set(WORD_SIZE 32) endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Default deploy grid diff --git a/indra/develop.py b/indra/develop.py index d1875c9fb2..f4143eb65c 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -79,6 +79,7 @@ class PlatformSetup(object): project_name = 'SecondLife' distcc = True cmake_opts = [] + word_size = 32 def __init__(self): self.script_dir = os.path.realpath( @@ -120,6 +121,7 @@ class PlatformSetup(object): opts=quote(opts), standalone=self.standalone, unattended=self.unattended, + word_size=self.word_size, type=self.build_type.upper(), ) #if simple: @@ -127,6 +129,7 @@ class PlatformSetup(object): return ('cmake -DCMAKE_BUILD_TYPE:STRING=%(type)s ' '-DSTANDALONE:BOOL=%(standalone)s ' '-DUNATTENDED:BOOL=%(unattended)s ' + '-DWORD_SIZE:STRING=%(word_size)s ' '-G %(generator)r %(opts)s %(dir)r' % args) def run_cmake(self, args=[]): @@ -229,6 +232,8 @@ class UnixSetup(PlatformSetup): cpu = 'i686' elif cpu == 'Power Macintosh': cpu = 'ppc' + elif cpu == 'x86_64' and self.word_size == 32: + cpu = 'i686' return cpu def run(self, command, name=None): @@ -263,8 +268,7 @@ class LinuxSetup(UnixSetup): return 'linux' def build_dirs(self): - # Only build the server code if (a) we have it and (b) we're - # on 32-bit x86. + # Only build the server code if we have it. platform_build = '%s-%s' % (self.platform(), self.build_type.lower()) if self.arch() == 'i686' and self.is_internal_tree(): @@ -285,7 +289,8 @@ class LinuxSetup(UnixSetup): standalone=self.standalone, unattended=self.unattended, type=self.build_type.upper(), - project_name=self.project_name + project_name=self.project_name, + word_size=self.word_size, ) if not self.is_internal_tree(): args.update({'cxx':'g++', 'server':'OFF', 'viewer':'ON'}) @@ -311,6 +316,7 @@ class LinuxSetup(UnixSetup): '-G %(generator)r -DSERVER:BOOL=%(server)s ' '-DVIEWER:BOOL=%(viewer)s -DSTANDALONE:BOOL=%(standalone)s ' '-DUNATTENDED:BOOL=%(unattended)s ' + '-DWORD_SIZE:STRING=%(word_size)s ' '-DROOT_PROJECT_NAME:STRING=%(project_name)s ' '%(opts)s %(dir)r') % args) @@ -413,10 +419,11 @@ class DarwinSetup(UnixSetup): generator=self.generator, opts=quote(opts), standalone=self.standalone, + word_size=self.word_size, unattended=self.unattended, project_name=self.project_name, universal='', - type=self.build_type.upper() + type=self.build_type.upper(), ) if self.unattended == 'ON': args['universal'] = '-DCMAKE_OSX_ARCHITECTURES:STRING=\'i386;ppc\'' @@ -426,6 +433,7 @@ class DarwinSetup(UnixSetup): '-DCMAKE_BUILD_TYPE:STRING=%(type)s ' '-DSTANDALONE:BOOL=%(standalone)s ' '-DUNATTENDED:BOOL=%(unattended)s ' + '-DWORD_SIZE:STRING=%(word_size)s ' '-DROOT_PROJECT_NAME:STRING=%(project_name)s ' '%(universal)s ' '%(opts)s %(dir)r' % args) @@ -505,13 +513,15 @@ class WindowsSetup(PlatformSetup): opts=quote(opts), standalone=self.standalone, unattended=self.unattended, - project_name=self.project_name + project_name=self.project_name, + word_size=self.word_size, ) #if simple: # return 'cmake %(opts)s "%(dir)s"' % args return ('cmake -G "%(generator)s" ' '-DSTANDALONE:BOOL=%(standalone)s ' '-DUNATTENDED:BOOL=%(unattended)s ' + '-DWORD_SIZE:STRING=%(word_size)s ' '-DROOT_PROJECT_NAME:STRING=%(project_name)s ' '%(opts)s "%(dir)s"' % args) @@ -620,13 +630,15 @@ class CygwinSetup(WindowsSetup): opts=quote(opts), standalone=self.standalone, unattended=self.unattended, - project_name=self.project_name + project_name=self.project_name, + word_size=self.word_size, ) #if simple: # return 'cmake %(opts)s "%(dir)s"' % args return ('cmake -G "%(generator)s" ' '-DUNATTENDED:BOOl=%(unattended)s ' '-DSTANDALONE:BOOL=%(standalone)s ' + '-DWORD_SIZE:STRING=%(word_size)s ' '-DROOT_PROJECT_NAME:STRING=%(project_name)s ' '%(opts)s "%(dir)s"' % args) @@ -647,6 +659,7 @@ Options: --unattended build unattended, do not invoke any tools requiring a human response -t | --type=NAME build type ("Debug", "Release", or "RelWithDebInfo") + -m32 | -m64 build architecture (32-bit or 64-bit) -N | --no-distcc disable use of distcc -G | --generator=NAME generator name Windows: VC71 or VS2003 (default), VC80 (VS2005) or @@ -680,7 +693,7 @@ def main(arguments): try: opts, args = getopt.getopt( arguments, - '?hNt:p:G:', + '?hNt:p:G:m:', ['help', 'standalone', 'no-distcc', 'unattended', 'type=', 'incredibuild', 'generator=', 'project=']) except getopt.GetoptError, err: print >> sys.stderr, 'Error:', err @@ -698,6 +711,13 @@ For example: develop.py configure -DSERVER:BOOL=OFF""" setup.standalone = 'ON' elif o in ('--unattended',): setup.unattended = 'ON' + elif o in ('-m',): + if a in ('32', '64'): + setup.word_size = int(a) + else: + print >> sys.stderr, 'Error: unknown word size', repr(a) + print >> sys.stderr, 'Supported word sizes: 32, 64' + sys.exit(1) elif o in ('-t', '--type'): try: setup.build_type = setup.build_types[a.lower()] diff --git a/install.xml b/install.xml index 6f761669c9..89a039ca35 100644 --- a/install.xml +++ b/install.xml @@ -817,9 +817,9 @@ anguage Infrstructure (CLI) international standard</string> <key>linux</key> <map> <key>md5sum</key> - <string>b5cc6062bd2f7421f606f7e1a5228829</string> + <string>91b194aed4b38bc23493b198009a8c6a</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/libuuid-linux-20080812.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/libuuid-linux-20090417.tar.bz2</uri> </map> </map> </map> @@ -927,6 +927,13 @@ anguage Infrstructure (CLI) international standard</string> <key>url</key> <uri>scp:install-packages.lindenlab.com:/local/www/install-packages/doc/mysql-darwin-20080812.tar.bz2</uri> </map> + <key>linux</key> + <map> + <key>md5sum</key> + <string>cc86b4cc858655e23704d1168325d7b9</string> + <key>url</key> + <uri>scp:install-packages.lindenlab.com:/local/www/install-packages/doc/mysqlclient-linux-20090320.tar.bz2</uri> + </map> <key>windows</key> <map> <key>md5sum</key> @@ -1306,9 +1313,9 @@ anguage Infrstructure (CLI) international standard</string> <key>linux</key> <map> <key>md5sum</key> - <string>806637b1834825ab8888d5e487085df8</string> + <string>80ee8d5a30563ce0f55d37fed6dfc744</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/zlib-1.1.4-linux-20080818.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/zlib-1.2.3-linux-20090417.tar.bz2</uri> </map> <key>linux64</key> <map> diff --git a/scripts/install.py b/scripts/install.py index 5069918bee..6278fba16c 100755 --- a/scripts/install.py +++ b/scripts/install.py @@ -779,7 +779,7 @@ def _get_platform(): # TODO -- someday when install.py accepts a platform of the form # os/arch/compiler/compiler_version then we can replace the # 'linux64' platform with 'linux/x86_64/gcc/4.1' - this_platform = 'linux64' + this_platform = 'linux' return this_platform def _getuser(): |