From 96455a564af1b0f4705df8f53a2e51254e10b399 Mon Sep 17 00:00:00 2001 From: Colin McCabe Date: Tue, 19 Aug 2014 18:10:35 +0000 Subject: [PATCH] HADOOP-10968. hadoop native build fails to detect java_libarch on ppc64le (Dinar Valeev via Colin Patrick McCabe) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1618920 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ hadoop-common-project/hadoop-common/src/JNIFlags.cmake | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index bba3cff5673..a6f93ad40f1 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -176,6 +176,9 @@ Release 2.6.0 - UNRELEASED HADOOP-10873. Fix dead link in Configuration javadoc (Akira AJISAKA via aw) + HADOOP-10968. hadoop native build fails to detect java_libarch on + ppc64le (Dinar Valeev via Colin Patrick McCabe) + Release 2.5.0 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/JNIFlags.cmake b/hadoop-common-project/hadoop-common/src/JNIFlags.cmake index 8333285f2fe..c558fe8c55c 100644 --- a/hadoop-common-project/hadoop-common/src/JNIFlags.cmake +++ b/hadoop-common-project/hadoop-common/src/JNIFlags.cmake @@ -78,6 +78,12 @@ IF("${CMAKE_SYSTEM}" MATCHES "Linux") SET(_java_libarch "amd64") ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") SET(_java_libarch "arm") + ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64le") + IF(EXISTS "${_JAVA_HOME}/jre/lib/ppc64le") + SET(_java_libarch "ppc64le") + ELSE() + SET(_java_libarch "ppc64") + ENDIF() ELSE() SET(_java_libarch ${CMAKE_SYSTEM_PROCESSOR}) ENDIF()