From bf9aa34dea8ccba3ad8fbead9c7cf51d3a54fd60 Mon Sep 17 00:00:00 2001 From: Colin McCabe Date: Tue, 19 Aug 2014 18:10:00 +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/trunk@1618919 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 fad1c77db7..6e5b4adc1c 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -623,6 +623,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 8333285f2f..c558fe8c55 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()