Improve FindJNI_fix_libarch_determination.diff patch.

ci/unstable
Modestas Vainius 15 years ago
parent e9e236776c
commit 351ff1be0f

9
debian/changelog vendored

@ -1,9 +1,10 @@
cmake (2.8.1-3) UNRELEASED; urgency=low cmake (2.8.1-3) UNRELEASED; urgency=low
* Rewrite _java_libarch determination code in FindJNI.cmake (based on * Add patches:
new code in OpenJDK 1.6.0_18). This should fix invalid _java_libarch - FindJNI_fix_libarch_determination.dif - rewrite _java_libarch
detection on mipsel and armel (patch determination code in FindJNI.cmake (based on OpenJDK 1.6.0_18 + icedtea
FindJNI_fix_libarch_determination.diff) (Closes: #544674). patches). This should fix invalid _java_libarch detection on mipsel and
armel (Closes: #544674).
-- Modestas Vainius <modax@debian.org> Sat, 01 May 2010 22:25:55 +0300 -- Modestas Vainius <modax@debian.org> Sat, 01 May 2010 22:25:55 +0300

@ -1,11 +1,12 @@
From: Modestas Vainius <modax@debian.org> From: Modestas Vainius <modax@debian.org>
Subject: Fix libarch determination based on openjdk 1.6.0_18 code Subject: Fix libarch determination based on openjdk 1.6.0_18 + icedtea code
OpenJDK build system has been rewritten sometime between 1.6.0_16 and 1.6.0_18 This new version is based on the openjdk 1.6.0_18 + icedtea patches:
and now it features improved JRE_ARCH_DIR determination. This patch rewrites - acinclude.m4 (JRE_ARCH_DIR)
${_java_libarch} determination code in FindJNI.cmake accordingly (it is not a - openjdk/jdk/make/common/shared/Platform.gmk (libarch)
straight port though because OpenJDK build system bases its decisions on GNU This should fix libarch determination on armel and mipsel, add support for
triplet now which is not available for cmake). As a side effect, this should hppa and sh. However, it would be more reliable to base this guess on the
fix invalid ${_java_libarch} determination on armel and mipsel. first part of the GNU config.guess platform triplet but it is generally not
available for cmake yet.
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
@ -13,7 +14,7 @@ Forwarded: no
--- a/Modules/FindJNI.cmake --- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake
@@ -29,24 +29,40 @@ @@ -29,24 +29,42 @@
# 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
@ -35,9 +36,9 @@ Forwarded: no
- ELSE(CMAKE_SYSTEM_NAME MATCHES "Linux") - ELSE(CMAKE_SYSTEM_NAME MATCHES "Linux")
- SET(_java_libarch "i386" "amd64" "ppc") # previous default - SET(_java_libarch "i386" "amd64" "ppc") # previous default
- ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") - ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ # Based on acinclude.m4 (JRE_ARCH_DIR) as of openjdk 1.6.0_18 + # Mostly based on openjdk/jdk/make/common/shared/Platform.gmk as of openjdk
+ # and kaffe as of 1.1.8 which uses the first part of the + # 1.6.0_18 + icedtea patches. However, it would be much better to base the
+ # GNU config.guess platform triplet. + # guess on the first part of the GNU config.guess platform triplet.
+ IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ SET(_java_libarch "amd64") + SET(_java_libarch "amd64")
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$") + ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
@ -48,23 +49,25 @@ Forwarded: no
+ SET(_java_libarch "arm") + SET(_java_libarch "arm")
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips") + ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
+ IF(CMAKE_CROSSCOMPILING) + IF(CMAKE_CROSSCOMPILING)
+ SET(_java_libarch "mips" "mipsel") + SET(_java_libarch "mips" "mipsel" "mipseb")
+ ELSE(CMAKE_CROSSCOMPILING) + ELSE(CMAKE_CROSSCOMPILING)
+ INCLUDE(TestBigEndian) + INCLUDE(TestBigEndian)
+ TEST_BIG_ENDIAN(_java_bigendian) + TEST_BIG_ENDIAN(_java_bigendian)
+ IF(_java_bigendian) + IF(_java_bigendian)
+ SET(_java_libarch "mips") + SET(_java_libarch "mips" "mipseb")
+ ELSE(_java_bigendian) + ELSE(_java_bigendian)
+ SET(_java_libarch "mipsel") + SET(_java_libarch "mipsel")
+ ENDIF(_java_bigendian) + ENDIF(_java_bigendian)
+ ENDIF(CMAKE_CROSSCOMPILING) + ENDIF(CMAKE_CROSSCOMPILING)
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64") + ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64")
+ SET(_java_libarch "ppc64") + SET(_java_libarch "ppc64")
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^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") + SET(_java_libarch "sparc" "sparcv9")
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^sh.*-.*-.*$") + ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(parisc|hppa)")
+ SET(_java_libarch "parisc" "parisc64")
+ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^sh")
+ SET(_java_libarch "sh") + SET(_java_libarch "sh")
+ ELSE(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + ELSE(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+ SET(_java_libarch ${CMAKE_SYSTEM_PROCESSOR}) + SET(_java_libarch ${CMAKE_SYSTEM_PROCESSOR})

Loading…
Cancel
Save