hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1372583 - /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/JNIFlags.cmake
Date Mon, 13 Aug 2012 20:27:15 GMT
Author: eli
Date: Mon Aug 13 20:27:14 2012
New Revision: 1372583

URL: http://svn.apache.org/viewvc?rev=1372583&view=rev
Log:
Amend HADOOP-8659. Native libraries must build with soft-float ABI for Oracle JVM on ARM.

Modified:
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/JNIFlags.cmake

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/JNIFlags.cmake
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/JNIFlags.cmake?rev=1372583&r1=1372582&r2=1372583&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/JNIFlags.cmake (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/JNIFlags.cmake Mon Aug 13
20:27:14 2012
@@ -18,17 +18,18 @@
 
 cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
 
-find_package(JNI REQUIRED)
-
 # If JVM_ARCH_DATA_MODEL is 32, compile all binaries as 32-bit.
 # This variable is set by maven.
 if (JVM_ARCH_DATA_MODEL EQUAL 32)
     # Force 32-bit code generation on amd64/x86_64, ppc64, sparc64
     if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_PROCESSOR MATCHES ".*64")
         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")
+        # Set CMAKE_SYSTEM_PROCESSOR to ensure that find_package(JNI) will use
+        # the 32-bit version of libjvm.so.
         set(CMAKE_SYSTEM_PROCESSOR "i686")
     endif ()
 endif (JVM_ARCH_DATA_MODEL EQUAL 32)
@@ -63,3 +64,5 @@ if (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm
         endif ()
     endif (READELF MATCHES "NOTFOUND")
 endif (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
+
+find_package(JNI REQUIRED)



Mime
View raw message