|
|
@ -10,11 +10,12 @@ Subject: Fix libarch determination based on openjdk 1.6.0_18 + icedtea code
|
|
|
|
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544674
|
|
|
|
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544674
|
|
|
|
Bug: http://public.kitware.com/Bug/view.php?id=9611
|
|
|
|
Bug: http://public.kitware.com/Bug/view.php?id=9611
|
|
|
|
Origin: vendor
|
|
|
|
Origin: vendor
|
|
|
|
Forwarded: no
|
|
|
|
Forwarded: yes
|
|
|
|
|
|
|
|
Last-Update: 2010-05-17
|
|
|
|
|
|
|
|
|
|
|
|
--- a/Modules/FindJNI.cmake
|
|
|
|
--- a/Modules/FindJNI.cmake
|
|
|
|
+++ b/Modules/FindJNI.cmake
|
|
|
|
+++ b/Modules/FindJNI.cmake
|
|
|
|
@@ -29,24 +29,42 @@
|
|
|
|
@@ -29,24 +29,49 @@
|
|
|
|
# Expand {libarch} occurences to java_libarch subdirectory(-ies) and set ${_var}
|
|
|
|
# Expand {libarch} occurences to java_libarch subdirectory(-ies) and set ${_var}
|
|
|
|
MACRO(java_append_library_directories _var)
|
|
|
|
MACRO(java_append_library_directories _var)
|
|
|
|
# Determine java arch-specific library subdir
|
|
|
|
# Determine java arch-specific library subdir
|
|
|
@ -46,32 +47,39 @@ Forwarded: no
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^alpha")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^alpha")
|
|
|
|
+ SET(_java_libarch "alpha")
|
|
|
|
+ SET(_java_libarch "alpha")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
|
|
|
|
|
|
|
|
+ # Subdir is "arm" for both big-endian (arm) and little-endian (armel).
|
|
|
|
+ SET(_java_libarch "arm")
|
|
|
|
+ SET(_java_libarch "arm")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
|
|
|
|
+ IF(CMAKE_CROSSCOMPILING)
|
|
|
|
+ # mips* machines are bi-endian mostly so processor does not tell
|
|
|
|
+ SET(_java_libarch "mips" "mipsel" "mipseb")
|
|
|
|
+ # endianess of the underlying system.
|
|
|
|
+ ELSE(CMAKE_CROSSCOMPILING)
|
|
|
|
+ SET(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "mips" "mipsel" "mipseb")
|
|
|
|
+ INCLUDE(TestBigEndian)
|
|
|
|
|
|
|
|
+ TEST_BIG_ENDIAN(_java_bigendian)
|
|
|
|
|
|
|
|
+ IF(_java_bigendian)
|
|
|
|
|
|
|
|
+ SET(_java_libarch "mips" "mipseb")
|
|
|
|
|
|
|
|
+ ELSE(_java_bigendian)
|
|
|
|
|
|
|
|
+ SET(_java_libarch "mipsel")
|
|
|
|
|
|
|
|
+ ENDIF(_java_bigendian)
|
|
|
|
|
|
|
|
+ ENDIF(CMAKE_CROSSCOMPILING)
|
|
|
|
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64")
|
|
|
|
+ SET(_java_libarch "ppc64")
|
|
|
|
+ SET(_java_libarch "ppc64")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)")
|
|
|
|
+ SET(_java_libarch "ppc")
|
|
|
|
+ SET(_java_libarch "ppc")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^sparc")
|
|
|
|
+ SET(_java_libarch "sparc" "sparcv9")
|
|
|
|
+ # Both flavours can run on the same processor
|
|
|
|
|
|
|
|
+ SET(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "sparc" "sparcv9")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(parisc|hppa)")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(parisc|hppa)")
|
|
|
|
+ SET(_java_libarch "parisc" "parisc64")
|
|
|
|
+ SET(_java_libarch "parisc" "parisc64")
|
|
|
|
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^s390")
|
|
|
|
|
|
|
|
+ # s390 binaries can run on s390x machines
|
|
|
|
|
|
|
|
+ SET(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}" "s390" "s390x")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^sh")
|
|
|
|
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^sh")
|
|
|
|
+ SET(_java_libarch "sh")
|
|
|
|
+ SET(_java_libarch "sh")
|
|
|
|
+ ELSE(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
|
|
|
+ ELSEIF("${CMAKE_SYSTEM_PROCESSOR}")
|
|
|
|
+ SET(_java_libarch ${CMAKE_SYSTEM_PROCESSOR})
|
|
|
|
+ SET(_java_libarch "${CMAKE_SYSTEM_PROCESSOR}")
|
|
|
|
+ ENDIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
|
|
|
+ ENDIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
+ # Append default list architectures if CMAKE_SYSTEM_PROCESSOR was empty or
|
|
|
|
|
|
|
|
+ # system is non-Linux (where the code above has not been well tested)
|
|
|
|
|
|
|
|
+ IF(NOT _java_libarch OR NOT (CMAKE_SYSTEM_NAME MATCHES "Linux"))
|
|
|
|
|
|
|
|
+ LIST(APPEND _java_libarch "i386" "amd64" "ppc")
|
|
|
|
|
|
|
|
+ ENDIF(NOT _java_libarch OR NOT (CMAKE_SYSTEM_NAME MATCHES "Linux"))
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
+ # Sometimes ${CMAKE_SYSTEM_PROCESSOR} is added to the list to prefer
|
|
|
|
|
|
|
|
+ # current value to a hardcoded list. Remove possible duplicates.
|
|
|
|
|
|
|
|
+ LIST(REMOVE_DUPLICATES _java_libarch)
|
|
|
|
|
|
|
|
|
|
|
|
FOREACH(_path ${ARGN})
|
|
|
|
FOREACH(_path ${ARGN})
|
|
|
|
IF(_path MATCHES "{libarch}")
|
|
|
|
IF(_path MATCHES "{libarch}")
|
|
|
|