FindJNI: Add support for x32 architecture on Linux (#15710)

This architecture uses an amd64 kernel but x32 userland.
Use CMAKE_LIBRARY_ARCHITECTURE to distinguish it for now.
This commit is contained in:
Thorsten Glaser 2015-08-24 10:53:00 -04:00 committed by Brad King
parent 2370a99400
commit c4d78b8bc0
1 changed files with 4 additions and 0 deletions

View File

@ -42,7 +42,11 @@ macro(java_append_library_directories _var)
# 1.6.0_18 + icedtea patches. However, it would be much better to base the
# guess on the first part of the GNU config.guess platform triplet.
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
if(CMAKE_LIBRARY_ARCHITECTURE STREQUAL "x86_64-linux-gnux32")
set(_java_libarch "x32" "amd64" "i386")
else()
set(_java_libarch "amd64" "i386")
endif()
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
set(_java_libarch "i386")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^alpha")