From b4b4e990e2e2905f953d6e12dbb30e642e23df86 Mon Sep 17 00:00:00 2001 From: Alexey Prokhin Date: Tue, 10 Jan 2012 20:27:36 +0400 Subject: [PATCH] =?UTF-8?q?Fixed=20issue=20#58=20=E2=80=94=20Multilib:=206?= =?UTF-8?q?4=20on=2032?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runtime/CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 7f1e474a..ca516b63 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -12,11 +12,11 @@ endif() include(CheckTypeSize) check_type_size(void* ptr_size) - if(${ptr_size} MATCHES "^8$") ## if it's 64-bit OS - set(MULTILIB OFF CACHE BOOL "Build both 64-bit and 32-bit libraries") -ENDIF(${ptr_size} MATCHES "^8$") + set(IS_64BIT_OS 1) +endif(${ptr_size} MATCHES "^8$") +set(MULTILIB OFF CACHE BOOL "Build both 64-bit and 32-bit libraries") set(BUILD_BC_LIBS OFF CACHE BOOL "Build the runtime as bytecode libraries") set(BUILD_SINGLE_LIB ON CACHE BOOL "Build single runtime library") set(LIB_SUFFIX "" CACHE STRING "Takes an empty string or 64. Directory where lib will be installed: lib or lib64") @@ -333,7 +333,11 @@ endif(PHOBOS2_DIR) build_runtime("" "" "" "" "${LIB_SUFFIX}") set(GENERATE_DI "") if(MULTILIB) - build_runtime("-m32" "-m32" "-m32" "" "32") + if(IS_64BIT_OS) + build_runtime("-m32" "-m32" "-m32" "" "32") + else(IS_64BIT_OS) + build_runtime("-m64" "-m64" "-m64" "" "64") + endif(IS_64BIT_OS) endif(MULTILIB) #