HADOOP-8538. CMake builds fail on ARM. Contributed by Trevor Robinson

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1356042 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eli Collins 2012-07-01 22:51:13 +00:00
parent d8409ef981
commit 2b938bea99
5 changed files with 23 additions and 9 deletions

View File

@ -118,6 +118,8 @@ Release 2.0.1-alpha - UNRELEASED
HADOOP-8438. hadoop-validate-setup.sh refers to examples jar file which doesn't exist HADOOP-8438. hadoop-validate-setup.sh refers to examples jar file which doesn't exist
(Devaraj K via umamahesh) (Devaraj K via umamahesh)
HADOOP-8538. CMake builds fail on ARM. (Trevor Robinson via eli)
BREAKDOWN OF HDFS-3042 SUBTASKS BREAKDOWN OF HDFS-3042 SUBTASKS
HADOOP-8220. ZKFailoverController doesn't handle failure to become active HADOOP-8220. ZKFailoverController doesn't handle failure to become active

View File

@ -24,8 +24,11 @@ set(CMAKE_BUILD_TYPE, Release)
# If JVM_ARCH_DATA_MODEL is 32, compile all binaries as 32-bit. # If JVM_ARCH_DATA_MODEL is 32, compile all binaries as 32-bit.
# This variable is set by maven. # This variable is set by maven.
if (JVM_ARCH_DATA_MODEL EQUAL 32) if (JVM_ARCH_DATA_MODEL EQUAL 32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") # force 32-bit code generation on amd64/x86_64, ppc64, sparc64
set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -m32") if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_PROCESSOR MATCHES ".*64")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -m32")
endif ()
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64") if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
set(CMAKE_SYSTEM_PROCESSOR "i686") set(CMAKE_SYSTEM_PROCESSOR "i686")
endif () endif ()

View File

@ -24,8 +24,11 @@ set(CMAKE_BUILD_TYPE, Release)
# If JVM_ARCH_DATA_MODEL is 32, compile all binaries as 32-bit. # If JVM_ARCH_DATA_MODEL is 32, compile all binaries as 32-bit.
# This variable is set by maven. # This variable is set by maven.
if (JVM_ARCH_DATA_MODEL EQUAL 32) if (JVM_ARCH_DATA_MODEL EQUAL 32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") # force 32-bit code generation on amd64/x86_64, ppc64, sparc64
set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -m32") if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_PROCESSOR MATCHES ".*64")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -m32")
endif ()
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64") if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
set(CMAKE_SYSTEM_PROCESSOR "i686") set(CMAKE_SYSTEM_PROCESSOR "i686")
endif () endif ()

View File

@ -19,8 +19,11 @@ cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
set(CMAKE_BUILD_TYPE, Release) set(CMAKE_BUILD_TYPE, Release)
if (JVM_ARCH_DATA_MODEL EQUAL 32) if (JVM_ARCH_DATA_MODEL EQUAL 32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") # force 32-bit code generation on amd64/x86_64, ppc64, sparc64
set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -m32") if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_PROCESSOR MATCHES ".*64")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -m32")
endif ()
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64") if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
set(CMAKE_SYSTEM_PROCESSOR "i686") set(CMAKE_SYSTEM_PROCESSOR "i686")
endif () endif ()

View File

@ -27,9 +27,12 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_REENTRANT -D_FILE_OFFSET_BITS=64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_REENTRANT -D_FILE_OFFSET_BITS=64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_REENTRANT -D_FILE_OFFSET_BITS=64")
if (JVM_ARCH_DATA_MODEL EQUAL 32) if (JVM_ARCH_DATA_MODEL EQUAL 32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") # force 32-bit code generation on amd64/x86_64, ppc64, sparc64
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_PROCESSOR MATCHES ".*64")
set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -m32") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -m32")
endif ()
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64") if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
set(CMAKE_SYSTEM_PROCESSOR "i686") set(CMAKE_SYSTEM_PROCESSOR "i686")
endif () endif ()