# HG changeset patch # User Andrew John Hughes # Date 1471398826 -3600 # Node ID 8b26ecee36700b1ee3bc12d1b78486318ebeb723 # Parent d247f1787f04f0540a9087faa75340e5b7d76f20 Update to build against July 2016 security fixes (b40). Upstream changes: - S4893408: JPEGReader throws IllegalArgException when setting the destination to BYTE_GRAY - S6496269: Many warnings generated from com/sun/java/util/jar/pack/*.cpp when compiled on Linux - S6522789: [zh_CN] translation of "enclosing class" in doclet is incorrect - S6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles) - S6579775: l10n update after 6212566 - S6600143: Remove another 450 unnecessary casts - S6611629: Avoid hardcoded cygwin paths for memory detection - S6631559: Registration of ImageIO plugins should not cause loading of jpeg.dlli and cmm.dll - S6690018: RSAClientKeyExchange NullPointerException - S6714842: CertPathBuilder returns incorrect CertPath for BasicConstraints in builderParams - S6726309: Compiler warnings in nio code - S6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles - S6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2 - S6752638: java.awt.GraphicsEnvironment.preferLocaleFonts() throws NPE on Linux - S6755847: (launcher) will trigger assertions in debug build - S6791502: IIOException "Invalid icc profile" on jpeg after update from JDK5 to JDK6 - S6793818: JpegImageReader is too greedy creating color profiles - S6799141: Build with --hash-style=both so that binaries can work on SuSE 10 - S6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003 - S6852744: PIT b61: PKI test suite fails because self signed certificates are being rejected - S6864028: Update the java launcher to use the new entry point JVM_FindClassFromBootLoader - S6875904: Java 7 message synchronization 1 - S6882437: CertPath/X509CertPathDiscovery/Test fails on jdk7/pit/b62 - S6888127: java.util.jar.Pack200.Packer Memory Leak - S6888215: memory leak in jpeg plugin - S6888925: SunMSCAPI's Cipher can't use RSA public keys obtained from other sources. - S6889552: Sun provider should not require LDAP CertStore to be present - S6941936: Broken pipe error of test case DNSIdentities.java - S6951599: Rename package of security tools for modularization - S6953295: Move few sun.security.{util, x509, pkcs} classes used by keytool/jarsigner to another package - S6958026: Problem with PKCS12 keystore - S6974017: Upgrade required Solaris Studio compilers to 5.10 (12 update 1 + patches) - S6980281: SWAT: SwingSet2 got core dumped in Solaris-AMD64 using b107 swat build - S6989774: imageio compiler warnings in native code - S6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.* - S6994413: JDK_GetVersionInfo0 only expects a two digit build number - S7000225: Sanity check on sane-alsa-headers is broken - S7000752: Duplicate entry in RowSetResourceBundles.properties - S7001094: Can't initialize SunPKCS11 more times than PKCS11 driver maxSessionCount - S7003227: (pack200) intermittent failures compiling pack200 - S7004706: l10n of 7000752 Duplicate entry in RowSetResourceBundles.properties - S7006704: (pack200) add missing file for 6990106 - S7011497: Improve trust anchor searching method during cert path validation - S7017734: jdk7 message drop 1 translation integration - S7023416: (pack200) fix parfait issues - S7029680: fix test/sun/misc/Version/Version.java build parsing - S7038175: Expired PKITS certificates causing CertPathBuilder and CertPathValidator regression test failures - S7038711: Fix CC_VER checks for compiler options, fix use of -Wno-clobber - S7050826: Hebrew characters are not rendered on OEL 5.6 - S7055363: jdk_security3 test target cleanup - S7060849: Eliminate pack200 build warnings - S7064075: Security libraries don't build with javac -Xlint:all,-deprecation -Werror - S7069870: Parts of the JDK erroneously rely on generic array initializers with diamond - S7081817: test/sun/security/provider/certpath/X509CertPath/IllegalCertiticates.java failing - S7092825: javax.crypto.Cipher.Transform.patternCache is synchronizedMap and became scalability bottleneck. - S7105780: Add SSLSocket client/SSLEngine server to templates directory - S7107613: scalability blocker in javax.crypto.CryptoPermissions - S7107616: scalability blocker in javax.crypto.JceSecurityManager - S7109274: Restrict the use of certificates with RSA keys less than 1024 bits - S7129083: CookieManager does not store cookies if url is read before setting cookie manager - S7152582: PKCS11 tests should use the NSS libraries available in the OS - S7166955: (pack200) JNI_GetCreatedJavaVMs needs additional checking - S7196855: autotest.sh fails on ubuntu because libsoftokn.so not found - S7200682: TEST_BUG: keytool/autotest.sh still has problems with libsoftokn.so - S8002306: (se) Selector.open fails if invoked with thread interrupt status set [win] - S8009634: TEST_BUG: sun/misc/Version/Version.java handle 2 digit minor in VM version - S8010166: TEST_BUG: fix for 8009634 overlooks possible version strings (sun/misc/Version/Version.java) - S8013228: Create new system properties to control allowable OCSP clock skew and CRL connection timeout - S8019341: Update CookieHttpsClientTest to use the newer framework. - S8022228: Intermittent test failures in sun/security/ssl/javax/net/ssl/NewAPIs - S8022594: Potential deadlock in of sun.nio.ch.Util/IOUtil - S8023546: sun/security/mscapi/ShortRSAKey1024.sh fails intermittently - S8026794: Test tools/pack200/TimeStamp.java fails while opening golden.jar.native.IST on linux-ppc(v2) - S8027026: Change keytool -genkeypair to use -keyalg RSA - S8029177: [Parfait] warnings from b117 for jdk.src.share.native.com.sun.java.util.jar: JNI exception pending - S8029646: [pack200] should support the new zip64 format. - S8036612: [parfait] JNI exception pending in jdk/src/windows/native/sun/security/mscapi/security.cpp - S8037557: test SessionCacheSizeTests.java timeout - S8074839: Resolve disabled warnings for libunpack and the unpack200 binary - S8079410: Hotspot version to share the same update and build version from JDK - S8079718: IIOP Input Stream Hooking - S8130735: javax.swing.TimerQueue: timer fires late when another timer starts - S8139436: sun.security.mscapi.KeyStore might load incomplete data - S8140344: add support for 3 digit update release numbers - S8144313: Test SessionTimeOutTests can be timeout - S8145017: Add support for 3 digit hotspot minor version numbers - S8145446: Perfect pipe placement - S8146387: Test SSLSession/SessionCacheSizeTests socket accept timed out - S8146669: Test SessionTimeOutTests fails intermittently - S8146993: Several javax/management/remote/mandatory regression tests fail after JDK-8138811 - S8147771: Construction of static protection domains under Javax custom policy - S8147857: [TEST] RMIConnector logs attribute names incorrectly - S8148872: Complete name checking - S8149962: Better delineation of XML processing - S8150752: Share Class Data - S8151841: Build needs additional flags to compile with GCC 6 - S8151876: (tz) Support tzdata2016d - S8151925: Font reference improvements - S8152479: Coded byte streams - S8155981: Bolster bytecode verification - S8161262: Fix jdk build with gcc 4.1.2: -fno-strict-overflow not known. - S8162344: The API changes made by CR 7064075 need to be reverted - S8162818: Sync src/share/native/com/sun/media code with OpenJDK 7 - S8162828: Sync imageioJPEG.c with initial OpenJDK 7 version - S8163022: Remove @Override annotation on interfaces added by 2016/04 security fixes - S8164181: Remove @Override annotation on interfaces added by 2016/07 security fixes ChangeLog: 2016-08-16 Andrew John Hughes * patches/imageiojpeg_sync.patch, * patches/openjdk/4893408-jpegreader_byte_gray.patch, * patches/openjdk/6563752-ss12_support.patch, * patches/openjdk/6631559-dont_load_libjpeg_to_register_imageio_plugins.patch, * patches/openjdk/6729772-opt_cleanup.patch, * patches/openjdk/6791502-invalid_icc_profile.patch, * patches/openjdk/6793818-jpegimagereader_too_greedy.patch, * patches/openjdk/6799141-split_out_versions.patch, * patches/openjdk/6816311-compiler_name.patch, * patches/openjdk/6888215-jpeg_memory_leak.patch, * patches/openjdk/6974017-minorver_for_solaris.patch, * patches/openjdk/6980281-majorver_for_solaris.patch, * patches/openjdk/6989774-imageio_compiler_warnings.patch, * patches/openjdk/7000225-bad_tabs.patch, * patches/openjdk/7038711-fix_no-clobber_usage.patch, * patches/parisc.patch: Removed as applied upstream. * Makefile.am: (ICEDTEA_PATCHES): Remove deleted patches. * NEWS: Updated with b40 changes. Correct 1.13.11 release notes to mention b39, not b38. * patches/arch.patch: Drop hunk in jdk/make/common/shared/Compiler-gcc.gmk as compiler versions are no longer specified by architecture on GNU/Linux, following 6799141. * patches/ecj/override.patch: Remove sections included in upstream 8163022. * patches/linker-libs-order.patch: Drop ALSA chunk in make/common/shared/Sanity.gmk as version is now obtained from header file following 6799141. * patches/openjdk/7025066-embedded_build.patch: Regenerated. * patches/openjdk/7199862-pr2198-ensure_cache_connection_still_alive.patch: Remove cast from context as it no longer exists following 6600143. diff -r d247f1787f04 -r 8b26ecee3670 ChangeLog --- a/ChangeLog Tue Aug 16 03:15:54 2016 +0100 +++ b/ChangeLog Wed Aug 17 02:53:46 2016 +0100 @@ -1,3 +1,42 @@ +2016-08-16 Andrew John Hughes + + * patches/imageiojpeg_sync.patch, + * patches/openjdk/4893408-jpegreader_byte_gray.patch, + * patches/openjdk/6563752-ss12_support.patch, + * patches/openjdk/6631559-dont_load_libjpeg_to_register_imageio_plugins.patch, + * patches/openjdk/6729772-opt_cleanup.patch, + * patches/openjdk/6791502-invalid_icc_profile.patch, + * patches/openjdk/6793818-jpegimagereader_too_greedy.patch, + * patches/openjdk/6799141-split_out_versions.patch, + * patches/openjdk/6816311-compiler_name.patch, + * patches/openjdk/6888215-jpeg_memory_leak.patch, + * patches/openjdk/6974017-minorver_for_solaris.patch, + * patches/openjdk/6980281-majorver_for_solaris.patch, + * patches/openjdk/6989774-imageio_compiler_warnings.patch, + * patches/openjdk/7000225-bad_tabs.patch, + * patches/openjdk/7038711-fix_no-clobber_usage.patch, + * patches/parisc.patch: + Removed as applied upstream. + * Makefile.am: + (ICEDTEA_PATCHES): Remove deleted patches. + * NEWS: Updated with b40 changes. Correct + 1.13.11 release notes to mention b39, not b38. + * patches/arch.patch: + Drop hunk in jdk/make/common/shared/Compiler-gcc.gmk + as compiler versions are no longer specified by + architecture on GNU/Linux, following 6799141. + * patches/ecj/override.patch: + Remove sections included in upstream 8163022. + * patches/linker-libs-order.patch: + Drop ALSA chunk in make/common/shared/Sanity.gmk + as version is now obtained from header file + following 6799141. + * patches/openjdk/7025066-embedded_build.patch: + Regenerated. + * patches/openjdk/7199862-pr2198-ensure_cache_connection_still_alive.patch: + Remove cast from context as it no longer exists + following 6600143. + 2016-08-15 Andrew John Hughes PR3143: Fix typo in --with-openjdk-src-dir diff -r d247f1787f04 -r 8b26ecee3670 Makefile.am --- a/Makefile.am Tue Aug 16 03:15:54 2016 +0100 +++ b/Makefile.am Wed Aug 17 02:53:46 2016 +0100 @@ -335,12 +335,6 @@ $(UPSTREAMED_PATCHES) \ patches/openjdk/6733501-icedtea_lcms_test.patch \ $(LCMS_PATCHES) \ - patches/openjdk/6791502-invalid_icc_profile.patch \ - patches/openjdk/6793818-jpegimagereader_too_greedy.patch \ - patches/openjdk/6631559-dont_load_libjpeg_to_register_imageio_plugins.patch \ - patches/openjdk/4893408-jpegreader_byte_gray.patch \ - patches/openjdk/6888215-jpeg_memory_leak.patch \ - patches/openjdk/6989774-imageio_compiler_warnings.patch \ patches/openjdk/7018912-potential_buffer_overruns_in_jpeg.patch \ patches/openjdk/6989760-native_warnings.patch \ patches/openjdk/7013519-integer_overflows.patch \ @@ -376,7 +370,6 @@ patches/network-unreachable.patch \ patches/dnd-filelists.patch \ patches/explicit-target-arch.patch \ - patches/parisc.patch \ patches/policy-evaluation.patch \ patches/openjdk/6959123-libpng_14.patch \ patches/applet_hole.patch \ @@ -532,17 +525,8 @@ patches/print_lsb_release.patch \ patches/alternative_krb5_cache.patch \ patches/alternative_krb5_cache_fixup.patch \ - patches/imageiojpeg_sync.patch \ patches/openjdk/8005194-scale_memory_leak.patch \ - patches/openjdk/6563752-ss12_support.patch \ - patches/openjdk/6729772-opt_cleanup.patch \ - patches/openjdk/6799141-split_out_versions.patch \ patches/freetypeversion.patch \ - patches/openjdk/6816311-compiler_name.patch \ - patches/openjdk/6974017-minorver_for_solaris.patch \ - patches/openjdk/6980281-majorver_for_solaris.patch \ - patches/openjdk/7000225-bad_tabs.patch \ - patches/openjdk/7038711-fix_no-clobber_usage.patch \ patches/disable-cc-incompatible-sanity-checks.patch \ patches/rh995488-rhel_tz_fix.patch \ patches/hotspot/hs23/remove_jsr292_tests.patch \ diff -r d247f1787f04 -r 8b26ecee3670 NEWS --- a/NEWS Tue Aug 16 03:15:54 2016 +0100 +++ b/NEWS Wed Aug 17 02:53:46 2016 +0100 @@ -18,6 +18,95 @@ - PR1372: Provide option to build without debugging - PR2083: Add support for building Zero on AArch64 - PR3112: Provide option to disable SystemTap tests +* Security fixes + - S8079718, CVE-2016-3458: IIOP Input Stream Hooking + - S8145446, CVE-2016-3485: Perfect pipe placement (Windows only) + - S8147771: Construction of static protection domains under Javax custom policy + - S8148872, CVE-2016-3500: Complete name checking + - S8149962, CVE-2016-3508: Better delineation of XML processing + - S8150752: Share Class Data + - S8151925: Font reference improvements + - S8152479, CVE-2016-3550: Coded byte streams + - S8155981, CVE-2016-3606: Bolster bytecode verification +* Import of OpenJDK6 b40 + - S6496269: Many warnings generated from com/sun/java/util/jar/pack/*.cpp when compiled on Linux + - S6522789: [zh_CN] translation of "enclosing class" in doclet is incorrect + - S6579775: l10n update after 6212566 + - S6600143: Remove another 450 unnecessary casts + - S6611629: Avoid hardcoded cygwin paths for memory detection + - S6690018: RSAClientKeyExchange NullPointerException + - S6714842: CertPathBuilder returns incorrect CertPath for BasicConstraints in builderParams + - S6726309: Compiler warnings in nio code + - S6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles + - S6755847: (launcher) will trigger assertions in debug build + - S6864028: Update the java launcher to use the new entry point JVM_FindClassFromBootLoader + - S6875904: Java 7 message synchronization 1 + - S6882437: CertPath/X509CertPathDiscovery/Test fails on jdk7/pit/b62 + - S6888127: java.util.jar.Pack200.Packer Memory Leak + - S6888925: SunMSCAPI's Cipher can't use RSA public keys obtained from other sources. + - S6889552: Sun provider should not require LDAP CertStore to be present + - S6951599: Rename package of security tools for modularization + - S6953295: Move few sun.security.{util, x509, pkcs} classes used by keytool/jarsigner to another package + - S6958026: Problem with PKCS12 keystore + - S6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.* + - S6994413: JDK_GetVersionInfo0 only expects a two digit build number + - S7000752: Duplicate entry in RowSetResourceBundles.properties + - S7001094: Can't initialize SunPKCS11 more times than PKCS11 driver maxSessionCount + - S7003227: (pack200) intermittent failures compiling pack200 + - S7004706: l10n of 7000752 Duplicate entry in RowSetResourceBundles.properties + - S7006704: (pack200) add missing file for 6990106 + - S7011497: Improve trust anchor searching method during cert path validation + - S7017734: jdk7 message drop 1 translation integration + - S7023416: (pack200) fix parfait issues + - S7029680: fix test/sun/misc/Version/Version.java build parsing + - S7038175: Expired PKITS certificates causing CertPathBuilder and CertPathValidator regression test failures + - S7055363: jdk_security3 test target cleanup + - S7060849: Eliminate pack200 build warnings + - S7064075: Security libraries don't build with javac -Xlint:all,-deprecation -Werror + - S7081817: test/sun/security/provider/certpath/X509CertPath/IllegalCertiticates.java failing + - S7092825: javax.crypto.Cipher.Transform.patternCache is synchronizedMap and became scalability bottleneck. + - S7105780: Add SSLSocket client/SSLEngine server to templates directory + - S7107613: scalability blocker in javax.crypto.CryptoPermissions + - S7107616: scalability blocker in javax.crypto.JceSecurityManager + - S7109274: Restrict the use of certificates with RSA keys less than 1024 bits + - S7129083: CookieManager does not store cookies if url is read before setting cookie manager + - S7152582: PKCS11 tests should use the NSS libraries available in the OS + - S7166955: (pack200) JNI_GetCreatedJavaVMs needs additional checking + - S7196855: autotest.sh fails on ubuntu because libsoftokn.so not found + - S7200682: TEST_BUG: keytool/autotest.sh still has problems with libsoftokn.so + - S8002306: (se) Selector.open fails if invoked with thread interrupt status set [win] + - S8009634: TEST_BUG: sun/misc/Version/Version.java handle 2 digit minor in VM version + - S8010166: TEST_BUG: fix for 8009634 overlooks possible version strings (sun/misc/Version/Version.java) + - S8013228: Create new system properties to control allowable OCSP clock skew and CRL connection timeout + - S8019341: Update CookieHttpsClientTest to use the newer framework. + - S8022228: Intermittent test failures in sun/security/ssl/javax/net/ssl/NewAPIs + - S8022594: Potential deadlock in of sun.nio.ch.Util/IOUtil + - S8023546: sun/security/mscapi/ShortRSAKey1024.sh fails intermittently + - S8026794: Test tools/pack200/TimeStamp.java fails while opening golden.jar.native.IST on linux-ppc(v2) + - S8027026: Change keytool -genkeypair to use -keyalg RSA + - S8029177: [Parfait] warnings from b117 for jdk.src.share.native.com.sun.java.util.jar: JNI exception pending + - S8029646: [pack200] should support the new zip64 format. + - S8036612: [parfait] JNI exception pending in jdk/src/windows/native/sun/security/mscapi/security.cpp + - S8037557: test SessionCacheSizeTests.java timeout + - S8074839: Resolve disabled warnings for libunpack and the unpack200 binary + - S8079410: Hotspot version to share the same update and build version from JDK + - S8130735: javax.swing.TimerQueue: timer fires late when another timer starts + - S8139436: sun.security.mscapi.KeyStore might load incomplete data + - S8140344: add support for 3 digit update release numbers + - S8144313: Test SessionTimeOutTests can be timeout + - S8145017: Add support for 3 digit hotspot minor version numbers + - S8146387: Test SSLSession/SessionCacheSizeTests socket accept timed out + - S8146669: Test SessionTimeOutTests fails intermittently + - S8146993: Several javax/management/remote/mandatory regression tests fail after JDK-8138811 + - S8147857: [TEST] RMIConnector logs attribute names incorrectly + - S8151841, PR3099: Build needs additional flags to compile with GCC 6 + - S8151876: (tz) Support tzdata2016d + - S8161262: Fix jdk build with gcc 4.1.2: -fno-strict-overflow not known. + - S8162344: The API changes made by CR 7064075 need to be reverted + - S8162818: Sync src/share/native/com/sun/media code with OpenJDK 7 + - S8162828: Sync imageioJPEG.c with initial OpenJDK 7 version + - S8163022, PR2954: Remove @Override annotation on interfaces added by 2016/04 security fixes + - S8164181: Remove @Override annotation on interfaces added by 2016/07 security fixes * Backports - S2178143, PR2959: JVM crashes if the number of bound CPUs changed during runtime - S6260348, PR3068: GTK+ L&F JTextComponent not respecting desktop caret blink rate @@ -62,7 +151,7 @@ - S8144430, CVE-2016-3427: Improve JMX connections - S8146494: Better ligature substitution - S8146498: Better device table adjustments -* Import of OpenJDK6 b38 +* Import of OpenJDK6 b39 - S4459600: java -jar fails to run Main-Class if classname followed by whitespace. - S6378099: RFE: Use libfontconfig to create/synthesise a fontconfig.properties - S6452854: Provide a flag to print the java configuration diff -r d247f1787f04 -r 8b26ecee3670 patches/arch.patch --- a/patches/arch.patch Tue Aug 16 03:15:54 2016 +0100 +++ b/patches/arch.patch Wed Aug 17 02:53:46 2016 +0100 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/corba/make/common/Defs-linux.gmk openjdk/corba/make/common/Defs-linux.gmk ---- openjdk.orig/corba/make/common/Defs-linux.gmk 2010-05-26 09:31:18.000000000 +0100 -+++ openjdk/corba/make/common/Defs-linux.gmk 2015-03-31 16:43:11.850271287 +0100 +--- openjdk.orig/corba/make/common/Defs-linux.gmk 2016-08-16 02:49:01.293544691 +0100 ++++ openjdk/corba/make/common/Defs-linux.gmk 2016-08-16 04:55:35.484931454 +0100 @@ -92,9 +92,19 @@ # We need this frame pointer to make it easy to walk the stacks. # This should be the default on X86, but ia64 and amd64 may not have this @@ -22,8 +22,8 @@ LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 diff -Nru openjdk.orig/corba/make/common/shared/Platform.gmk openjdk/corba/make/common/shared/Platform.gmk ---- openjdk.orig/corba/make/common/shared/Platform.gmk 2015-03-31 15:23:48.410803372 +0100 -+++ openjdk/corba/make/common/shared/Platform.gmk 2015-03-31 16:43:11.850271287 +0100 +--- openjdk.orig/corba/make/common/shared/Platform.gmk 2016-08-16 04:54:04.406422421 +0100 ++++ openjdk/corba/make/common/shared/Platform.gmk 2016-08-16 04:55:35.484931454 +0100 @@ -220,9 +220,40 @@ else # i586 is 32-bit, amd64 is 64-bit @@ -67,9 +67,9 @@ endif endif diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk ---- openjdk.orig/jdk/make/common/Defs-linux.gmk 2015-02-05 18:49:58.372812460 +0000 -+++ openjdk/jdk/make/common/Defs-linux.gmk 2015-03-31 16:45:47.396086418 +0100 -@@ -102,10 +102,19 @@ +--- openjdk.orig/jdk/make/common/Defs-linux.gmk 2016-08-16 03:20:55.637983077 +0100 ++++ openjdk/jdk/make/common/Defs-linux.gmk 2016-08-16 04:55:35.484931454 +0100 +@@ -106,10 +106,19 @@ # We need this frame pointer to make it easy to walk the stacks. # This should be the default on X86, but ia64 and amd64 may not have this # as the default. @@ -90,81 +90,10 @@ CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 -diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2015-03-31 15:23:48.254801559 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2015-03-31 16:51:56.332405289 +0100 -@@ -70,28 +70,56 @@ - else - CXX = $(COMPILER_PATH)g++$(GCC_SUFFIX) - endif -- ifneq ("$(findstring sparc,$(ARCH))", "") -- # sparc or sparcv9 -- REQUIRED_CC_VER = 4.0 -- REQUIRED_GCC_VER = 4.0.* -- else -- ifeq ($(ARCH_DATA_MODEL), 32) -+ ifeq ($(ARCH), alpha) -+ # alpha -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifeq ($(ARCH), amd64) -+ # amd64 -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifeq ($(ARCH), arm) -+ # arm -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifeq ($(ARCH), i586) - # i586 - REQUIRED_CC_VER = 3.2 - REQUIRED_GCC_VER = 3.2.1* - REQUIRED_GCC_VER_INT = 3.2.1-7a -- else -- ifeq ($(ARCH), amd64) -- # amd64 -- REQUIRED_CC_VER = 3.2 -- REQUIRED_GCC_VER = 3.2.* - endif - ifeq ($(ARCH), ia64) - # ia64 - REQUIRED_CC_VER = 3.2 - REQUIRED_GCC_VER = 2.9[56789].* - endif -+ ifneq ("$(findstring m68k,$(ARCH))", "") -+ # m68k -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifneq ("$(findstring mips,$(ARCH))", "") -+ # mips -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifneq ("$(findstring ppc,$(ARCH))", "") -+ # ppc or ppc64 -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* - endif -+ ifneq ("$(findstring s390,$(ARCH))", "") -+ # s390 or s390x -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifneq ("$(findstring sparc,$(ARCH))", "") -+ # sparc or sparcv9 -+ REQUIRED_CC_VER = 4.0 -+ REQUIRED_GCC_VER = 4.0.* - endif - # Option used to create a shared library - SHARED_LIBRARY_FLAG = -shared diff -Nru openjdk.orig/jdk/make/common/shared/Platform.gmk openjdk/jdk/make/common/shared/Platform.gmk ---- openjdk.orig/jdk/make/common/shared/Platform.gmk 2015-03-31 15:23:48.410803372 +0100 -+++ openjdk/jdk/make/common/shared/Platform.gmk 2015-03-31 16:43:11.850271287 +0100 -@@ -222,9 +222,40 @@ +--- openjdk.orig/jdk/make/common/shared/Platform.gmk 2016-08-16 04:54:04.406422421 +0100 ++++ openjdk/jdk/make/common/shared/Platform.gmk 2016-08-16 04:55:35.484931454 +0100 +@@ -193,9 +193,40 @@ else # i586 is 32-bit, amd64 is 64-bit ifndef ARCH_DATA_MODEL @@ -207,8 +136,8 @@ endif endif diff -Nru openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk openjdk/jdk/make/javax/sound/SoundDefs.gmk ---- openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk 2013-08-21 20:32:57.524222927 +0100 -+++ openjdk/jdk/make/javax/sound/SoundDefs.gmk 2015-03-31 16:44:39.367291058 +0100 +--- openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk 2016-08-16 02:49:25.677142687 +0100 ++++ openjdk/jdk/make/javax/sound/SoundDefs.gmk 2016-08-16 04:55:35.484931454 +0100 @@ -58,10 +58,54 @@ ifeq ($(ZERO_BUILD), true) CPPFLAGS += -DX_ARCH=X_ZERO @@ -276,8 +205,8 @@ diff -Nru openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h ---- openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2013-08-21 20:32:57.952229855 +0100 -+++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2015-03-31 16:43:11.850271287 +0100 +--- openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2016-08-16 02:49:38.708927851 +0100 ++++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2016-08-16 04:55:35.484931454 +0100 @@ -33,12 +33,21 @@ #define X_LINUX 3 diff -r d247f1787f04 -r 8b26ecee3670 patches/ecj/override.patch --- a/patches/ecj/override.patch Tue Aug 16 03:15:54 2016 +0100 +++ b/patches/ecj/override.patch Wed Aug 17 02:53:46 2016 +0100 @@ -1,6 +1,127 @@ +diff -Nru openjdk-ecj.orig/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java openjdk-ecj/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java +--- openjdk-ecj.orig/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java 2016-08-16 02:49:10.269396706 +0100 ++++ openjdk-ecj/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java 2016-08-16 05:30:32.814484518 +0100 +@@ -50,17 +50,14 @@ + } + + // size of the chunk given by the parser +- @Override + public int size() { + return len; + } + +- @Override + public byte[] read() { + return data; + } + +- @Override + public long writeTo(DataFile file) { + return file.writeTo(data, 0, len); + } +@@ -70,7 +67,6 @@ + * @param buf + * @return + */ +- @Override + public Data createNext(DataHead dataHead, ByteBuffer buf) { + if (!config.isOnlyMemory() && dataHead.inMemory >= config.memoryThreshold) { + try { +diff -Nru openjdk-ecj.orig/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/client/WSServiceDelegate.java openjdk-ecj/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/client/WSServiceDelegate.java +--- openjdk-ecj.orig/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/client/WSServiceDelegate.java 2016-08-16 02:49:10.909386153 +0100 ++++ openjdk-ecj/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/client/WSServiceDelegate.java 2016-08-16 05:30:32.814484518 +0100 +@@ -644,7 +644,6 @@ + + return AccessController.doPrivileged( + new PrivilegedAction() { +- @Override + public T run() { + Object proxy = Proxy.newProxyInstance(portInterface.getClassLoader(), + new Class[]{portInterface, WSBindingProvider.class, Closeable.class}, pis); +diff -Nru openjdk-ecj.orig/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java openjdk-ecj/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java +--- openjdk-ecj.orig/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java 2016-08-16 02:49:55.380653021 +0100 ++++ openjdk-ecj/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java 2016-08-16 05:30:32.814484518 +0100 +@@ -485,7 +485,6 @@ + Receiver. Therefore, subclasses should not override this method. + Instead, they should implement implSend(). + */ +- @Override + public final synchronized void send(final MidiMessage message, + final long timeStamp) { + if (!open) { +@@ -501,7 +500,6 @@ + * Therefore, subclasses that override this method must call + * 'super.close()'. + */ +- @Override + public final void close() { + open = false; + synchronized (AbstractMidiDevice.this.traRecLock) { +diff -Nru openjdk-ecj.orig/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java openjdk-ecj/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java +--- openjdk-ecj.orig/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java 2016-08-16 02:49:24.297165438 +0100 ++++ openjdk-ecj/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java 2016-08-16 05:30:32.814484518 +0100 +@@ -1044,7 +1044,6 @@ + + targetClass = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction>() { + +- @Override + public Class run() { + try { + ReflectUtil.checkPackageAccess(className); +@@ -1118,7 +1117,6 @@ + + javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction() { + +- @Override + public Void run() { + for (int i = 0; i < sig.length; i++) { + if (tracing) { +@@ -1207,7 +1205,6 @@ + final String className = opClassName; + targetClass = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction>() { + +- @Override + public Class run() { + try { + ReflectUtil.checkPackageAccess(className); +@@ -1243,7 +1240,6 @@ + AccessControlContext stack = AccessController.getContext(); + Object rslt = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction() { + +- @Override + public Object run() { + try { + ReflectUtil.checkPackageAccess(method.getDeclaringClass()); +@@ -1680,7 +1676,6 @@ + + Class c = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction>() { + +- @Override + public Class run() { + try { + ReflectUtil.checkPackageAccess(respType); +@@ -2858,7 +2853,6 @@ + + Class c = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction>() { + +- @Override + public Class run() { + try { + ReflectUtil.checkPackageAccess(className); +diff -Nru openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java +--- openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2016-08-16 02:49:24.501162074 +0100 ++++ openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2016-08-16 05:30:32.814484518 +0100 +@@ -175,7 +175,6 @@ + this.defaultContextClassLoader = + AccessController.doPrivileged( + new PrivilegedAction() { +- @Override + public ClassLoader run() { + return new CombinedClassLoader(Thread.currentThread().getContextClassLoader(), + dcl); diff -Nru openjdk-ecj.orig/jdk/src/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java openjdk-ecj/jdk/src/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java ---- openjdk-ecj.orig/jdk/src/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java 2011-01-07 21:32:58.000000000 +0000 -+++ openjdk-ecj/jdk/src/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java 2012-06-13 17:39:06.613931192 +0100 +--- openjdk-ecj.orig/jdk/src/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java 2016-08-16 02:49:31.009054787 +0100 ++++ openjdk-ecj/jdk/src/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java 2016-08-16 05:30:32.810484583 +0100 @@ -200,7 +200,6 @@ super.uninstallListeners(); } @@ -122,8 +243,8 @@ } diff -Nru openjdk-ecj.orig/jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java openjdk-ecj/jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java ---- openjdk-ecj.orig/jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java 2012-06-13 17:24:23.771126209 +0100 -+++ openjdk-ecj/jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java 2012-06-13 17:39:06.625931390 +0100 +--- openjdk-ecj.orig/jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java 2016-08-16 02:49:31.017054654 +0100 ++++ openjdk-ecj/jdk/src/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java 2016-08-16 05:30:32.810484583 +0100 @@ -839,7 +839,6 @@ tk.addPropertyChangeListener(key, this); } @@ -149,8 +270,8 @@ String propertyName = evt.getPropertyName(); Object newValue = evt.getNewValue(); diff -Nru openjdk-ecj.orig/jdk/src/share/classes/javax/swing/plaf/synth/SynthTreeUI.java openjdk-ecj/jdk/src/share/classes/javax/swing/plaf/synth/SynthTreeUI.java ---- openjdk-ecj.orig/jdk/src/share/classes/javax/swing/plaf/synth/SynthTreeUI.java 2011-01-07 21:32:58.000000000 +0000 -+++ openjdk-ecj/jdk/src/share/classes/javax/swing/plaf/synth/SynthTreeUI.java 2012-06-13 17:39:06.625931390 +0100 +--- openjdk-ecj.orig/jdk/src/share/classes/javax/swing/plaf/synth/SynthTreeUI.java 2016-08-16 02:49:31.189051818 +0100 ++++ openjdk-ecj/jdk/src/share/classes/javax/swing/plaf/synth/SynthTreeUI.java 2016-08-16 05:30:32.814484518 +0100 @@ -154,7 +154,6 @@ tree.addPropertyChangeListener(this); } @@ -160,9 +281,9 @@ return getContext(c, getComponentState(c)); } diff -Nru openjdk-ecj.orig/jdk/src/share/classes/sun/net/www/protocol/https/HttpsClient.java openjdk-ecj/jdk/src/share/classes/sun/net/www/protocol/https/HttpsClient.java ---- openjdk-ecj.orig/jdk/src/share/classes/sun/net/www/protocol/https/HttpsClient.java 2011-01-07 21:33:02.000000000 +0000 -+++ openjdk-ecj/jdk/src/share/classes/sun/net/www/protocol/https/HttpsClient.java 2012-06-13 17:39:06.625931390 +0100 -@@ -624,7 +624,6 @@ +--- openjdk-ecj.orig/jdk/src/share/classes/sun/net/www/protocol/https/HttpsClient.java 2016-08-16 03:20:55.673982482 +0100 ++++ openjdk-ecj/jdk/src/share/classes/sun/net/www/protocol/https/HttpsClient.java 2016-08-16 05:30:32.814484518 +0100 +@@ -616,7 +616,6 @@ * a given connection may change. When sessions change, so may * peer identities and cipher suites. */ @@ -170,10 +291,21 @@ public void handshakeCompleted(HandshakeCompletedEvent event) { session = event.getSession(); +diff -Nru openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java +--- openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2016-08-16 03:20:55.641983012 +0100 ++++ openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2016-08-16 05:31:55.249125351 +0100 +@@ -216,7 +216,6 @@ + /** + * Return bit length of the key. + */ +- @Override + public int length() { + return keyLength; + } diff -Nru openjdk-ecj.orig/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java openjdk-ecj/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java ---- openjdk-ecj.orig/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java 2011-01-07 21:33:03.000000000 +0000 -+++ openjdk-ecj/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java 2012-06-13 17:39:06.625931390 +0100 -@@ -572,7 +572,7 @@ +--- openjdk-ecj.orig/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java 2016-08-16 03:20:55.681982351 +0100 ++++ openjdk-ecj/jdk/src/share/classes/sun/security/provider/certpath/OCSPResponse.java 2016-08-16 05:30:32.814484518 +0100 +@@ -606,7 +606,7 @@ /* * Return the certificate's revocation status code */ @@ -182,7 +314,7 @@ return certStatus; } -@@ -580,11 +580,11 @@ +@@ -614,11 +614,11 @@ return certId; } @@ -197,9 +329,9 @@ } diff -Nru openjdk-ecj.orig/jdk/src/share/classes/sun/security/x509/X509CRLEntryImpl.java openjdk-ecj/jdk/src/share/classes/sun/security/x509/X509CRLEntryImpl.java ---- openjdk-ecj.orig/jdk/src/share/classes/sun/security/x509/X509CRLEntryImpl.java 2012-06-13 17:24:23.775126276 +0100 -+++ openjdk-ecj/jdk/src/share/classes/sun/security/x509/X509CRLEntryImpl.java 2012-06-13 17:39:26.934270733 +0100 -@@ -463,7 +463,7 @@ +--- openjdk-ecj.orig/jdk/src/share/classes/sun/security/x509/X509CRLEntryImpl.java 2016-08-16 03:20:55.677982417 +0100 ++++ openjdk-ecj/jdk/src/share/classes/sun/security/x509/X509CRLEntryImpl.java 2016-08-16 05:30:32.814484518 +0100 +@@ -461,7 +461,7 @@ return (CertificateIssuerExtension) getExtension(PKIXExtensions.CertificateIssuer_Id); } @@ -209,9 +341,9 @@ int compSerial = getSerialNumber().compareTo(that.getSerialNumber()); if (compSerial != 0) { diff -Nru openjdk-ecj.orig/jdk/src/share/classes/sun/security/x509/X509CRLImpl.java openjdk-ecj/jdk/src/share/classes/sun/security/x509/X509CRLImpl.java ---- openjdk-ecj.orig/jdk/src/share/classes/sun/security/x509/X509CRLImpl.java 2012-06-13 17:24:23.779126343 +0100 -+++ openjdk-ecj/jdk/src/share/classes/sun/security/x509/X509CRLImpl.java 2012-06-13 17:39:06.625931390 +0100 -@@ -1277,7 +1277,6 @@ +--- openjdk-ecj.orig/jdk/src/share/classes/sun/security/x509/X509CRLImpl.java 2016-08-16 03:20:55.677982417 +0100 ++++ openjdk-ecj/jdk/src/share/classes/sun/security/x509/X509CRLImpl.java 2016-08-16 05:30:32.814484518 +0100 +@@ -1281,7 +1281,6 @@ return hashcode; } @@ -219,90 +351,9 @@ public int compareTo(X509IssuerSerial another) { int cissuer = issuer.toString() .compareTo(another.issuer.toString()); -diff -Nru openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java ---- openjdk-ecj.orig/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-10-11 19:58:37.130814619 +0100 -+++ openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectionImpl.java 2012-10-11 19:59:39.699829277 +0100 -@@ -168,7 +168,6 @@ - this.defaultContextClassLoader = - AccessController.doPrivileged( - new PrivilegedAction() { -- @Override - public ClassLoader run() { - return new CombinedClassLoader(Thread.currentThread().getContextClassLoader(), - dcl); -diff -Nru openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java ---- openjdk-ecj.orig/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2012-10-11 20:18:07.340676704 +0100 -+++ openjdk-ecj/jdk/src/share/classes/sun/security/pkcs11/P11Key.java 2012-10-11 20:17:40.092039288 +0100 -@@ -216,7 +216,6 @@ - /** - * Return bit length of the key. - */ -- @Override - public int length() { - return keyLength; - } -diff -Nru openjdk-ecj.orig/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java openjdk-ecj/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java ---- openjdk-ecj.orig/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java 2013-04-16 16:35:02.573376655 +0100 -+++ openjdk-ecj/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java 2013-04-16 16:37:00.267265360 +0100 -@@ -50,17 +50,14 @@ - } - - // size of the chunk given by the parser -- @Override - public int size() { - return len; - } - -- @Override - public byte[] read() { - return data; - } - -- @Override - public long writeTo(DataFile file) { - return file.writeTo(data, 0, len); - } -@@ -70,7 +67,6 @@ - * @param buf - * @return - */ -- @Override - public Data createNext(DataHead dataHead, ByteBuffer buf) { - if (!config.isOnlyMemory() && dataHead.inMemory >= config.memoryThreshold) { - try { -diff -Nru openjdk-ecj.orig/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/client/WSServiceDelegate.java openjdk-ecj/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/client/WSServiceDelegate.java ---- openjdk-ecj.orig/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/client/WSServiceDelegate.java 2013-04-16 16:35:53.298190677 +0100 -+++ openjdk-ecj/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/ws/client/WSServiceDelegate.java 2013-04-16 16:36:17.818584168 +0100 -@@ -644,7 +644,6 @@ - - return AccessController.doPrivileged( - new PrivilegedAction() { -- @Override - public T run() { - Object proxy = Proxy.newProxyInstance(portInterface.getClassLoader(), - new Class[]{portInterface, WSBindingProvider.class, Closeable.class}, pis); -diff -Nru openjdk-ecj.orig/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java openjdk-ecj/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java ---- openjdk-ecj.orig/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java 2013-04-16 17:23:26.739938611 +0100 -+++ openjdk-ecj/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java 2013-04-16 17:24:03.072520033 +0100 -@@ -483,7 +483,6 @@ - Receiver. Therefore, subclasses should not override this method. - Instead, they should implement implSend(). - */ -- @Override - public final synchronized void send(final MidiMessage message, - final long timeStamp) { - if (!open) { -@@ -499,7 +498,6 @@ - * Therefore, subclasses that override this method must call - * 'super.close()'. - */ -- @Override - public final void close() { - open = false; - synchronized (AbstractMidiDevice.this.traRecLock) { diff -Nru openjdk-ecj.orig/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java openjdk-ecj/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java ---- openjdk-ecj.orig/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java 2011-01-07 21:33:03.000000000 +0000 -+++ openjdk-ecj/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java 2012-06-13 17:39:06.625931390 +0100 +--- openjdk-ecj.orig/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java 2016-08-16 02:49:56.796629679 +0100 ++++ openjdk-ecj/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java 2016-08-16 05:30:32.814484518 +0100 @@ -701,7 +701,6 @@ this.delegate = delegate; } @@ -311,291 +362,3 @@ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { Component c = delegate.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); -diff -Nru openjdk.orig/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java openjdk/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java ---- openjdk-ecj.orig/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java 2013-03-19 13:40:24.027496931 +0000 -+++ openjdk-ecj/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java 2013-03-19 13:40:56.968026902 +0000 -@@ -1040,7 +1040,6 @@ - - targetClass = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction>() { - -- @Override - public Class run() { - try { - ReflectUtil.checkPackageAccess(className); -@@ -1114,7 +1113,6 @@ - - javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction() { - -- @Override - public Void run() { - for (int i = 0; i < sig.length; i++) { - if (tracing) { -@@ -1203,7 +1201,6 @@ - final String className = opClassName; - targetClass = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction>() { - -- @Override - public Class run() { - try { - ReflectUtil.checkPackageAccess(className); -@@ -1239,7 +1236,6 @@ - AccessControlContext stack = AccessController.getContext(); - Object rslt = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction() { - -- @Override - public Object run() { - try { - ReflectUtil.checkPackageAccess(method.getDeclaringClass()); -@@ -1676,7 +1672,6 @@ - - Class c = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction>() { - -- @Override - public Class run() { - try { - ReflectUtil.checkPackageAccess(respType); -@@ -2854,7 +2849,6 @@ - - Class c = javaSecurityAccess.doIntersectionPrivilege(new PrivilegedAction>() { - -- @Override - public Class run() { - try { - ReflectUtil.checkPackageAccess(className); -diff -r 545db1dd8c2a src/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java ---- openjdk-ecj/jdk/src/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java Wed May 04 23:23:55 2016 +0100 -+++ openjdk-ecj/jdk/src/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java Thu May 12 01:30:54 2016 +0100 -@@ -1870,7 +1870,6 @@ - - private ModifiableClassLoaderRepository getInstantiatorCLR() { - return AccessController.doPrivileged(new PrivilegedAction() { -- @Override - public ModifiableClassLoaderRepository run() { - return instantiator != null ? instantiator.getClassLoaderRepository() : null; - } -diff -r 545db1dd8c2a src/share/classes/com/sun/media/sound/Platform.java ---- openjdk-ecj/jdk/src/share/classes/com/sun/media/sound/Platform.java Wed May 04 23:23:55 2016 +0100 -+++ openjdk-ecj/jdk/src/share/classes/com/sun/media/sound/Platform.java Thu May 12 01:30:54 2016 +0100 -@@ -160,7 +160,6 @@ - try { - // load the main library - AccessController.doPrivileged(new PrivilegedAction() { -- @Override - public Void run() { - System.loadLibrary(libNameMain); - return null; -@@ -182,7 +181,6 @@ - final String lib = st.nextToken(); - try { - AccessController.doPrivileged(new PrivilegedAction() { -- @Override - public Void run() { - System.loadLibrary(lib); - return null; -diff -r 545db1dd8c2a src/share/classes/java/awt/EventQueue.java ---- openjdk-ecj/jdk/src/share/classes/java/awt/EventQueue.java Wed May 04 23:23:55 2016 +0100 -+++ openjdk-ecj/jdk/src/share/classes/java/awt/EventQueue.java Thu May 12 01:30:54 2016 +0100 -@@ -190,7 +190,6 @@ - EventQueue.invokeAndWait(source, r); - } - -- @Override - public long getMostRecentEventTime(EventQueue eventQueue) { - return eventQueue.getMostRecentEventTimeImpl(); - } -diff -r 545db1dd8c2a src/share/classes/java/io/ObjectInputStream.java ---- openjdk-ecj/jdk/src/share/classes/java/io/ObjectInputStream.java Wed May 04 23:23:55 2016 +0100 -+++ openjdk-ecj/jdk/src/share/classes/java/io/ObjectInputStream.java Thu May 12 01:30:54 2016 +0100 -@@ -3571,7 +3571,6 @@ - } - static { - SharedSecrets.setJavaObjectInputStreamAccess(new JavaObjectInputStreamAccess() { -- @Override - public void setValidator(ObjectInputStream ois, ObjectStreamClassValidator validator) { - ObjectInputStream.setValidator(ois, validator); - } -diff -r 545db1dd8c2a src/share/classes/java/rmi/server/RemoteObjectInvocationHandler.java ---- openjdk-ecj/jdk/src/share/classes/java/rmi/server/RemoteObjectInvocationHandler.java Wed May 04 23:23:55 2016 +0100 -+++ openjdk-ecj/jdk/src/share/classes/java/rmi/server/RemoteObjectInvocationHandler.java Thu May 12 01:30:54 2016 +0100 -@@ -64,7 +64,6 @@ - final String propName = "sun.rmi.server.invocationhandler.allowFinalizeInvocation"; - String allowProp = java.security.AccessController.doPrivileged( - new PrivilegedAction() { -- @Override - public String run() { - return System.getProperty(propName); - } -diff -r 545db1dd8c2a src/share/classes/sun/awt/image/SunVolatileImage.java ---- openjdk-ecj/jdk/src/share/classes/sun/awt/image/SunVolatileImage.java Wed May 04 23:23:55 2016 +0100 -+++ openjdk-ecj/jdk/src/share/classes/sun/awt/image/SunVolatileImage.java Thu May 12 01:30:54 2016 +0100 -@@ -262,7 +262,6 @@ - * - * @see sun.java2d.DestSurfaceProvider#getDestSurface - */ -- @Override - public Surface getDestSurface() { - return volSurfaceManager.getPrimarySurfaceData(); - } -diff -r 545db1dd8c2a src/share/classes/sun/java2d/SunGraphics2D.java ---- openjdk-ecj/jdk/src/share/classes/sun/java2d/SunGraphics2D.java Wed May 04 23:23:55 2016 +0100 -+++ openjdk-ecj/jdk/src/share/classes/sun/java2d/SunGraphics2D.java Thu May 12 01:30:54 2016 +0100 -@@ -3294,7 +3294,6 @@ - * - * @see sun.java2d.DestSurfaceProvider#getDestSurface - */ -- @Override - public Surface getDestSurface() { - return surfaceData; - } -diff -r 545db1dd8c2a src/share/classes/sun/rmi/server/UnicastServerRef.java ---- openjdk-ecj/jdk/src/share/classes/sun/rmi/server/UnicastServerRef.java Wed May 04 23:23:55 2016 +0100 -+++ openjdk-ecj/jdk/src/share/classes/sun/rmi/server/UnicastServerRef.java Thu May 12 01:30:54 2016 +0100 -@@ -630,12 +630,10 @@ - this.callID = callID; - } - -- @Override - public void validateDescriptor(ObjectStreamClass descriptor) { - descriptorCheck.check(method, descriptor, parameterIndex, callID); - } - -- @Override - public void checkProxyInterfaceNames(String[] ifaces) { - descriptorCheck.checkProxyClass(method, ifaces, parameterIndex, callID); - } -diff -r 545db1dd8c2a src/share/classes/sun/rmi/transport/Transport.java ---- openjdk-ecj/jdk/src/share/classes/sun/rmi/transport/Transport.java Wed May 04 23:23:55 2016 +0100 -+++ openjdk-ecj/jdk/src/share/classes/sun/rmi/transport/Transport.java Thu May 12 01:30:54 2016 +0100 -@@ -133,7 +133,6 @@ - */ - private static void setContextClassLoader(final ClassLoader ccl) { - AccessController.doPrivileged(new PrivilegedAction () { -- @Override - public Void run() { - Thread.currentThread().setContextClassLoader(ccl); - return null; -diff -r 545db1dd8c2a src/share/classes/sun/rmi/transport/tcp/TCPTransport.java ---- openjdk-ecj/jdk/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java Wed May 04 23:23:55 2016 +0100 -+++ openjdk-ecj/jdk/src/share/classes/sun/rmi/transport/tcp/TCPTransport.java Thu May 12 01:30:54 2016 +0100 -@@ -676,7 +676,6 @@ - connectionCount.incrementAndGet() + - ")-" + remoteHost); - AccessController.doPrivileged(new PrivilegedAction() { -- @Override - public Void run() { - run0(); - return null; -diff -r 545db1dd8c2a src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.java ---- openjdk-ecj/jdk/src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.java Wed May 04 23:23:55 2016 +0100 -+++ openjdk-ecj/jdk/src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.java Thu May 12 01:30:54 2016 +0100 -@@ -92,7 +92,6 @@ - return this; - } - -- @Override - public SurfaceData createManagedSurface(int w, int h, int transparency) { - return GLXSurfaceData.createData(this, w, h, - getColorModel(transparency), -@@ -165,12 +164,10 @@ - * Returns true if the provided capability bit is present for this config. - * See OGLContext.java for a list of supported capabilities. - */ -- @Override - public final boolean isCapPresent(int cap) { - return ((oglCaps.getCaps() & cap) != 0); - } - -- @Override - public final long getNativeConfigInfo() { - return pConfigInfo; - } -@@ -180,7 +177,6 @@ - * - * @see sun.java2d.pipe.hw.BufferedContextProvider#getContext - */ -- @Override - public final OGLContext getContext() { - return context; - } -@@ -394,7 +390,6 @@ - * - * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage - */ -- @Override - public VolatileImage - createCompatibleVolatileImage(int width, int height, - int transparency, int type) -@@ -434,17 +429,14 @@ - * - * @see sun.java2d.pipe.hw.AccelGraphicsConfig#getContextCapabilities - */ -- @Override - public ContextCapabilities getContextCapabilities() { - return oglCaps; - } - -- @Override - public void addDeviceEventListener(AccelDeviceEventListener l) { - AccelDeviceEventNotifier.addListener(l, screen.getScreen()); - } - -- @Override - public void removeDeviceEventListener(AccelDeviceEventListener l) { - AccelDeviceEventNotifier.removeListener(l); - } -diff -r 545db1dd8c2a src/share/classes/com/sun/jmx/mbeanserver/JmxMBeanServer.java ---- openjdk-ecj/jdk/src/share/classes/com/sun/jmx/mbeanserver/JmxMBeanServer.java Wed May 04 23:23:55 2016 +0100 -+++ openjdk-ecj/jdk/src/share/classes/com/sun/jmx/mbeanserver/JmxMBeanServer.java Thu May 12 01:51:42 2016 +0100 -@@ -236,7 +236,6 @@ - final MBeanInstantiator fInstantiator = instantiator; - this.secureClr = new - SecureClassLoaderRepository(AccessController.doPrivileged(new PrivilegedAction() { -- @Override - public ClassLoaderRepository run() { - return fInstantiator.getClassLoaderRepository(); - } -@@ -1257,7 +1256,6 @@ - ClassLoader myLoader = outerShell.getClass().getClassLoader(); - final ModifiableClassLoaderRepository loaders = AccessController.doPrivileged(new PrivilegedAction() { - -- @Override - public ModifiableClassLoaderRepository run() { - return instantiator.getClassLoaderRepository(); - } -diff -r b72e7b89dda9 src/share/classes/javax/management/remote/rmi/RMIJRMPServerImpl.java ---- openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIJRMPServerImpl.java Thu Sep 08 11:00:33 2011 -0700 -+++ openjdk-ecj/jdk/src/share/classes/javax/management/remote/rmi/RMIJRMPServerImpl.java Thu May 12 16:39:37 2016 +0100 -@@ -227,17 +227,14 @@ - allowedTypes = credentialsTypes; - } - -- @Override - public String getVersion() throws RemoteException { - return impl.getVersion(); - } - -- @Override - public RMIConnection newClient(Object credentials) throws IOException { - return impl.newClient(credentials); - } - -- @Override - public void check(Method method, ObjectStreamClass descriptor, - int paramIndex, int callID) { - -@@ -247,7 +244,6 @@ - } - } - -- @Override - public void checkProxyClass(Method method, String[] ifaces, - int paramIndex, int callID) { - if (ifaces != null && ifaces.length > 0) { -@@ -259,7 +255,6 @@ - } - } - -- @Override - public void end(int callID) { - /* Do nothing */ - } diff -r d247f1787f04 -r 8b26ecee3670 patches/imageiojpeg_sync.patch --- a/patches/imageiojpeg_sync.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,217 +0,0 @@ -diff -Nru openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c ---- openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2013-08-30 18:50:38.238272213 +0100 -+++ openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2013-08-30 18:57:43.240892673 +0100 -@@ -447,9 +447,6 @@ - pixelBuffer pixelBuf; // Buffer for pixels - - jboolean abortFlag; // Passed down from Java abort method -- -- UINT8 scale[MAX_BANDS][NUM_INPUT_VALUES]; -- int bandSizes[MAX_BANDS]; // For scaling to-from non-8-bit images - } imageIOData, *imageIODataPtr; - - /* -@@ -487,12 +484,6 @@ - - data->abortFlag = JNI_FALSE; - -- for (i = 0; i < MAX_BANDS; i ++) { -- data->bandSizes[i] = 0; -- for (j = 0; j < NUM_INPUT_VALUES; j++) { -- data->scale[i][j] = 0; -- } -- } - return data; - } - -@@ -1978,34 +1969,6 @@ - - (*env)->ReleaseIntArrayElements(env, srcBands, body, JNI_ABORT); - -- bandSize = (*env)->GetIntArrayElements(env, bandSizes, NULL); -- -- for (i = 0; i < numBands; i++) { -- if (bandSize[i] != JPEG_BAND_SIZE) { -- mustScale = TRUE; -- break; -- } -- } -- -- if (mustScale) { -- // Build any scale tables that aren't already OK -- for (i = 0; i < numBands; i++) { -- if (data->bandSizes[i] != bandSize[i]) { -- data->bandSizes[i] = bandSize[i]; -- maxBandValue = (1 << bandSize[i]) - 1; -- halfMaxBandValue = maxBandValue >> 1; -- for (j = 0; j <= maxBandValue; j++) { -- data->scale[i][j] = -- (UINT8)((j*MAX_JPEG_BAND_VALUE -- + halfMaxBandValue)/maxBandValue); -- } -- } -- } -- } -- -- (*env)->ReleaseIntArrayElements(env, bandSizes, -- bandSize, JNI_ABORT); -- - #ifdef DEBUG_IIO_JPEG - printf("---- in reader.read ----\n"); - printf("numBands is %d\n", numBands); -@@ -2028,15 +1991,6 @@ - return data->abortFlag; // We already threw an out of memory exception - } - -- // Allocate a 1-scanline buffer -- if (cinfo->num_components <= 0 || -- cinfo->image_width > (UINT_MAX / (unsigned int)cinfo->num_components)) -- { -- RELEASE_ARRAYS(env, data, src->next_input_byte); -- JNU_ThrowByName(env, "javax/imageio/IIOException", -- "Invalid number of color components"); -- return data->abortFlag; -- } - /* Establish the setjmp return context for sun_jpeg_error_exit to use. */ - jerr = (sun_jpeg_error_ptr) cinfo->err; - -@@ -2154,15 +2108,8 @@ - - // Now mangle it into our buffer - out = data->pixelBuf.buf.bp; -- if (mustScale) { -- for (in = scanLinePtr+sourceXStart*cinfo->num_components; -- in < pixelLimit; -- in += pixelStride) { -- for (i = 0; i < numBands; i++) { -- *out++ = data->scale[i][*(in+bands[i])]; -- } -- } -- } else if (orderedBands && (pixelStride == numBands)) { -+ -+ if (orderedBands && (pixelStride == numBands)) { - // Optimization: The component bands are ordered sequentially, - // so we can simply use memcpy() to copy the intermediate - // scanline buffer into the raster. -@@ -2177,7 +2124,7 @@ - } else { - numBytes = numBands; - for (in = scanLinePtr+sourceXStart*cinfo->output_components; -- in < pixelLimit && -+ in < pixelLimit && - numBytes <= data->pixelBuf.byteBufferLength; - in += pixelStride) { - for (i = 0; i < numBands; i++) { -@@ -2914,9 +2861,10 @@ - jint *scanData; - jint *bandSize; - int maxBandValue, halfMaxBandValue; -- boolean mustScale = FALSE; - imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - j_compress_ptr cinfo; -+ UINT8** scale = NULL; -+ - - /* verify the inputs */ - -@@ -2963,24 +2911,32 @@ - - for (i = 0; i < numBands; i++) { - if (bandSize[i] != JPEG_BAND_SIZE) { -- mustScale = TRUE; -- break; -- } -- } -+ if (scale == NULL) { -+ scale = (UINT8**) calloc(numBands, sizeof(UINT8*)); - -- if (mustScale) { -- // Build any scale tables that aren't already OK -- for (i = 0; i < numBands; i++) { -- if (data->bandSizes[i] != bandSize[i]) { -- data->bandSizes[i] = bandSize[i]; -- maxBandValue = (1 << bandSize[i]) - 1; -- halfMaxBandValue = maxBandValue >> 1; -- for (j = 0; j <= maxBandValue; j++) { -- data->scale[i][j] = -- (UINT8)((j*MAX_JPEG_BAND_VALUE -- + halfMaxBandValue)/maxBandValue); -+ if (scale == NULL) { -+ JNU_ThrowByName( env, "java/lang/OutOfMemoryError", -+ "Writing JPEG Stream"); -+ return JNI_FALSE; - } - } -+ -+ maxBandValue = (1 << bandSize[i]) - 1; -+ -+ scale[i] = (UINT8*) malloc((maxBandValue + 1) * sizeof(UINT8)); -+ -+ if (scale[i] == NULL) { -+ JNU_ThrowByName( env, "java/lang/OutOfMemoryError", -+ "Writing JPEG Stream"); -+ return JNI_FALSE; -+ } -+ -+ halfMaxBandValue = maxBandValue >> 1; -+ -+ for (j = 0; j <= maxBandValue; j++) { -+ scale[i][j] = (UINT8) -+ ((j*MAX_JPEG_BAND_VALUE + halfMaxBandValue)/maxBandValue); -+ } - } - } - -@@ -3189,28 +3145,25 @@ - out = scanLinePtr; - pixelLimit = in + ((pixelBufferSize > data->pixelBuf.byteBufferLength) ? - data->pixelBuf.byteBufferLength : pixelBufferSize); -- if (mustScale) { -- for (; (in < pixelLimit) && (out < scanLineLimit); in += pixelStride) { -- for (i = 0; i < numBands; i++) { -- *out++ = data->scale[i][*(in+i)]; -+ for (; (in < pixelLimit) && (out < scanLineLimit); in += pixelStride) { -+ for (i = 0; i < numBands; i++) { -+ if (scale !=NULL && scale[i] != NULL) { -+ *out++ = scale[i][*(in+i)]; - #ifdef DEBUG_IIO_JPEG - if (in == data->pixelBuf.buf.bp){ // Just the first pixel - printf("in %d -> out %d, ", *(in+i), *(out-i-1)); - } - #endif -- } -+ - #ifdef DEBUG_IIO_JPEG - if (in == data->pixelBuf.buf.bp){ // Just the first pixel - printf("\n"); - } - #endif -- } -- } else { -- for (; (in < pixelLimit) && (out < scanLineLimit); in += pixelStride) { -- for (i = 0; i < numBands; i++) { -+ } else { - *out++ = *(in+i); - } -- } -+ } - } - // write it out - jpegwritescanlines(cinfo, (JSAMPARRAY)&scanLinePtr, 1); -@@ -3226,6 +3179,16 @@ - } else { - jpegabort((j_common_ptr)cinfo); - } -+ -+ if (scale != NULL) { -+ for (i = 0; i < numBands; i++) { -+ if (scale[i] != NULL) { -+ free(scale[i]); -+ } -+ } -+ free(scale); -+ } -+ - free(scanLinePtr); - RELEASE_ARRAYS(env, data, NULL); - return data->abortFlag; diff -r d247f1787f04 -r 8b26ecee3670 patches/linker-libs-order.patch --- a/patches/linker-libs-order.patch Tue Aug 16 03:15:54 2016 +0100 +++ b/patches/linker-libs-order.patch Wed Aug 17 02:53:46 2016 +0100 @@ -1,7 +1,7 @@ diff -Nru openjdk.orig/jdk/make/com/sun/java/pack/Makefile openjdk/jdk/make/com/sun/java/pack/Makefile ---- openjdk.orig/jdk/make/com/sun/java/pack/Makefile 2013-08-21 20:32:57.128216515 +0100 -+++ openjdk/jdk/make/com/sun/java/pack/Makefile 2014-02-01 15:58:10.921834941 +0000 -@@ -144,7 +144,7 @@ +--- openjdk.orig/jdk/make/com/sun/java/pack/Makefile 2016-08-16 03:20:55.613983475 +0100 ++++ openjdk/jdk/make/com/sun/java/pack/Makefile 2016-08-16 05:01:05.855524683 +0100 +@@ -142,7 +142,7 @@ $(UNPACK_EXE): $(UNPACK_EXE_FILES_o) winres $(prep-target) @@ -10,15 +10,3 @@ $(CP) $(TEMPDIR)/unpack200$(EXE_SUFFIX) $(UNPACK_EXE) -diff -Nru openjdk.orig/jdk/make/common/shared/Sanity.gmk openjdk/jdk/make/common/shared/Sanity.gmk ---- openjdk.orig/jdk/make/common/shared/Sanity.gmk 2014-02-01 15:43:22.344232267 +0000 -+++ openjdk/jdk/make/common/shared/Sanity.gmk 2014-02-01 15:58:10.921834941 +0000 -@@ -1344,7 +1344,7 @@ - ifdef ALSA_VERSION_CHECK - $(ALSA_VERSION_CHECK): $(ALSA_VERSION_CHECK).c - @$(prep-target) -- @$(CC) -lasound -o $@ $< -+ @$(CC) -o $@ $< -lasound - - $(ALSA_VERSION_CHECK).c: - @$(prep-target) diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/4893408-jpegreader_byte_gray.patch --- a/patches/openjdk/4893408-jpegreader_byte_gray.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,747 +0,0 @@ -diff -Nru openjdk.orig/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java ---- openjdk.orig/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java 2013-08-30 16:19:36.256416002 +0100 -+++ openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java 2013-08-30 16:20:25.453181852 +0100 -@@ -53,6 +53,7 @@ - import java.util.List; - import java.util.Iterator; - import java.util.ArrayList; -+import java.util.NoSuchElementException; - - import sun.java2d.Disposer; - import sun.java2d.DisposerRecord; -@@ -215,51 +216,6 @@ - /** The DisposerRecord that handles the actual disposal of this reader. */ - private DisposerRecord disposerRecord; - -- /** -- * Maintain an array of the default image types corresponding to the -- * various supported IJG colorspace codes. -- */ -- private static final ImageTypeSpecifier [] defaultTypes = -- new ImageTypeSpecifier [JPEG.NUM_JCS_CODES]; -- -- static { -- defaultTypes[JPEG.JCS_GRAYSCALE] = -- ImageTypeSpecifier.createFromBufferedImageType -- (BufferedImage.TYPE_BYTE_GRAY); -- defaultTypes[JPEG.JCS_RGB] = -- ImageTypeSpecifier.createInterleaved -- (JPEG.JCS.sRGB, -- JPEG.bOffsRGB, -- DataBuffer.TYPE_BYTE, -- false, -- false); -- defaultTypes[JPEG.JCS_RGBA] = -- ImageTypeSpecifier.createPacked -- (JPEG.JCS.sRGB, -- 0xff000000, -- 0x00ff0000, -- 0x0000ff00, -- 0x000000ff, -- DataBuffer.TYPE_INT, -- false); -- if (JPEG.JCS.YCC != null) { -- defaultTypes[JPEG.JCS_YCC] = -- ImageTypeSpecifier.createInterleaved -- (JPEG.JCS.YCC, -- JPEG.bandOffsets[2], -- DataBuffer.TYPE_BYTE, -- false, -- false); -- defaultTypes[JPEG.JCS_YCCA] = -- ImageTypeSpecifier.createInterleaved -- (JPEG.JCS.YCC, -- JPEG.bandOffsets[3], -- DataBuffer.TYPE_BYTE, -- true, -- false); -- } -- } -- - /** Sets up static C structures. */ - private static native void initReaderIDs(Class iisClass, - Class qTableClass, -@@ -767,11 +723,11 @@ - * Return an ImageTypeSpecifier corresponding to the given - * color space code, or null if the color space is unsupported. - */ -- private ImageTypeSpecifier getImageType(int code) { -- ImageTypeSpecifier ret = null; -+ private ImageTypeProducer getImageType(int code) { -+ ImageTypeProducer ret = null; - - if ((code > 0) && (code < JPEG.NUM_JCS_CODES)) { -- ret = defaultTypes[code]; -+ ret = ImageTypeProducer.getTypeProducer(code); - } - return ret; - } -@@ -787,7 +743,7 @@ - } - - // Returns null if it can't be represented -- return getImageType(colorSpaceCode); -+ return getImageType(colorSpaceCode).getType(); - } finally { - clearThreadLock(); - } -@@ -822,13 +778,13 @@ - - // Get the raw ITS, if there is one. Note that this - // won't always be the same as the default. -- ImageTypeSpecifier raw = getImageType(colorSpaceCode); -+ ImageTypeProducer raw = getImageType(colorSpaceCode); - - // Given the encoded colorspace, build a list of ITS's - // representing outputs you could handle starting - // with the default. - -- ArrayList list = new ArrayList(1); -+ ArrayList list = new ArrayList(1); - - switch (colorSpaceCode) { - case JPEG.JCS_GRAYSCALE: -@@ -838,9 +794,7 @@ - case JPEG.JCS_RGB: - list.add(raw); - list.add(getImageType(JPEG.JCS_GRAYSCALE)); -- if (JPEG.JCS.YCC != null) { -- list.add(getImageType(JPEG.JCS_YCC)); -- } -+ list.add(getImageType(JPEG.JCS_YCC)); - break; - case JPEG.JCS_RGBA: - list.add(raw); -@@ -865,19 +819,21 @@ - list.add(getImageType(JPEG.JCS_RGB)); - - if (iccCS != null) { -- list.add(ImageTypeSpecifier.createInterleaved -+ list.add(new ImageTypeProducer() { -+ protected ImageTypeSpecifier produce() { -+ return ImageTypeSpecifier.createInterleaved - (iccCS, - JPEG.bOffsRGB, // Assume it's for RGB - DataBuffer.TYPE_BYTE, - false, -- false)); -+ false); -+ } -+ }); - - } - - list.add(getImageType(JPEG.JCS_GRAYSCALE)); -- if (JPEG.JCS.YCC != null) { // Might be null if PYCC.pf not installed -- list.add(getImageType(JPEG.JCS_YCC)); -- } -+ list.add(getImageType(JPEG.JCS_YCC)); - break; - case JPEG.JCS_YCbCrA: // Default is to convert to RGBA - // As there is no YCbCr ColorSpace, we can't support -@@ -886,7 +842,7 @@ - break; - } - -- return list.iterator(); -+ return new ImageTypeIterator(list.iterator()); - } - - /** -@@ -936,6 +892,10 @@ - if (csType == ColorSpace.TYPE_RGB) { // We want RGB - // IJG can do this for us more efficiently - setOutColorSpace(structPointer, JPEG.JCS_RGB); -+ // Update java state according to changes -+ // in the native part of decoder. -+ outColorSpaceCode = JPEG.JCS_RGB; -+ numComponents = 3; - } else if (csType != ColorSpace.TYPE_GRAY) { - throw new IIOException("Incompatible color conversion"); - } -@@ -945,6 +905,10 @@ - if (colorSpaceCode == JPEG.JCS_YCbCr) { - // If the jpeg space is YCbCr, IJG can do it - setOutColorSpace(structPointer, JPEG.JCS_GRAYSCALE); -+ // Update java state according to changes -+ // in the native part of decoder. -+ outColorSpaceCode = JPEG.JCS_GRAYSCALE; -+ numComponents = 1; - } - } else if ((iccCS != null) && - (cm.getNumComponents() == numComponents) && -@@ -970,20 +934,26 @@ - } - break; - case JPEG.JCS_YCC: -- if (JPEG.JCS.YCC == null) { // We can't do YCC at all -- throw new IIOException("Incompatible color conversion"); -- } -- if ((cs != JPEG.JCS.YCC) && -- (cm.getNumComponents() == numComponents)) { -- convert = new ColorConvertOp(JPEG.JCS.YCC, cs, null); -+ { -+ ColorSpace YCC = JPEG.JCS.getYCC(); -+ if (YCC == null) { // We can't do YCC at all -+ throw new IIOException("Incompatible color conversion"); -+ } -+ if ((cs != YCC) && -+ (cm.getNumComponents() == numComponents)) { -+ convert = new ColorConvertOp(YCC, cs, null); -+ } - } - break; - case JPEG.JCS_YCCA: -- // No conversions available; image must be YCCA -- if ((JPEG.JCS.YCC == null) || // We can't do YCC at all -- (cs != JPEG.JCS.YCC) || -- (cm.getNumComponents() != numComponents)) { -- throw new IIOException("Incompatible color conversion"); -+ { -+ ColorSpace YCC = JPEG.JCS.getYCC(); -+ // No conversions available; image must be YCCA -+ if ((YCC == null) || // We can't do YCC at all -+ (cs != YCC) || -+ (cm.getNumComponents() != numComponents)) { -+ throw new IIOException("Incompatible color conversion"); -+ } - } - break; - default: -@@ -1699,3 +1669,140 @@ - } - } - } -+ -+/** -+ * An internal helper class that wraps producer's iterator -+ * and extracts specifier instances on demand. -+ */ -+class ImageTypeIterator implements Iterator { -+ private Iterator producers; -+ private ImageTypeSpecifier theNext = null; -+ -+ public ImageTypeIterator(Iterator producers) { -+ this.producers = producers; -+ } -+ -+ public boolean hasNext() { -+ if (theNext != null) { -+ return true; -+ } -+ if (!producers.hasNext()) { -+ return false; -+ } -+ do { -+ theNext = producers.next().getType(); -+ } while (theNext == null && producers.hasNext()); -+ -+ return (theNext != null); -+ } -+ -+ public ImageTypeSpecifier next() { -+ if (theNext != null || hasNext()) { -+ ImageTypeSpecifier t = theNext; -+ theNext = null; -+ return t; -+ } else { -+ throw new NoSuchElementException(); -+ } -+ } -+ -+ public void remove() { -+ producers.remove(); -+ } -+} -+ -+/** -+ * An internal helper class that provides means for deferred creation -+ * of ImageTypeSpecifier instance required to describe available -+ * destination types. -+ * -+ * This implementation only supports standard -+ * jpeg color spaces (defined by corresponding JCS color space code). -+ * -+ * To support other color spaces one can override produce() method to -+ * return custom instance of ImageTypeSpecifier. -+ */ -+class ImageTypeProducer { -+ -+ private ImageTypeSpecifier type = null; -+ boolean failed = false; -+ private int csCode; -+ -+ public ImageTypeProducer(int csCode) { -+ this.csCode = csCode; -+ } -+ -+ public ImageTypeProducer() { -+ csCode = -1; // undefined -+ } -+ -+ public synchronized ImageTypeSpecifier getType() { -+ if (!failed && type == null) { -+ try { -+ type = produce(); -+ } catch (Throwable e) { -+ failed = true; -+ } -+ } -+ return type; -+ } -+ -+ private static final ImageTypeProducer [] defaultTypes = -+ new ImageTypeProducer [JPEG.NUM_JCS_CODES]; -+ -+ public synchronized static ImageTypeProducer getTypeProducer(int csCode) { -+ if (csCode < 0 || csCode >= JPEG.NUM_JCS_CODES) { -+ return null; -+ } -+ if (defaultTypes[csCode] == null) { -+ defaultTypes[csCode] = new ImageTypeProducer(csCode); -+ } -+ return defaultTypes[csCode]; -+ } -+ -+ protected ImageTypeSpecifier produce() { -+ switch (csCode) { -+ case JPEG.JCS_GRAYSCALE: -+ return ImageTypeSpecifier.createFromBufferedImageType -+ (BufferedImage.TYPE_BYTE_GRAY); -+ case JPEG.JCS_RGB: -+ return ImageTypeSpecifier.createInterleaved(JPEG.JCS.sRGB, -+ JPEG.bOffsRGB, -+ DataBuffer.TYPE_BYTE, -+ false, -+ false); -+ case JPEG.JCS_RGBA: -+ return ImageTypeSpecifier.createPacked(JPEG.JCS.sRGB, -+ 0xff000000, -+ 0x00ff0000, -+ 0x0000ff00, -+ 0x000000ff, -+ DataBuffer.TYPE_INT, -+ false); -+ case JPEG.JCS_YCC: -+ if (JPEG.JCS.getYCC() != null) { -+ return ImageTypeSpecifier.createInterleaved( -+ JPEG.JCS.getYCC(), -+ JPEG.bandOffsets[2], -+ DataBuffer.TYPE_BYTE, -+ false, -+ false); -+ } else { -+ return null; -+ } -+ case JPEG.JCS_YCCA: -+ if (JPEG.JCS.getYCC() != null) { -+ return ImageTypeSpecifier.createInterleaved( -+ JPEG.JCS.getYCC(), -+ JPEG.bandOffsets[3], -+ DataBuffer.TYPE_BYTE, -+ true, -+ false); -+ } else { -+ return null; -+ } -+ default: -+ return null; -+ } -+ } -+} -diff -Nru openjdk.orig/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java ---- openjdk.orig/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java 2013-08-30 16:19:36.268416189 +0100 -+++ openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java 2013-08-30 16:20:25.453181852 +0100 -@@ -815,7 +815,7 @@ - } - break; - case ColorSpace.TYPE_3CLR: -- if (cs == JPEG.JCS.YCC) { -+ if (cs == JPEG.JCS.getYCC()) { - if (!alpha) { - if (jfif != null) { - convertTosRGB = true; -@@ -1541,7 +1541,7 @@ - } - break; - case ColorSpace.TYPE_3CLR: -- if (cs == JPEG.JCS.YCC) { -+ if (cs == JPEG.JCS.getYCC()) { - if (alpha) { - retval = JPEG.JCS_YCCA; - } else { -@@ -1580,7 +1580,7 @@ - } - break; - case ColorSpace.TYPE_3CLR: -- if (cs == JPEG.JCS.YCC) { -+ if (cs == JPEG.JCS.getYCC()) { - if (alpha) { - retval = JPEG.JCS_YCCA; - } else { -@@ -1626,7 +1626,7 @@ - } - break; - case ColorSpace.TYPE_3CLR: -- if (cs == JPEG.JCS.YCC) { -+ if (cs == JPEG.JCS.getYCC()) { - if (alpha) { - retval = JPEG.JCS_YCCA; - } else { -diff -Nru openjdk.orig/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java ---- openjdk.orig/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java 2013-08-30 16:19:36.256416002 +0100 -+++ openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java 2013-08-30 16:20:25.453181852 +0100 -@@ -215,17 +215,21 @@ - public static class JCS { - public static final ColorSpace sRGB = - ColorSpace.getInstance(ColorSpace.CS_sRGB); -- public static final ColorSpace YCC; - -- static { -- ColorSpace cs = null; -- try { -- cs = ColorSpace.getInstance(ColorSpace.CS_PYCC); -- } catch (IllegalArgumentException e) { -- // PYCC.pf may not always be installed -- } finally { -- YCC = cs; -+ private static ColorSpace YCC = null; -+ private static boolean yccInited = false; -+ -+ public static ColorSpace getYCC() { -+ if (!yccInited) { -+ try { -+ YCC = ColorSpace.getInstance(ColorSpace.CS_PYCC); -+ } catch (IllegalArgumentException e) { -+ // PYCC.pf may not always be installed -+ } finally { -+ yccInited = true; -+ } - } -+ return YCC; - } - } - -diff -Nru openjdk.orig/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java ---- openjdk.orig/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java 2013-08-30 16:19:36.268416189 +0100 -+++ openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java 2013-08-30 16:20:25.453181852 +0100 -@@ -490,7 +490,7 @@ - } - break; - case ColorSpace.TYPE_3CLR: -- if (cs == JPEG.JCS.YCC) { -+ if (cs == JPEG.JCS.getYCC()) { - wantJFIF = false; - componentIDs[0] = (byte) 'Y'; - componentIDs[1] = (byte) 'C'; -diff -Nru openjdk.orig/jdk/src/share/classes/java/awt/color/ICC_Profile.java openjdk/jdk/src/share/classes/java/awt/color/ICC_Profile.java ---- openjdk.orig/jdk/src/share/classes/java/awt/color/ICC_Profile.java 2013-08-30 16:19:36.220415442 +0100 -+++ openjdk/jdk/src/share/classes/java/awt/color/ICC_Profile.java 2013-08-30 16:20:25.453181852 +0100 -@@ -863,11 +863,16 @@ - case ColorSpace.CS_PYCC: - synchronized(ICC_Profile.class) { - if (PYCCprofile == null) { -- ProfileDeferralInfo pInfo = -- new ProfileDeferralInfo("PYCC.pf", -- ColorSpace.TYPE_3CLR, 3, -- CLASS_DISPLAY); -- PYCCprofile = getDeferredInstance(pInfo); -+ if (getProfileFile("PYCC.pf") != null) { -+ ProfileDeferralInfo pInfo = -+ new ProfileDeferralInfo("PYCC.pf", -+ ColorSpace.TYPE_3CLR, 3, -+ CLASS_DISPLAY); -+ PYCCprofile = getDeferredInstance(pInfo); -+ } else { -+ throw new IllegalArgumentException( -+ "Can't load standard profile: PYCC.pf"); -+ } - } - thisProfile = PYCCprofile; - } -diff -Nru openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c ---- openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2013-08-30 16:19:36.212415317 +0100 -+++ openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2013-08-30 16:21:23.982092967 +0100 -@@ -1818,7 +1818,7 @@ - - - struct jpeg_source_mgr *src; -- JSAMPROW scanLinePtr; -+ JSAMPROW scanLinePtr = NULL; - jint bands[MAX_BANDS]; - int i, j; - jint *body; -@@ -1855,7 +1855,7 @@ - - cinfo = (j_decompress_ptr) data->jpegObj; - -- if ((numBands < 1) || (numBands > cinfo->num_components) || -+ if ((numBands < 1) || - (sourceXStart < 0) || (sourceXStart >= (jint)cinfo->image_width) || - (sourceYStart < 0) || (sourceYStart >= (jint)cinfo->image_height) || - (sourceWidth < 1) || (sourceWidth > (jint)cinfo->image_width) || -@@ -1957,15 +1957,6 @@ - "Invalid number of color components"); - return data->abortFlag; - } -- scanLinePtr = (JSAMPROW)malloc(cinfo->image_width*cinfo->num_components); -- if (scanLinePtr == NULL) { -- RELEASE_ARRAYS(env, data, src->next_input_byte); -- JNU_ThrowByName( env, -- "java/lang/OutOfMemoryError", -- "Reading JPEG Stream"); -- return data->abortFlag; -- } -- - /* Establish the setjmp return context for sun_jpeg_error_exit to use. */ - jerr = (sun_jpeg_error_ptr) cinfo->err; - -@@ -1979,7 +1970,10 @@ - buffer); - JNU_ThrowByName(env, "javax/imageio/IIOException", buffer); - } -- free(scanLinePtr); -+ if (scanLinePtr != NULL) { -+ free(scanLinePtr); -+ scanLinePtr = NULL; -+ } - return data->abortFlag; - } - -@@ -2017,6 +2011,23 @@ - - jpeg_start_decompress(cinfo); - -+ if (numBands != cinfo->output_components) { -+ JNU_ThrowByName(env, "javax/imageio/IIOException", -+ "Invalid argument to native readImage"); -+ return data->abortFlag; -+ } -+ -+ -+ // Allocate a 1-scanline buffer -+ scanLinePtr = (JSAMPROW)malloc(cinfo->image_width*cinfo->output_components); -+ if (scanLinePtr == NULL) { -+ RELEASE_ARRAYS(env, data, src->next_input_byte); -+ JNU_ThrowByName( env, -+ "java/lang/OutOfMemoryError", -+ "Reading JPEG Stream"); -+ return data->abortFlag; -+ } -+ - // loop over progressive passes - done = FALSE; - while (!done) { -@@ -2044,9 +2055,9 @@ - - scanlineLimit = sourceYStart+sourceHeight; - pixelLimit = scanLinePtr -- +(sourceXStart+sourceWidth)*cinfo->num_components; -+ +(sourceXStart+sourceWidth)*cinfo->output_components; - -- pixelStride = stepX*cinfo->num_components; -+ pixelStride = stepX*cinfo->output_components; - targetLine = 0; - - while ((data->abortFlag == JNI_FALSE) -@@ -2068,7 +2079,7 @@ - // Optimization: The component bands are ordered sequentially, - // so we can simply use memcpy() to copy the intermediate - // scanline buffer into the raster. -- in = scanLinePtr + (sourceXStart * cinfo->num_components); -+ in = scanLinePtr + (sourceXStart * cinfo->output_components); - if (pixelLimit > in) { - numBytes = pixelLimit - in; - if (numBytes > data->pixelBuf.byteBufferLength) { -@@ -2078,7 +2089,7 @@ - } - } else { - numBytes = numBands; -- for (in = scanLinePtr+sourceXStart*cinfo->num_components; -+ for (in = scanLinePtr+sourceXStart*cinfo->output_components; - in < pixelLimit && - numBytes <= data->pixelBuf.byteBufferLength; - in += pixelStride) { -diff -Nru openjdk.orig/jdk/test/javax/imageio/plugins/jpeg/ReadAsGrayTest.java openjdk/jdk/test/javax/imageio/plugins/jpeg/ReadAsGrayTest.java ---- openjdk.orig/jdk/test/javax/imageio/plugins/jpeg/ReadAsGrayTest.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/test/javax/imageio/plugins/jpeg/ReadAsGrayTest.java 2013-08-30 16:20:25.453181852 +0100 -@@ -0,0 +1,179 @@ -+/* -+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+ * -+ * This code is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 only, as -+ * published by the Free Software Foundation. -+ * -+ * This code is distributed in the hope that it will be useful, but WITHOUT -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+ * version 2 for more details (a copy is included in the LICENSE file that -+ * accompanied this code). -+ * -+ * You should have received a copy of the GNU General Public License version -+ * 2 along with this work; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/** -+ * @test -+ * @bug 4893408 -+ * -+ * @summary Test verifies that Image I/O jpeg reader correctly handles -+ * destination types if number of color components in destination -+ * differs from number of color components in the jpeg image. -+ * Particularly, it verifies reading YCbCr image as a grayscaled -+ * and reading grayscaled jpeg as a RGB. -+ * -+ * @run main ReadAsGrayTest -+ */ -+ -+import java.awt.Color; -+import java.awt.Graphics2D; -+import java.awt.color.ColorSpace; -+import java.awt.image.BufferedImage; -+import java.io.File; -+import java.io.IOException; -+import java.util.Iterator; -+import javax.imageio.ImageIO; -+import javax.imageio.ImageReadParam; -+import javax.imageio.ImageReader; -+import javax.imageio.ImageTypeSpecifier; -+import javax.imageio.stream.ImageInputStream; -+import static java.awt.image.BufferedImage.TYPE_3BYTE_BGR; -+import static java.awt.image.BufferedImage.TYPE_BYTE_GRAY; -+import static java.awt.color.ColorSpace.TYPE_GRAY; -+import static java.awt.color.ColorSpace.CS_sRGB; -+ -+public class ReadAsGrayTest { -+ static Color[] colors = new Color[] { -+ Color.white, Color.red, Color.green, -+ Color.blue, Color.black }; -+ -+ static final int dx = 50; -+ static final int h = 100; -+ -+ static ColorSpace sRGB = ColorSpace.getInstance(CS_sRGB); -+ -+ -+ public static void main(String[] args) throws IOException { -+ System.out.println("Type TYPE_BYTE_GRAY"); -+ doTest(TYPE_BYTE_GRAY); -+ -+ System.out.println("Type TYPE_3BYTE_BGR"); -+ doTest(TYPE_3BYTE_BGR); -+ -+ System.out.println("Test PASSED."); -+ } -+ -+ private static void doTest(int type) throws IOException { -+ BufferedImage src = createTestImage(type); -+ -+ File f = new File("test.jpg"); -+ -+ if (!ImageIO.write(src, "jpg", f)) { -+ throw new RuntimeException("Failed to write test image."); -+ } -+ -+ ImageInputStream iis = ImageIO.createImageInputStream(f); -+ ImageReader reader = ImageIO.getImageReaders(iis).next(); -+ reader.setInput(iis); -+ -+ Iterator types = reader.getImageTypes(0); -+ ImageTypeSpecifier srgb = null; -+ ImageTypeSpecifier gray = null; -+ // look for gray and srgb types -+ while ((srgb == null || gray == null) && types.hasNext()) { -+ ImageTypeSpecifier t = types.next(); -+ if (t.getColorModel().getColorSpace().getType() == TYPE_GRAY) { -+ gray = t; -+ } -+ if (t.getColorModel().getColorSpace() == sRGB) { -+ srgb = t; -+ } -+ } -+ if (gray == null) { -+ throw new RuntimeException("No gray type available."); -+ } -+ if (srgb == null) { -+ throw new RuntimeException("No srgb type available."); -+ } -+ -+ System.out.println("Read as GRAY..."); -+ testType(reader, gray, src); -+ -+ System.out.println("Read as sRGB..."); -+ testType(reader, srgb, src); -+ } -+ -+ private static void testType(ImageReader reader, -+ ImageTypeSpecifier t, -+ BufferedImage src) -+ throws IOException -+ { -+ ImageReadParam p = reader.getDefaultReadParam(); -+ p.setDestinationType(t); -+ BufferedImage dst = reader.read(0, p); -+ -+ verify(src, dst, t); -+ } -+ -+ private static void verify(BufferedImage src, -+ BufferedImage dst, -+ ImageTypeSpecifier type) -+ { -+ BufferedImage test = -+ type.createBufferedImage(src.getWidth(), src.getHeight()); -+ Graphics2D g = test.createGraphics(); -+ g.drawImage(src, 0, 0, null); -+ g.dispose(); -+ -+ for (int i = 0; i < colors.length; i++) { -+ int x = i * dx + dx / 2; -+ int y = h / 2; -+ -+ Color c_test = new Color(test.getRGB(x, y)); -+ Color c_dst = new Color(dst.getRGB(x, y)); -+ -+ if (!compareWithTolerance(c_test, c_dst, 0.01f)) { -+ String msg = String.format("Invalid color: %x instead of %x", -+ c_dst.getRGB(), c_test.getRGB()); -+ throw new RuntimeException("Test failed: " + msg); -+ } -+ } -+ System.out.println("Verified."); -+ } -+ -+ private static boolean compareWithTolerance(Color a, Color b, float delta) { -+ float[] a_rgb = new float[3]; -+ a_rgb = a.getRGBColorComponents(a_rgb); -+ float[] b_rgb = new float[3]; -+ b_rgb = b.getRGBColorComponents(b_rgb); -+ -+ for (int i = 0; i < 3; i++) { -+ if (Math.abs(a_rgb[i] - b_rgb[i]) > delta) { -+ return false; -+ } -+ } -+ return true; -+ } -+ -+ private static BufferedImage createTestImage(int type) { -+ BufferedImage img = new BufferedImage(dx * colors.length, h, type); -+ -+ Graphics2D g = img.createGraphics(); -+ for (int i = 0; i < colors.length; i++) { -+ g.setColor(colors[i]); -+ g.fillRect(i * dx, 0, dx, h); -+ } -+ g.dispose(); -+ -+ return img; -+ } -+} diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/6563752-ss12_support.patch --- a/patches/openjdk/6563752-ss12_support.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,173 +0,0 @@ -# HG changeset patch -# User ohair -# Date 1212597498 25200 -# Wed Jun 04 09:38:18 2008 -0700 -# Node ID f9467b4496dc3731d73dbc5a42fd84cc9b1faaab -# Parent b6601ba7f6dfe0d93e40b2891c581c30fdd92289 -6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles) -Summary: Changes to support building with SS12. -Reviewed-by: tbell - -diff --git a/make/common/Defs-solaris.gmk b/make/common/Defs-solaris.gmk ---- openjdk/jdk/make/common/Defs-solaris.gmk -+++ openjdk/jdk/make/common/Defs-solaris.gmk -@@ -197,7 +197,6 @@ - - # Lint Flags: - # -Xa ANSI C plus K&R, favor ANSI rules --# -Xarch=XXX Same as 'cc -xarch=XXX' - # -fd report on old style func defs - # -errchk=structarg report on 64bit struct args by value - # -errchk=longptr64 report on 64bit to 32bit issues (ignores casts) -@@ -206,6 +205,7 @@ - # -x suppress unused externs - # -u suppress extern func/vars used/defined - # -errfmt=simple use one line errors with position info -+# $(LINT_XARCH_OPTION) See Compiler-sun.gwk - - LINTFLAGS_COMMON = -Xa - LINTFLAGS_COMMON += -fd -@@ -224,42 +224,12 @@ - # Tell the compilers to never generate globalized names, all the time. - CFLAGS_COMMON += -W0,-noglobal - --# Arch specific settings (determines type of .o files and instruction set) --ifeq ($(ARCH_FAMILY), sparc) -- ifdef VIS_NEEDED -- XARCH_VALUE/32=v8plusa -- XARCH_VALUE/64=v9a -- else -- # Someday this should change to improve optimization on UltraSPARC -- # and abandon the old v8-only machines like the SPARCstation 10. -- # Indications with Mustang is that alacrity runs do not show a -- # big improvement using v8plus over v8, but other benchmarks might. -- XARCH_VALUE/32=v8 -- XARCH_VALUE/64=v9 -- endif --endif --ifeq ($(ARCH_FAMILY), i586) -- XARCH_VALUE/64=amd64 -- XARCH_VALUE/32= --endif -- --# Arch value based on current data model being built --XARCH_VALUE=$(XARCH_VALUE/$(ARCH_DATA_MODEL)) --ifneq ($(XARCH_VALUE), ) -- # The actual compiler -xarch options to use -- XARCH_OPTION/32 = -xarch=$(XARCH_VALUE/32) -- XARCH_OPTION/64 = -xarch=$(XARCH_VALUE/64) -- XARCH_OPTION = $(XARCH_OPTION/$(ARCH_DATA_MODEL)) --endif -- --# If we have a specific -xarch value to use, add it --ifdef XARCH_OPTION -- CFLAGS_COMMON += $(XARCH_OPTION) -- CXXFLAGS_COMMON += $(XARCH_OPTION) -- ASFLAGS_COMMON += $(XARCH_OPTION) -- EXTRA_LIBS += $(XARCH_OPTION) -- LINTFLAGS_COMMON += -Xarch=$(XARCH_VALUE) --endif -+# If we have a specific arch value to use, add it -+CFLAGS_COMMON += $(XARCH_OPTION) -+CXXFLAGS_COMMON += $(XARCH_OPTION) -+ASFLAGS_COMMON += $(AS_XARCH_OPTION) -+EXTRA_LIBS += $(XARCH_OPTION) -+LINTFLAGS_COMMON += $(LINT_XARCH_OPTION) - - # - # uncomment the following to build with PERTURBALOT set -diff --git a/make/common/shared/Compiler-sun.gmk b/make/common/shared/Compiler-sun.gmk ---- openjdk/jdk/make/common/shared/Compiler-sun.gmk -+++ openjdk/jdk/make/common/shared/Compiler-sun.gmk -@@ -31,6 +31,9 @@ - - # Sun Studio Compiler settings specific to Solaris - ifeq ($(PLATFORM), solaris) -+ # FIXUP: Change to SS12 when validated -+ #COMPILER_VERSION=SS12 -+ #REQUIRED_CC_VER=5.9 - COMPILER_VERSION=SS11 - REQUIRED_CC_VER=5.8 - CC = $(COMPILER_PATH)cc -@@ -51,8 +54,8 @@ - # Sun Studio Compiler settings specific to Linux - ifeq ($(PLATFORM), linux) - # This has not been tested -- COMPILER_VERSION=SS11 -- REQUIRED_CC_VER=5.8 -+ COMPILER_VERSION=SS12 -+ REQUIRED_CC_VER=5.9 - CC = $(COMPILER_PATH)cc - CPP = $(COMPILER_PATH)cc -E - CXX = $(COMPILER_PATH)CC -@@ -74,3 +77,58 @@ - _CC_VER :=$(shell $(CC) -V 2>&1 | $(HEAD) -n 1) - CC_VER :=$(call GetVersion,"$(_CC_VER)") - -+# Arch specific settings (determines type of .o files and instruction set) -+# Starting in SS12 (5.9), the arch options changed. -+# The assembler /usr/ccs/bin/as wants older SS11 (5.8) style options. -+# Note: We need to have both 32 and 64 values at all times for awt Makefiles. -+# -+XARCH_OPTION_OLD/32 = -+XARCH_OPTION_OLD/64 = -+XARCH_OPTION_NEW/32 = -m32 -+XARCH_OPTION_NEW/64 = -m64 -+# Lint options are slightly different -+LINT_XARCH_OPTION_OLD/32 = -+LINT_XARCH_OPTION_OLD/64 = -+LINT_XARCH_OPTION_NEW/32 = -m32 -+LINT_XARCH_OPTION_NEW/64 = -m64 -+ifeq ($(ARCH_FAMILY), sparc) -+ ifdef VIS_NEEDED -+ XARCH_OPTION_OLD/32 += -xarch=v8plusa -+ XARCH_OPTION_OLD/64 += -xarch=v9a -+ XARCH_OPTION_NEW/32 += -xarch=sparcvis -+ XARCH_OPTION_NEW/64 += -xarch=sparcvis -+ else -+ # Someday this should change to improve optimization on UltraSPARC -+ # and abandon v8, even change to sparcvis or sparcvis2, this -+ # abandons machines like the SPARCstation 10. -+ # Indications with jdk6 is that alacrity runs do not show a -+ # big improvement using v8plus over v8, but other benchmarks might. -+ XARCH_OPTION_OLD/32 += -xarch=v8 -+ XARCH_OPTION_OLD/64 += -xarch=v9 -+ # Note that this new option (SS12+) effectively means v8plus -+ XARCH_OPTION_NEW/32 += -xarch=sparc -+ XARCH_OPTION_NEW/64 += -xarch=sparc -+ endif -+ LINT_XARCH_OPTION_OLD/64 += -Xarch=v9 -+endif -+ifeq ($(ARCH_FAMILY), i586) -+ XARCH_OPTION_OLD/64 += -xarch=amd64 -+ LINT_XARCH_OPTION_OLD/64 += -Xarch=amd64 -+endif -+# Pick the options we want based on the compiler being used. -+ifeq ($(shell expr $(CC_VER) \>= 5.9), 1) -+ XARCH_OPTION/32 = $(XARCH_OPTION_NEW/32) -+ XARCH_OPTION/64 = $(XARCH_OPTION_NEW/64) -+ LINT_XARCH_OPTION/32 = $(LINT_XARCH_OPTION_NEW/32) -+ LINT_XARCH_OPTION/64 = $(LINT_XARCH_OPTION_NEW/64) -+else -+ XARCH_OPTION/32 = $(XARCH_OPTION_OLD/32) -+ XARCH_OPTION/64 = $(XARCH_OPTION_OLD/64) -+ LINT_XARCH_OPTION/32 = $(LINT_XARCH_OPTION_OLD/32) -+ LINT_XARCH_OPTION/64 = $(LINT_XARCH_OPTION_OLD/64) -+endif -+XARCH_OPTION = $(XARCH_OPTION/$(ARCH_DATA_MODEL)) -+LINT_XARCH_OPTION = $(LINT_XARCH_OPTION/$(ARCH_DATA_MODEL)) -+# The /usr/ccs/bin/as assembler always wants the older SS11 (5.8) options. -+AS_XARCH_OPTION = $(XARCH_OPTION_OLD/$(ARCH_DATA_MODEL)) -+ -diff --git a/make/jdk_generic_profile.sh b/make/jdk_generic_profile.sh ---- openjdk/jdk/make/jdk_generic_profile.sh -+++ openjdk/jdk/make/jdk_generic_profile.sh -@@ -119,7 +119,7 @@ - # System place where JDK installed images are stored? - jdk_instances=/usr/jdk/instances - -- # Get the SS11 compilers (and latest patches for them too) -+ # Get the Sun Studio compilers (and latest patches for them too) - if [ "${ALT_COMPILER_PATH}" = "" ] ; then - ALT_COMPILER_PATH=/opt/SUNWspro/bin - export ALT_COMPILER_PATH diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/6631559-dont_load_libjpeg_to_register_imageio_plugins.patch --- a/patches/openjdk/6631559-dont_load_libjpeg_to_register_imageio_plugins.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,562 +0,0 @@ -# HG changeset patch -# User bae -# Date 1233224374 -10800 -# Thu Jan 29 13:19:34 2009 +0300 -# Node ID 36da64dc65454ac7ae6213d2fbb16260318e53dd -# Parent 65cada5a8497277a5efbd022aa3e781a14d5acaf -6631559: Registration of ImageIO plugins should not cause loading of jpeg.dlli and cmm.dll -Reviewed-by: igor, prr - -diff --git a/src/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java b/src/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java ---- openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java -+++ openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java -@@ -1003,7 +1003,7 @@ - 3, - new int [] {0, 1, 2}, - null); -- ColorModel cm = new ComponentColorModel(JPEG.sRGB, -+ ColorModel cm = new ComponentColorModel(JPEG.JCS.sRGB, - false, - false, - ColorModel.OPAQUE, -diff --git a/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java ---- openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java -+++ openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEG.java -@@ -208,15 +208,24 @@ - - public static final int [] bOffsRGB = { 2, 1, 0 }; - -- protected static final ColorSpace sRGB = -- ColorSpace.getInstance(ColorSpace.CS_sRGB); -- protected static ColorSpace YCC = null; // Can't be final -+ /* These are kept in the inner class to avoid static initialization -+ * of the CMM class until someone actually needs it. -+ * (e.g. do not init CMM on the request for jpeg mime types) -+ */ -+ public static class JCS { -+ public static final ColorSpace sRGB = -+ ColorSpace.getInstance(ColorSpace.CS_sRGB); -+ public static final ColorSpace YCC; - -- static { -- try { -- YCC = ColorSpace.getInstance(ColorSpace.CS_PYCC); -- } catch (IllegalArgumentException e) { -- // PYCC.pf may not always be installed -+ static { -+ ColorSpace cs = null; -+ try { -+ cs = ColorSpace.getInstance(ColorSpace.CS_PYCC); -+ } catch (IllegalArgumentException e) { -+ // PYCC.pf may not always be installed -+ } finally { -+ YCC = cs; -+ } - } - } - -diff --git a/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java ---- openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java -+++ openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java -@@ -228,31 +228,31 @@ - (BufferedImage.TYPE_BYTE_GRAY); - defaultTypes[JPEG.JCS_RGB] = - ImageTypeSpecifier.createInterleaved -- (JPEG.sRGB, -+ (JPEG.JCS.sRGB, - JPEG.bOffsRGB, - DataBuffer.TYPE_BYTE, - false, - false); - defaultTypes[JPEG.JCS_RGBA] = - ImageTypeSpecifier.createPacked -- (JPEG.sRGB, -+ (JPEG.JCS.sRGB, - 0xff000000, - 0x00ff0000, - 0x0000ff00, - 0x000000ff, - DataBuffer.TYPE_INT, - false); -- if (JPEG.YCC != null) { -+ if (JPEG.JCS.YCC != null) { - defaultTypes[JPEG.JCS_YCC] = - ImageTypeSpecifier.createInterleaved -- (JPEG.YCC, -+ (JPEG.JCS.YCC, - JPEG.bandOffsets[2], - DataBuffer.TYPE_BYTE, - false, - false); - defaultTypes[JPEG.JCS_YCCA] = - ImageTypeSpecifier.createInterleaved -- (JPEG.YCC, -+ (JPEG.JCS.YCC, - JPEG.bandOffsets[3], - DataBuffer.TYPE_BYTE, - true, -@@ -774,7 +774,7 @@ - case JPEG.JCS_RGB: - list.add(raw); - list.add(getImageType(JPEG.JCS_GRAYSCALE)); -- if (JPEG.YCC != null) { -+ if (JPEG.JCS.YCC != null) { - list.add(getImageType(JPEG.JCS_YCC)); - } - break; -@@ -811,7 +811,7 @@ - } - - list.add(getImageType(JPEG.JCS_GRAYSCALE)); -- if (JPEG.YCC != null) { // Might be null if PYCC.pf not installed -+ if (JPEG.JCS.YCC != null) { // Might be null if PYCC.pf not installed - list.add(getImageType(JPEG.JCS_YCC)); - } - break; -@@ -893,7 +893,7 @@ - (!cs.isCS_sRGB()) && - (cm.getNumComponents() == numComponents)) { - // Target isn't sRGB, so convert from sRGB to the target -- convert = new ColorConvertOp(JPEG.sRGB, cs, null); -+ convert = new ColorConvertOp(JPEG.JCS.sRGB, cs, null); - } else if (csType != ColorSpace.TYPE_RGB) { - throw new IIOException("Incompatible color conversion"); - } -@@ -906,18 +906,18 @@ - } - break; - case JPEG.JCS_YCC: -- if (JPEG.YCC == null) { // We can't do YCC at all -+ if (JPEG.JCS.YCC == null) { // We can't do YCC at all - throw new IIOException("Incompatible color conversion"); - } -- if ((cs != JPEG.YCC) && -+ if ((cs != JPEG.JCS.YCC) && - (cm.getNumComponents() == numComponents)) { -- convert = new ColorConvertOp(JPEG.YCC, cs, null); -+ convert = new ColorConvertOp(JPEG.JCS.YCC, cs, null); - } - break; - case JPEG.JCS_YCCA: - // No conversions available; image must be YCCA -- if ((JPEG.YCC == null) || // We can't do YCC at all -- (cs != JPEG.YCC) || -+ if ((JPEG.JCS.YCC == null) || // We can't do YCC at all -+ (cs != JPEG.JCS.YCC) || - (cm.getNumComponents() != numComponents)) { - throw new IIOException("Incompatible color conversion"); - } -diff --git a/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi.java b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi.java ---- openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi.java -+++ openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi.java -@@ -39,8 +39,6 @@ - private static String [] writerSpiNames = - {"com.sun.imageio.plugins.jpeg.JPEGImageWriterSpi"}; - -- private boolean registered = false; -- - public JPEGImageReaderSpi() { - super(JPEG.vendor, - JPEG.version, -@@ -61,26 +59,6 @@ - ); - } - -- public void onRegistration(ServiceRegistry registry, -- Class category) { -- if (registered) { -- return; -- } -- try { -- java.security.AccessController.doPrivileged( -- new sun.security.action.LoadLibraryAction("jpeg")); -- // Stuff it all into one lib for first pass -- //java.security.AccessController.doPrivileged( -- //new sun.security.action.LoadLibraryAction("imageioIJG")); -- } catch (Throwable e) { // Fail on any Throwable -- // if it can't be loaded, deregister and return -- registry.deregisterServiceProvider(this); -- return; -- } -- -- registered = true; -- } -- - public String getDescription(Locale locale) { - return "Standard JPEG Image Reader"; - } -diff --git a/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java ---- openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java -+++ openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java -@@ -812,13 +812,13 @@ - } - break; - case ColorSpace.TYPE_3CLR: -- if (cs == JPEG.YCC) { -+ if (cs == JPEG.JCS.YCC) { - if (!alpha) { - if (jfif != null) { - convertTosRGB = true; - convertOp = - new ColorConvertOp(cs, -- JPEG.sRGB, -+ JPEG.JCS.sRGB, - null); - outCsType = JPEG.JCS_YCbCr; - } else if (adobe != null) { -@@ -1494,7 +1494,7 @@ - } - break; - case ColorSpace.TYPE_3CLR: -- if (cs == JPEG.YCC) { -+ if (cs == JPEG.JCS.YCC) { - if (alpha) { - retval = JPEG.JCS_YCCA; - } else { -@@ -1533,7 +1533,7 @@ - } - break; - case ColorSpace.TYPE_3CLR: -- if (cs == JPEG.YCC) { -+ if (cs == JPEG.JCS.YCC) { - if (alpha) { - retval = JPEG.JCS_YCCA; - } else { -@@ -1579,7 +1579,7 @@ - } - break; - case ColorSpace.TYPE_3CLR: -- if (cs == JPEG.YCC) { -+ if (cs == JPEG.JCS.YCC) { - if (alpha) { - retval = JPEG.JCS_YCCA; - } else { -diff --git a/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterSpi.java b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterSpi.java ---- openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterSpi.java -+++ openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriterSpi.java -@@ -42,8 +42,6 @@ - private static String [] readerSpiNames = - {"com.sun.imageio.plugins.jpeg.JPEGImageReaderSpi"}; - -- private boolean registered = false; -- - public JPEGImageWriterSpi() { - super(JPEG.vendor, - JPEG.version, -@@ -68,23 +66,6 @@ - return "Standard JPEG Image Writer"; - } - -- public void onRegistration(ServiceRegistry registry, -- Class category) { -- if (registered) { -- return; -- } -- try { -- java.security.AccessController.doPrivileged( -- new sun.security.action.LoadLibraryAction("jpeg")); -- } catch (Throwable e) { // Fail on any Throwable -- // if it can't be loaded, deregister and return -- registry.deregisterServiceProvider(this); -- return; -- } -- -- registered = true; -- } -- - public boolean isFormatLossless() { - return false; - } -diff --git a/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java b/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java ---- openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java -+++ openjdk/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java -@@ -490,7 +490,7 @@ - } - break; - case ColorSpace.TYPE_3CLR: -- if (cs == JPEG.YCC) { -+ if (cs == JPEG.JCS.YCC) { - wantJFIF = false; - componentIDs[0] = (byte) 'Y'; - componentIDs[1] = (byte) 'C'; -diff --git a/src/share/classes/javax/imageio/ImageTypeSpecifier.java b/src/share/classes/javax/imageio/ImageTypeSpecifier.java ---- openjdk/jdk/src/share/classes/javax/imageio/ImageTypeSpecifier.java -+++ openjdk/jdk/src/share/classes/javax/imageio/ImageTypeSpecifier.java -@@ -67,126 +67,13 @@ - * BufferedImage types. - */ - private static ImageTypeSpecifier[] BISpecifier; -- -+ private static ColorSpace sRGB; - // Initialize the standard specifiers - static { -- ColorSpace sRGB = ColorSpace.getInstance(ColorSpace.CS_sRGB); -+ sRGB = ColorSpace.getInstance(ColorSpace.CS_sRGB); - - BISpecifier = - new ImageTypeSpecifier[BufferedImage.TYPE_BYTE_INDEXED + 1]; -- -- BISpecifier[BufferedImage.TYPE_CUSTOM] = null; -- -- BISpecifier[BufferedImage.TYPE_INT_RGB] = -- createPacked(sRGB, -- 0x00ff0000, -- 0x0000ff00, -- 0x000000ff, -- 0x0, -- DataBuffer.TYPE_INT, -- false); -- -- BISpecifier[BufferedImage.TYPE_INT_ARGB] = -- createPacked(sRGB, -- 0x00ff0000, -- 0x0000ff00, -- 0x000000ff, -- 0xff000000, -- DataBuffer.TYPE_INT, -- false); -- -- BISpecifier[BufferedImage.TYPE_INT_ARGB_PRE] = -- createPacked(sRGB, -- 0x00ff0000, -- 0x0000ff00, -- 0x000000ff, -- 0xff000000, -- DataBuffer.TYPE_INT, -- true); -- -- BISpecifier[BufferedImage.TYPE_INT_BGR] = -- createPacked(sRGB, -- 0x000000ff, -- 0x0000ff00, -- 0x00ff0000, -- 0x0, -- DataBuffer.TYPE_INT, -- false); -- -- int[] bOffsRGB = { 2, 1, 0 }; -- BISpecifier[BufferedImage.TYPE_3BYTE_BGR] = -- createInterleaved(sRGB, -- bOffsRGB, -- DataBuffer.TYPE_BYTE, -- false, -- false); -- -- int[] bOffsABGR = { 3, 2, 1, 0 }; -- BISpecifier[BufferedImage.TYPE_4BYTE_ABGR] = -- createInterleaved(sRGB, -- bOffsABGR, -- DataBuffer.TYPE_BYTE, -- true, -- false); -- -- BISpecifier[BufferedImage.TYPE_4BYTE_ABGR_PRE] = -- createInterleaved(sRGB, -- bOffsABGR, -- DataBuffer.TYPE_BYTE, -- true, -- true); -- -- BISpecifier[BufferedImage.TYPE_USHORT_565_RGB] = -- createPacked(sRGB, -- 0xF800, -- 0x07E0, -- 0x001F, -- 0x0, -- DataBuffer.TYPE_USHORT, -- false); -- -- BISpecifier[BufferedImage.TYPE_USHORT_555_RGB] = -- createPacked(sRGB, -- 0x7C00, -- 0x03E0, -- 0x001F, -- 0x0, -- DataBuffer.TYPE_USHORT, -- false); -- -- BISpecifier[BufferedImage.TYPE_BYTE_GRAY] = -- createGrayscale(8, -- DataBuffer.TYPE_BYTE, -- false); -- -- BISpecifier[BufferedImage.TYPE_USHORT_GRAY] = -- createGrayscale(16, -- DataBuffer.TYPE_USHORT, -- false); -- -- BISpecifier[BufferedImage.TYPE_BYTE_BINARY] = -- createGrayscale(1, -- DataBuffer.TYPE_BYTE, -- false); -- -- BufferedImage bi = -- new BufferedImage(1, 1, BufferedImage.TYPE_BYTE_INDEXED); -- IndexColorModel icm = (IndexColorModel)bi.getColorModel(); -- int mapSize = icm.getMapSize(); -- byte[] redLUT = new byte[mapSize]; -- byte[] greenLUT = new byte[mapSize]; -- byte[] blueLUT = new byte[mapSize]; -- byte[] alphaLUT = new byte[mapSize]; -- -- icm.getReds(redLUT); -- icm.getGreens(greenLUT); -- icm.getBlues(blueLUT); -- icm.getAlphas(alphaLUT); -- -- BISpecifier[BufferedImage.TYPE_BYTE_INDEXED] = -- createIndexed(redLUT, greenLUT, blueLUT, alphaLUT, -- 8, -- DataBuffer.TYPE_BYTE); - } - - /** -@@ -1011,7 +898,7 @@ - ImageTypeSpecifier createFromBufferedImageType(int bufferedImageType) { - if (bufferedImageType >= BufferedImage.TYPE_INT_RGB && - bufferedImageType <= BufferedImage.TYPE_BYTE_INDEXED) { -- return BISpecifier[bufferedImageType]; -+ return getSpecifier(bufferedImageType); - } else if (bufferedImageType == BufferedImage.TYPE_CUSTOM) { - throw new IllegalArgumentException("Cannot create from TYPE_CUSTOM!"); - } else { -@@ -1041,7 +928,7 @@ - if (image instanceof BufferedImage) { - int bufferedImageType = ((BufferedImage)image).getType(); - if (bufferedImageType != BufferedImage.TYPE_CUSTOM) { -- return BISpecifier[bufferedImageType]; -+ return getSpecifier(bufferedImageType); - } - } - -@@ -1225,4 +1112,130 @@ - public int hashCode() { - return (9 * colorModel.hashCode()) + (14 * sampleModel.hashCode()); - } -+ -+ private static ImageTypeSpecifier getSpecifier(int type) { -+ if (BISpecifier[type] == null) { -+ BISpecifier[type] = createSpecifier(type); -+ } -+ return BISpecifier[type]; -+ } -+ -+ private static ImageTypeSpecifier createSpecifier(int type) { -+ switch(type) { -+ case BufferedImage.TYPE_INT_RGB: -+ return createPacked(sRGB, -+ 0x00ff0000, -+ 0x0000ff00, -+ 0x000000ff, -+ 0x0, -+ DataBuffer.TYPE_INT, -+ false); -+ -+ case BufferedImage.TYPE_INT_ARGB: -+ return createPacked(sRGB, -+ 0x00ff0000, -+ 0x0000ff00, -+ 0x000000ff, -+ 0xff000000, -+ DataBuffer.TYPE_INT, -+ false); -+ -+ case BufferedImage.TYPE_INT_ARGB_PRE: -+ return createPacked(sRGB, -+ 0x00ff0000, -+ 0x0000ff00, -+ 0x000000ff, -+ 0xff000000, -+ DataBuffer.TYPE_INT, -+ true); -+ -+ case BufferedImage.TYPE_INT_BGR: -+ return createPacked(sRGB, -+ 0x000000ff, -+ 0x0000ff00, -+ 0x00ff0000, -+ 0x0, -+ DataBuffer.TYPE_INT, -+ false); -+ -+ case BufferedImage.TYPE_3BYTE_BGR: -+ return createInterleaved(sRGB, -+ new int[] { 2, 1, 0 }, -+ DataBuffer.TYPE_BYTE, -+ false, -+ false); -+ -+ case BufferedImage.TYPE_4BYTE_ABGR: -+ return createInterleaved(sRGB, -+ new int[] { 3, 2, 1, 0 }, -+ DataBuffer.TYPE_BYTE, -+ true, -+ false); -+ -+ case BufferedImage.TYPE_4BYTE_ABGR_PRE: -+ return createInterleaved(sRGB, -+ new int[] { 3, 2, 1, 0 }, -+ DataBuffer.TYPE_BYTE, -+ true, -+ true); -+ -+ case BufferedImage.TYPE_USHORT_565_RGB: -+ return createPacked(sRGB, -+ 0xF800, -+ 0x07E0, -+ 0x001F, -+ 0x0, -+ DataBuffer.TYPE_USHORT, -+ false); -+ -+ case BufferedImage.TYPE_USHORT_555_RGB: -+ return createPacked(sRGB, -+ 0x7C00, -+ 0x03E0, -+ 0x001F, -+ 0x0, -+ DataBuffer.TYPE_USHORT, -+ false); -+ -+ case BufferedImage.TYPE_BYTE_GRAY: -+ return createGrayscale(8, -+ DataBuffer.TYPE_BYTE, -+ false); -+ -+ case BufferedImage.TYPE_USHORT_GRAY: -+ return createGrayscale(16, -+ DataBuffer.TYPE_USHORT, -+ false); -+ -+ case BufferedImage.TYPE_BYTE_BINARY: -+ return createGrayscale(1, -+ DataBuffer.TYPE_BYTE, -+ false); -+ -+ case BufferedImage.TYPE_BYTE_INDEXED: -+ { -+ -+ BufferedImage bi = -+ new BufferedImage(1, 1, BufferedImage.TYPE_BYTE_INDEXED); -+ IndexColorModel icm = (IndexColorModel)bi.getColorModel(); -+ int mapSize = icm.getMapSize(); -+ byte[] redLUT = new byte[mapSize]; -+ byte[] greenLUT = new byte[mapSize]; -+ byte[] blueLUT = new byte[mapSize]; -+ byte[] alphaLUT = new byte[mapSize]; -+ -+ icm.getReds(redLUT); -+ icm.getGreens(greenLUT); -+ icm.getBlues(blueLUT); -+ icm.getAlphas(alphaLUT); -+ -+ return createIndexed(redLUT, greenLUT, blueLUT, alphaLUT, -+ 8, -+ DataBuffer.TYPE_BYTE); -+ } -+ default: -+ throw new IllegalArgumentException("Invalid BufferedImage type!"); -+ } -+ } -+ - } diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/6729772-opt_cleanup.patch --- a/patches/openjdk/6729772-opt_cleanup.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,708 +0,0 @@ -diff -Nru openjdk.orig/jdk/make/common/Defs.gmk openjdk/jdk/make/common/Defs.gmk ---- openjdk.orig/jdk/make/common/Defs.gmk 2014-07-30 05:48:00.352403475 +0100 -+++ openjdk/jdk/make/common/Defs.gmk 2014-07-30 13:35:00.245289302 +0100 -@@ -416,11 +416,6 @@ - include $(JDK_MAKE_SHARED_DIR)/Defs-java.gmk - - # --# Set opt level to ALT_OPT if set otherwise _OPT --# --POPT = $(_OPT$(ALT_OPT))$(ALT_OPT) -- --# - # Convenient macros - # - -diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk ---- openjdk.orig/jdk/make/common/Defs-linux.gmk 2014-07-30 05:48:00.800409767 +0100 -+++ openjdk/jdk/make/common/Defs-linux.gmk 2014-07-30 13:36:01.586167402 +0100 -@@ -86,18 +86,22 @@ - # - # Default optimization - # --CC_HIGHEST_OPT = -O3 --CC_HIGHER_OPT = -O3 --CC_LOWER_OPT = -O2 --CC_NO_OPT = - --ifeq ($(PRODUCT), java) -- _OPT = $(CC_HIGHER_OPT) --else -- _OPT = $(CC_LOWER_OPT) -- CPPFLAGS_DBG += -DLOGGING -+ifndef OPTIMIZATION_LEVEL -+ ifeq ($(PRODUCT), java) -+ OPTIMIZATION_LEVEL = HIGHER -+ else -+ OPTIMIZATION_LEVEL = LOWER -+ endif - endif - -+CC_OPT/NONE = -+CC_OPT/LOWER = -O2 -+CC_OPT/HIGHER = -O3 -+CC_OPT/HIGHEST = -O3 -+ -+CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL)) -+ - # For all platforms, do not omit the frame pointer register usage. - # We need this frame pointer to make it easy to walk the stacks. - # This should be the default on X86, but ia64 and amd64 may not have this -@@ -131,18 +135,6 @@ - LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH)) - endif - --# Add in platform specific optimizations for all opt levels --CC_HIGHEST_OPT += $(_OPT_$(ARCH)) --CC_HIGHER_OPT += $(_OPT_$(ARCH)) --CC_LOWER_OPT += $(_OPT_$(ARCH)) -- --# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off --ifdef NO_OPTIMIZATIONS -- CC_HIGHEST_OPT = $(CC_NO_OPT) -- CC_HIGHER_OPT = $(CC_NO_OPT) -- CC_LOWER_OPT = $(CC_NO_OPT) --endif -- - # - # Selection of warning messages - # -@@ -188,19 +180,19 @@ - CFLAGS_REQUIRED += $(DEBUG_FLAG) - endif - --CFLAGS_OPT = $(POPT) -+CFLAGS_OPT = $(CC_OPT) - CFLAGS_DBG = $(DEBUG_FLAG) - CFLAGS_COMMON += $(CFLAGS_REQUIRED) - - CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS) --CXXFLAGS_OPT = $(POPT) -+CXXFLAGS_OPT = $(CC_OPT) - CXXFLAGS_DBG = $(DEBUG_FLAG) - CXXFLAGS_COMMON += $(CFLAGS_REQUIRED) - - # FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java - ifeq ($(FASTDEBUG), true) -- CFLAGS_DBG += $(CC_LOWER_OPT) -- CXXFLAGS_DBG += $(CC_LOWER_OPT) -+ CFLAGS_DBG += $(CC_OPT/LOWER) -+ CXXFLAGS_DBG += $(CC_OPT/LOWER) - endif - - CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"' -@@ -221,6 +213,9 @@ - - CPPFLAGS_OPT = - CPPFLAGS_DBG = -DDEBUG -+ifneq ($(PRODUCT), java) -+ CPPFLAGS_DBG += -DLOGGING -+endif - - ifdef LIBRARY - # Libraries need to locate other libraries at runtime, and you can tell -diff -Nru openjdk.orig/jdk/make/common/Defs-solaris.gmk openjdk/jdk/make/common/Defs-solaris.gmk ---- openjdk.orig/jdk/make/common/Defs-solaris.gmk 2014-07-30 05:48:01.208415498 +0100 -+++ openjdk/jdk/make/common/Defs-solaris.gmk 2014-07-30 13:35:00.245289302 +0100 -@@ -83,15 +83,16 @@ - # - # Java default optimization (-x04/-O2) etc. Applies to the VM. - # --ifeq ($(PRODUCT), java) -- _OPT = $(CC_HIGHER_OPT) --else -- _OPT = $(CC_LOWER_OPT) -- CPPFLAGS_DBG += -DLOGGING -DDBINFO -+ifndef OPTIMIZATION_LEVEL -+ ifeq ($(PRODUCT), java) -+ OPTIMIZATION_LEVEL = HIGHER -+ else -+ OPTIMIZATION_LEVEL = LOWER -+ endif - endif - - # --# If -Xa is in CFLAGS_COMMON it will end up ahead of $(POPT) for the -+# If -Xa is in CFLAGS_COMMON it will end up ahead of $(CC_OPT) for the - # optimized build, and that ordering of the flags completely freaks - # out cc. Hence, -Xa is instead in each CFLAGS variant. - # -@@ -116,8 +117,8 @@ - # - # Debug flag for C and C++ compiler - # --CFLAGS_DEBUG_OPTION=-g --CXXFLAGS_DEBUG_OPTION=-g -+CFLAGS_DEBUG_OPTION = -g $(CC_OPT/NONE) -+CXXFLAGS_DEBUG_OPTION = -g $(CXX_OPT/NONE) - - # Turn off -g if we are doing tcov build - ifdef TCOV_BUILD -@@ -135,15 +136,14 @@ - # Performance/size of files should be about the same, maybe smaller. - # - ifeq ($(FASTDEBUG), true) -- CC_FASTDEBUG_OPT = $(CC_LOWER_OPT) -- CFLAGS_DEBUG_OPTION = -g $(CC_FASTDEBUG_OPT) -- CXXFLAGS_DEBUG_OPTION = -g0 $(CC_FASTDEBUG_OPT) -+ CFLAGS_DEBUG_OPTION = -g $(CC_OPT/LOWER) -+ CXXFLAGS_DEBUG_OPTION = -g0 $(CXX_OPT/LOWER) - endif - - CFLAGS_COMMON = -v -mt -L$(OBJDIR) -xc99=%none - CFLAGS_COMMON += -xCC - CFLAGS_COMMON += -errshort=tags --CFLAGS_OPT = $(POPT) -+CFLAGS_OPT = $(CC_OPT) - CFLAGS_DBG = $(CFLAGS_DEBUG_OPTION) - CFLAGS_COMMON += -Xa $(CFLAGS_REQUIRED) - -@@ -171,7 +171,7 @@ - CXXFLAGS_COMMON += -errwarn=%all - endif - --CXXFLAGS_OPT = $(POPT) -+CXXFLAGS_OPT = $(CXX_OPT) - CXXFLAGS_DBG = $(CXXFLAGS_DEBUG_OPTION) - CXXFLAGS_COMMON += $(CFLAGS_REQUIRED) - -@@ -241,6 +241,10 @@ - CPPFLAGS_OPT = - CPPFLAGS_DBG = -DDEBUG - -+ifneq ($(PRODUCT), java) -+ CPPFLAGS_DBG += -DLOGGING -DDBINFO -+endif -+ - ifeq ($(ARCH_FAMILY), i586) - # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the - # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN -@@ -384,63 +388,151 @@ - # Different "levels" of optimization. - # - ifeq ($(CC_VERSION),gcc) -- CC_HIGHEST_OPT = -O3 -- CC_HIGHER_OPT = -O3 -- CC_LOWER_OPT = -O2 -+ -+ CC_OPT/NONE = -+ CC_OPT/LOWER = -O2 -+ CC_OPT/HIGHER = -O3 -+ CC_OPT/HIGHEST = -O3 -+ -+ CXX_OPT/NONE = -+ CXX_OPT/LOWER = -O2 -+ CXX_OPT/HIGHER = -O3 -+ CXX_OPT/HIGHEST = -O3 -+ - CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer - CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -+ - # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) - # (See Rules.gmk) May need to wait for gcc 5? - AUTOMATIC_PCH_OPTION = -+ - else -+ - # Highest could be -xO5, but indications are that -xO5 should be reserved - # for a per-file use, on sources with known performance impacts. -- CC_HIGHEST_OPT = -xO4 -- CC_HIGHER_OPT = -xO4 -- CC_LOWER_OPT = -xO2 -+ OPT_LEVEL/LOWER = 2 -+ OPT_LEVEL/HIGHER = 4 -+ OPT_LEVEL/HIGHEST = 4 -+ -+ CC_OPT/NONE = -+ CC_OPT/LOWER = $(OPT_LEVEL/LOWER:%=-xO%) -+ CC_OPT/HIGHER = $(OPT_LEVEL/HIGHER:%=-xO%) -+ CC_OPT/HIGHEST = $(OPT_LEVEL/HIGHEST:%=-xO%) -+ -+ CXX_OPT/NONE = -+ CXX_OPT/LOWER = $(OPT_LEVEL/LOWER:%=-xO%) -+ CXX_OPT/HIGHER = $(OPT_LEVEL/HIGHER:%=-xO%) -+ CXX_OPT/HIGHEST = $(OPT_LEVEL/HIGHEST:%=-xO%) -+ -+ # We need stack frames at all times -+ USE_XKEEPFRAME_OPTION = false -+ ifeq ($(USE_XKEEPFRAME_OPTION),true) -+ -+ # Unknown spelling on this option at this time (Maybe in SS13?) -+ CC_XKEEPFRAME_OPTIONS = -xkeepframe -+ CXX_XKEEPFRAME_OPTIONS = -xkeepframe -+ -+ else -+ -+ # On X86, make sure tail call optimization is off -+ # The z and y are the tail call optimizations. -+ ifeq ($(ARCH_FAMILY), i586) -+ ifeq ($(shell $(EXPR) $(CC_VER) \> 5.8), 1) -+ # Somehow, tail call optimization is creeping in. -+ # Make sure it is off. -+ # WARNING: These may cause compiler warnings about duplicate -O options -+ CC_XKEEPFRAME_OPTIONS += -Wu,-O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz -+ CXX_XKEEPFRAME_OPTIONS += -Qoption ube -O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz -+ endif -+ endif -+ -+ # On i586 we need to tell the code generator to ALWAYS use a -+ # frame pointer. -+ ifeq ($(ARCH_FAMILY), i586) -+ # Note that in 5.7, this is done with -xregs=no%frameptr -+ ifeq ($(CC_VER), 5.5) -+ # It's not exactly clear when this optimization kicks in, the -+ # current assumption is -xO4 or greater and for C++ with -+ # the -features=no%except option and -xO4 and greater. -+ # Bottom line is, we ALWAYS want a frame pointer! -+ CC_XKEEPFRAME_OPTIONS += -Wu,-Z~B -+ CXX_XKEEPFRAME_OPTIONS += -Qoption ube -Z~B -+ endif -+ ifeq ($(shell $(EXPR) $(CC_VER) \> 5.6), 1) -+ # Do NOT use frame pointer register as a general purpose opt register -+ CC_OPT/NONE += -xregs=no%frameptr -+ CXX_OPT/NONE += -xregs=no%frameptr -+ CC_XKEEPFRAME_OPTIONS += -xregs=no%frameptr -+ CXX_XKEEPFRAME_OPTIONS += -xregs=no%frameptr -+ endif -+ endif -+ -+ # Optimizer for sparc needs to be told not to do certain things -+ # related to frames or save instructions. -+ ifeq ($(ARCH_FAMILY), sparc) -+ # Do not use save instructions instead of add instructions -+ # This was an optimization starting in SC5.0 that made it hard for us to -+ # find the "save" instruction (which got turned into an "add") -+ CC_XKEEPFRAME_OPTIONS += -Wc,-Qrm-s -+ CXX_XKEEPFRAME_OPTIONS += -Qoption cg -Qrm-s -+ # Don't allow tail call code optimization. Started in SC5.0. -+ # We don't like code of this form: -+ # save -+ # -+ # call foo -+ # restore -+ # because we can't tell if the method will have a stack frame -+ # and register windows or not. -+ CC_XKEEPFRAME_OPTIONS += -Wc,-Qiselect-T0 -+ CXX_XKEEPFRAME_OPTIONS += -Qoption cg -Qiselect-T0 -+ endif -+ -+ endif -+ -+ # Extra options used with HIGHEST - # -- # WARNING: Use of _OPT=$(CC_HIGHEST_OPT) in your Makefile needs to be -+ # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be - # done with care, there are some assumptions below that need to - # be understood about the use of pointers, and IEEE behavior. - # - # Use non-standard floating point mode (not IEEE 754) -- CC_HIGHEST_OPT += -fns -+ CC_HIGHEST_EXTRAS += -fns - # Do some simplification of floating point arithmetic (not IEEE 754) -- CC_HIGHEST_OPT += -fsimple -+ CC_HIGHEST_EXTRAS += -fsimple - # Use single precision floating point with 'float' -- CC_HIGHEST_OPT += -fsingle -+ CC_HIGHEST_EXTRAS += -fsingle - # Assume memory references via basic pointer types do not alias - # (Source with excessing pointer casting and data access with mixed - # pointer types are not recommended) -- CC_HIGHEST_OPT += -xalias_level=basic -+ CC_HIGHEST_EXTRAS += -xalias_level=basic - # Use intrinsic or inline versions for math/std functions - # (If you expect perfect errno behavior, do not use this) -- CC_HIGHEST_OPT += -xbuiltin=%all -+ CC_HIGHEST_EXTRAS += -xbuiltin=%all - # Loop data dependency optimizations (need -xO3 or higher) -- CC_HIGHEST_OPT += -xdepend -+ CC_HIGHEST_EXTRAS += -xdepend - # Pointer parameters to functions do not overlap - # (Similar to -xalias_level=basic usage, but less obvious sometimes. - # If you pass in multiple pointers to the same data, do not use this) -- CC_HIGHEST_OPT += -xrestrict -+ CC_HIGHEST_EXTRAS += -xrestrict - # Inline some library routines - # (If you expect perfect errno behavior, do not use this) -- CC_HIGHEST_OPT += -xlibmil -+ CC_HIGHEST_EXTRAS += -xlibmil - # Use optimized math routines - # (If you expect perfect errno behavior, do not use this) - # Can cause undefined external on Solaris 8 X86 on __sincos, removing for now -- # CC_HIGHEST_OPT += -xlibmopt -+ # CC_HIGHEST_EXTRAS += -xlibmopt - ifeq ($(ARCH_FAMILY), sparc) - # Assume at most 8byte alignment, raise SIGBUS on error - ### Presents an ABI issue with customer JNI libs? -- ####CC_HIGHEST_OPT += -xmemalign=8s -+ ####CC_HIGHEST_EXTRAS += -xmemalign=8s - # Automatic prefetch instructions, explicit prefetch macros -- CC_HIGHEST_OPT += -xprefetch=auto,explicit -+ CC_HIGHEST_EXTRAS += -xprefetch=auto,explicit - # Pick ultra as the chip to optimize to -- CC_HIGHEST_OPT += -xchip=ultra -+ CC_HIGHEST_EXTRAS += -xchip=ultra - endif - ifeq ($(ARCH), i586) - # Pick pentium as the chip to optimize to -- CC_HIGHEST_OPT += -xchip=pentium -+ CC_HIGHEST_EXTRAS += -xchip=pentium - endif - ifdef LIBRARY - # The Solaris CBE (Common Build Environment) requires that the use -@@ -450,9 +542,6 @@ - CFLAGS_REQUIRED_sparcv9 += -xregs=no%appl - endif - ifeq ($(shell $(EXPR) $(CC_VER) \> 5.6), 1) -- # Do NOT use the frame pointer register as a general purpose opt register -- CFLAGS_REQUIRED_i586 += -xregs=no%frameptr -- CFLAGS_REQUIRED_amd64 += -xregs=no%frameptr - # We MUST allow data alignment of 4 for sparc V8 (32bit) - # Presents an ABI issue with customer JNI libs? We must be able to - # to handle 4byte aligned objects? (rare occurance, but possible?) -@@ -466,77 +555,28 @@ - # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) - # (See Rules.gmk) The SS11 -xpch=auto* options appear to be broken. - AUTOMATIC_PCH_OPTION = --endif --CC_NO_OPT = -- --# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off --ifdef NO_OPTIMIZATIONS -- CC_HIGHEST_OPT = $(CC_NO_OPT) -- CC_HIGHER_OPT = $(CC_NO_OPT) -- CC_LOWER_OPT = $(CC_NO_OPT) --endif -+ -+ # Add in keep frame options -+ CC_OPT/LOWER += $(CC_XKEEPFRAME_OPTIONS) -+ CC_OPT/HIGHER += $(CC_XKEEPFRAME_OPTIONS) -+ CC_OPT/HIGHEST += $(CC_XKEEPFRAME_OPTIONS) -+ CXX_OPT/LOWER += $(CXX_XKEEPFRAME_OPTIONS) -+ CXX_OPT/HIGHER += $(CXX_XKEEPFRAME_OPTIONS) -+ CXX_OPT/HIGHEST += $(CXX_XKEEPFRAME_OPTIONS) -+ -+ # Add in highest optimization settings -+ CC_OPT/HIGHEST += $(CC_HIGHEST_EXTRAS) -+ CXX_OPT/HIGHEST += $(CC_HIGHEST_EXTRAS) -+ -+endif -+ -+# Default optimization settings based on level. -+CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL)) -+CXX_OPT = $(CXX_OPT/$(OPTIMIZATION_LEVEL)) - - # Flags required all the time - CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH)) - --# Add processor specific options for optimizations --CC_HIGHEST_OPT += $(_OPT_$(ARCH)) --CC_HIGHER_OPT += $(_OPT_$(ARCH)) --CC_LOWER_OPT += $(_OPT_$(ARCH)) -- --# Secret compiler optimization options that should be in the above macros --# but since they differ in format from C to C++, are added into the C or --# C++ specific macros for compiler flags. --# --# On i586 we need to tell the code generator to ALWAYS use a --# frame pointer. --ifeq ($(ARCH_FAMILY), i586) -- # Note that in 5.7, this is done with -xregs=no%frameptr -- ifeq ($(CC_VER), 5.5) -- # It's not exactly clear when this optimization kicks in, the -- # current assumption is -xO4 or greater and for C++ with -- # the -features=no%except option and -xO4 and greater. -- # Bottom line is, we ALWAYS want a frame pointer! -- CXXFLAGS_OPT += -Qoption ube -Z~B -- CFLAGS_OPT += -Wu,-Z~B -- ifeq ($(FASTDEBUG), true) -- CXXFLAGS_DBG += -Qoption ube -Z~B -- CFLAGS_DBG += -Wu,-Z~B -- endif -- endif --endif --# --# Optimizer for sparc needs to be told not to do certain things --# related to frames or save instructions. --ifeq ($(ARCH_FAMILY), sparc) -- # NOTE: Someday the compilers will provide a high-level option for this. -- # Use save instructions instead of add instructions -- # This was an optimization starting in SC5.0 that made it hard for us to -- # find the "save" instruction (which got turned into an "add") -- CXXFLAGS_OPT += -Qoption cg -Qrm-s -- CFLAGS_OPT += -Wc,-Qrm-s -- ifeq ($(FASTDEBUG), true) -- CXXFLAGS_DBG += -Qoption cg -Qrm-s -- CFLAGS_DBG += -Wc,-Qrm-s -- endif -- # -- # NOTE: Someday the compilers will provide a high-level option for this. -- # Don't allow tail call code optimization. Started in SC5.0. -- # We don't like code of this form: -- # save -- # -- # call foo -- # restore -- # because we can't tell if the method will have a stack frame -- # and register windows or not. -- CXXFLAGS_OPT += -Qoption cg -Qiselect-T0 -- CFLAGS_OPT += -Wc,-Qiselect-T0 -- ifeq ($(FASTDEBUG), true) -- CXXFLAGS_DBG += -Qoption cg -Qiselect-T0 -- CFLAGS_DBG += -Wc,-Qiselect-T0 -- endif --endif -- - # - # Path and option to link against the VM, if you have to. Note that - # there are libraries that link against only -ljava, but they do get -diff -Nru openjdk.orig/jdk/make/common/Defs-windows.gmk openjdk/jdk/make/common/Defs-windows.gmk ---- openjdk.orig/jdk/make/common/Defs-windows.gmk 2014-07-14 04:24:43.000000000 +0100 -+++ openjdk/jdk/make/common/Defs-windows.gmk 2014-07-30 13:41:14.578647575 +0100 -@@ -96,6 +96,7 @@ - OPTIMIZATION_LEVEL = LOWER - endif - endif -+ - ifndef FASTDEBUG_OPTIMIZATION_LEVEL - FASTDEBUG_OPTIMIZATION_LEVEL = LOWER - endif -@@ -143,6 +144,7 @@ - endif - - else # CC_VERSION -+ - # GCC not supported, but left for historical reference... - CC_OPT/NONE = - CC_OPT/LOWER = -O2 -diff -Nru openjdk.orig/jdk/make/common/Library.gmk openjdk/jdk/make/common/Library.gmk ---- openjdk.orig/jdk/make/common/Library.gmk 2014-07-14 04:24:43.000000000 +0100 -+++ openjdk/jdk/make/common/Library.gmk 2014-07-30 13:35:00.245289302 +0100 -@@ -218,7 +218,7 @@ - # - $(ACTUAL_LIBRARY):: $(COMPILE_FILES_o) $(FILES_m) $(FILES_reorder) - @$(prep-target) -- @$(ECHO) "STATS: LIBRARY=$(LIBRARY), PRODUCT=$(PRODUCT), _OPT=$(_OPT)" -+ @$(ECHO) "STATS: LIBRARY=$(LIBRARY), PRODUCT=$(PRODUCT), OPTIMIZATION_LEVEL=$(OPTIMIZATION_LEVEL)" - @$(ECHO) "Rebuilding $@ because of $?" - ifeq ($(LIBRARY), fdlibm) - $(AR) -r $@ $(FILES_o) -diff -Nru openjdk.orig/jdk/make/common/shared/Defs.gmk openjdk/jdk/make/common/shared/Defs.gmk ---- openjdk.orig/jdk/make/common/shared/Defs.gmk 2014-07-30 05:47:57.056357179 +0100 -+++ openjdk/jdk/make/common/shared/Defs.gmk 2014-07-30 13:35:00.245289302 +0100 -@@ -282,9 +282,6 @@ - PROMOTED_BUILD_BASEDIR = $(PROMOTED_RE_AREA)/$(PROMOTED_BUILD_LATEST) - PROMOTED_BUILD_BINARIES = $(PROMOTED_BUILD_BASEDIR)/binaries - --# OPT: Changes what the optimizations settings (in _OPT) --POPT = $(_OPT$(ALT_OPT))$(ALT_OPT) -- - # PARALLEL_COMPILE_JOBS: is the number of compiles done in parallel. - # If the user sets ALT_PARALLEL_COMPILE_JOBS, then COMPILE_APPROACH is set - # to parallel. -diff -Nru openjdk.orig/jdk/make/java/fdlibm/Makefile openjdk/jdk/make/java/fdlibm/Makefile ---- openjdk.orig/jdk/make/java/fdlibm/Makefile 2014-07-14 04:24:43.000000000 +0100 -+++ openjdk/jdk/make/java/fdlibm/Makefile 2014-07-30 13:35:00.245289302 +0100 -@@ -33,6 +33,7 @@ - BUILDDIR = ../.. - LIBRARY = fdlibm - PRODUCT = java -+ - include $(BUILDDIR)/common/Defs.gmk - - # -@@ -40,10 +41,10 @@ - # - FDLIBM_SRC = $(SHARE_SRC)/native/java/lang/fdlibm - --# windows compiler flags -+# Windows: compiler flags - ifeq ($(PLATFORM),windows) - # Turn all optimizations off -- _OPT = $(CC_NO_OPT) -+ OPTIMIZATION_LEVEL = NONE - OTHER_CFLAGS = - CPPFLAGS_DBG += -DLOGGING - # Files built here do not compile with warning level 3 if warnings are fatal -@@ -51,6 +52,15 @@ - endif - - # -+# Linux: Disable optimization to get correctly reproducible -+# floating-point results. -+# -+ifeq ($(PLATFORM),linux) -+ # Turn all optimizations off -+ OPTIMIZATION_LEVEL = NONE -+endif -+ -+# - # Include path. - # - OTHER_INCLUDES = -I$(FDLIBM_SRC)/include -@@ -71,15 +81,6 @@ - include $(BUILDDIR)/common/Library.gmk - - # --# Disable optimization to get correctly reproducible --# floating-point results. --# --ifeq ($(PLATFORM),linux) -- # Turn all optimizations off -- _OPT = $(CC_NO_OPT) --endif -- --# - # Find fdlibm source files. - # - vpath %.c -diff -Nru openjdk.orig/jdk/make/java/java_hprof_demo/Makefile openjdk/jdk/make/java/java_hprof_demo/Makefile ---- openjdk.orig/jdk/make/java/java_hprof_demo/Makefile 2014-07-14 04:24:43.000000000 +0100 -+++ openjdk/jdk/make/java/java_hprof_demo/Makefile 2014-07-30 13:35:00.245289302 +0100 -@@ -28,14 +28,14 @@ - PRODUCT = sun - LIBRARY_OUTPUT = hprof_jvmti - --# Configure the CFLAGS for this library. -+# Use highest optimization -+OPTIMIZATION_LEVEL = HIGHEST - -+# Configure the CFLAGS for this library. - FILES_m = mapfile-vers - - include $(BUILDDIR)/common/Defs.gmk - --_OPT=$(CC_HIGHEST_OPT) -- - SRCDIR=$(SHARE_SRC)/demo/jvmti/hprof - PSRCDIR=$(PLATFORM_SRC)/demo/jvmti/hprof - -diff -Nru openjdk.orig/jdk/make/sun/awt/Makefile openjdk/jdk/make/sun/awt/Makefile ---- openjdk.orig/jdk/make/sun/awt/Makefile 2014-07-30 05:47:57.596364764 +0100 -+++ openjdk/jdk/make/sun/awt/Makefile 2014-07-30 13:35:00.245289302 +0100 -@@ -34,17 +34,13 @@ - LIBRARY = awt - PRODUCT = sun - --# - # Tell Defs.gmk that VIS is needed --# - VIS_NEEDED=true - --include $(BUILDDIR)/common/Defs.gmk -- --# - # Use highest optimization level --# --_OPT = $(CC_HIGHEST_OPT) -+OPTMIZATION_LEVEL = HIGHEST -+ -+include $(BUILDDIR)/common/Defs.gmk - - OTHER_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES - -diff -Nru openjdk.orig/jdk/make/sun/font/Makefile openjdk/jdk/make/sun/font/Makefile ---- openjdk.orig/jdk/make/sun/font/Makefile 2014-07-30 05:47:59.920397407 +0100 -+++ openjdk/jdk/make/sun/font/Makefile 2014-07-30 13:35:00.245289302 +0100 -@@ -35,6 +35,9 @@ - # Indicate we want the C++ compiler to do the linking. - CPLUSPLUSLIBRARY=true - -+# Use higher optimization level -+OPTIMIZATION_LEVEL = HIGHER -+ - include $(BUILDDIR)/common/Defs.gmk - - # -@@ -48,11 +51,6 @@ - # Files - # - --# --# Use higher optimization level --# --_OPT = $(CC_HIGHER_OPT) -- - include FILES_c.gmk - - AUTO_FILES_JAVA_DIRS = sun/font -diff -Nru openjdk.orig/jdk/make/sun/font/t2k/Makefile openjdk/jdk/make/sun/font/t2k/Makefile ---- openjdk.orig/jdk/make/sun/font/t2k/Makefile 2014-07-14 04:24:43.000000000 +0100 -+++ openjdk/jdk/make/sun/font/t2k/Makefile 2014-07-30 13:35:00.245289302 +0100 -@@ -39,12 +39,10 @@ - # for a few ones with native methods) so shouldn't clobber them. - DONT_CLOBBER_CLASSES=true - --include $(BUILDDIR)/common/Defs.gmk -- --# - # Use higher optimization level --# --_OPT = $(CC_HIGHER_OPT) -+OPTIMIZATION_LEVEL = HIGHER -+ -+include $(BUILDDIR)/common/Defs.gmk - - # - # Files -diff -Nru openjdk.orig/jdk/make/sun/image/generic/Makefile openjdk/jdk/make/sun/image/generic/Makefile ---- openjdk.orig/jdk/make/sun/image/generic/Makefile 2014-07-14 04:24:43.000000000 +0100 -+++ openjdk/jdk/make/sun/image/generic/Makefile 2014-07-30 13:35:00.245289302 +0100 -@@ -31,12 +31,11 @@ - PACKAGE = sun.awt.medialib - LIBRARY = mlib_image - PRODUCT = sun --include $(BUILDDIR)/common/Defs.gmk - --# - # Use highest level of optimization on this library --# --_OPT = $(CC_HIGHEST_OPT) -+OPTIMIZATION_LEVEL = HIGHEST -+ -+include $(BUILDDIR)/common/Defs.gmk - - # - # Use mapfile -diff -Nru openjdk.orig/jdk/make/sun/image/vis/Makefile openjdk/jdk/make/sun/image/vis/Makefile ---- openjdk.orig/jdk/make/sun/image/vis/Makefile 2014-07-14 04:24:43.000000000 +0100 -+++ openjdk/jdk/make/sun/image/vis/Makefile 2014-07-30 13:35:00.245289302 +0100 -@@ -31,17 +31,13 @@ - LIBRARY = mlib_image_v - PRODUCT = sun - --# - # Tell Defs.gmk we need VIS instructions --# - VIS_NEEDED=true - --include $(BUILDDIR)/common/Defs.gmk -- --# - # Select highest level of optimization for this library --# --_OPT = $(CC_HIGHEST_OPT) -+OPTIMIZATION_LEVEL = HIGHEST -+ -+include $(BUILDDIR)/common/Defs.gmk - - # - # Use generic mapfile -diff -Nru openjdk.orig/jdk/make/sun/jpeg/Makefile openjdk/jdk/make/sun/jpeg/Makefile ---- openjdk.orig/jdk/make/sun/jpeg/Makefile 2014-07-30 05:47:56.980356112 +0100 -+++ openjdk/jdk/make/sun/jpeg/Makefile 2014-07-30 13:35:00.245289302 +0100 -@@ -27,12 +27,11 @@ - PACKAGE = sun.awt - LIBRARY = jpeg - PRODUCT = sun --include $(BUILDDIR)/common/Defs.gmk - --# - # Use highest optimization level --# --_OPT = $(CC_HIGHEST_OPT) -+OPTIMIZATION_LEVEL = HIGHEST -+ -+include $(BUILDDIR)/common/Defs.gmk - - # - # Files diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/6791502-invalid_icc_profile.patch --- a/patches/openjdk/6791502-invalid_icc_profile.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,269 +0,0 @@ -diff -Nru openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c ---- openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2013-08-30 15:28:52.333056323 +0100 -+++ openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2013-08-30 15:31:17.627316140 +0100 -@@ -403,7 +403,7 @@ - data->jpegObj = cinfo; - cinfo->client_data = data; - --#ifdef DEBUG -+#ifdef DEBUG_IIO_JPEG - printf("new structures: data is %p, cinfo is %p\n", data, cinfo); - #endif - -@@ -686,7 +686,7 @@ - j_decompress_ptr decomp; - - qlen = (*env)->GetArrayLength(env, qtables); --#ifdef DEBUG -+#ifdef DEBUG_IIO_JPEG - printf("in setQTables, qlen = %d, write is %d\n", qlen, write); - #endif - if (qlen > NUM_QUANT_TBLS) { -@@ -912,7 +912,7 @@ - return FALSE; - } - --#ifdef DEBUG -+#ifdef DEBUG_IIO_JPEG - printf("Filling input buffer, remaining skip is %ld, ", - sb->remaining_skip); - printf("Buffer length is %d\n", sb->bufferLength); -@@ -942,7 +942,7 @@ - cinfo->err->error_exit((j_common_ptr) cinfo); - } - --#ifdef DEBUG -+#ifdef DEBUG_IIO_JPEG - printf("Buffer filled. ret = %d\n", ret); - #endif - /* -@@ -953,7 +953,7 @@ - */ - if (ret <= 0) { - jobject reader = data->imageIOobj; --#ifdef DEBUG -+#ifdef DEBUG_IIO_JPEG - printf("YO! Early EOI! ret = %d\n", ret); - #endif - RELEASE_ARRAYS(env, data, src->next_input_byte); -@@ -1252,21 +1252,24 @@ - { - jpeg_saved_marker_ptr marker; - int num_markers = 0; -+ int num_found_markers = 0; - int seq_no; - JOCTET *icc_data; -+ JOCTET *dst_ptr; - unsigned int total_length; - #define MAX_SEQ_NO 255 // sufficient since marker numbers are bytes -- char marker_present[MAX_SEQ_NO+1]; // 1 if marker found -- unsigned int data_length[MAX_SEQ_NO+1]; // size of profile data in marker -- unsigned int data_offset[MAX_SEQ_NO+1]; // offset for data in marker -+ jpeg_saved_marker_ptr icc_markers[MAX_SEQ_NO + 1]; -+ int first; // index of the first marker in the icc_markers array -+ int last; // index of the last marker in the icc_markers array - jbyteArray data = NULL; - - /* This first pass over the saved markers discovers whether there are - * any ICC markers and verifies the consistency of the marker numbering. - */ - -- for (seq_no = 1; seq_no <= MAX_SEQ_NO; seq_no++) -- marker_present[seq_no] = 0; -+ for (seq_no = 0; seq_no <= MAX_SEQ_NO; seq_no++) -+ icc_markers[seq_no] = NULL; -+ - - for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { - if (marker_is_icc(marker)) { -@@ -1278,37 +1281,58 @@ - return NULL; - } - seq_no = GETJOCTET(marker->data[12]); -- if (seq_no <= 0 || seq_no > num_markers) { -+ -+ /* Some third-party tools produce images with profile chunk -+ * numeration started from zero. It is inconsistent with ICC -+ * spec, but seems to be recognized by majority of image -+ * processing tools, so we should be more tolerant to this -+ * departure from the spec. -+ */ -+ if (seq_no < 0 || seq_no > num_markers) { - JNU_ThrowByName(env, "javax/imageio/IIOException", - "Invalid icc profile: bad sequence number"); - return NULL; - } -- if (marker_present[seq_no]) { -+ if (icc_markers[seq_no] != NULL) { - JNU_ThrowByName(env, "javax/imageio/IIOException", - "Invalid icc profile: duplicate sequence numbers"); - return NULL; - } -- marker_present[seq_no] = 1; -- data_length[seq_no] = marker->data_length - ICC_OVERHEAD_LEN; -+ icc_markers[seq_no] = marker; -+ num_found_markers ++; - } - } - - if (num_markers == 0) - return NULL; // There is no profile - -- /* Check for missing markers, count total space needed, -- * compute offset of each marker's part of the data. -- */ -+ if (num_markers != num_found_markers) { -+ JNU_ThrowByName(env, "javax/imageio/IIOException", -+ "Invalid icc profile: invalid number of icc markers"); -+ return NULL; -+ } -+ -+ first = icc_markers[0] ? 0 : 1; -+ last = num_found_markers + first; - -+ /* Check for missing markers, count total space needed. -+ */ - total_length = 0; -- for (seq_no = 1; seq_no <= num_markers; seq_no++) { -- if (marker_present[seq_no] == 0) { -+ for (seq_no = first; seq_no < last; seq_no++) { -+ unsigned int length; -+ if (icc_markers[seq_no] == NULL) { - JNU_ThrowByName(env, "javax/imageio/IIOException", - "Invalid icc profile: missing sequence number"); - return NULL; - } -- data_offset[seq_no] = total_length; -- total_length += data_length[seq_no]; -+ /* check the data length correctness */ -+ length = icc_markers[seq_no]->data_length; -+ if (ICC_OVERHEAD_LEN > length || length > MAX_BYTES_IN_MARKER) { -+ JNU_ThrowByName(env, "javax/imageio/IIOException", -+ "Invalid icc profile: invalid data length"); -+ return NULL; -+ } -+ total_length += (length - ICC_OVERHEAD_LEN); - } - - if (total_length <= 0) { -@@ -1337,19 +1361,14 @@ - } - - /* and fill it in */ -- for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { -- if (marker_is_icc(marker)) { -- JOCTET FAR *src_ptr; -- JOCTET *dst_ptr; -- unsigned int length; -- seq_no = GETJOCTET(marker->data[12]); -- dst_ptr = icc_data + data_offset[seq_no]; -- src_ptr = marker->data + ICC_OVERHEAD_LEN; -- length = data_length[seq_no]; -- while (length--) { -- *dst_ptr++ = *src_ptr++; -- } -- } -+ dst_ptr = icc_data; -+ for (seq_no = first; seq_no < last; seq_no++) { -+ JOCTET FAR *src_ptr = icc_markers[seq_no]->data + ICC_OVERHEAD_LEN; -+ unsigned int length = -+ icc_markers[seq_no]->data_length - ICC_OVERHEAD_LEN; -+ -+ memcpy(dst_ptr, src_ptr, length); -+ dst_ptr += length; - } - - /* finally, unpin the array */ -@@ -1565,6 +1584,7 @@ - j_decompress_ptr cinfo; - struct jpeg_source_mgr *src; - sun_jpeg_error_ptr jerr; -+ jbyteArray profileData = NULL; - - if (data == NULL) { - JNU_ThrowByName(env, -@@ -1592,7 +1612,7 @@ - return retval; - } - --#ifdef DEBUG -+#ifdef DEBUG_IIO_JPEG - printf("In readImageHeader, data is %p cinfo is %p\n", data, cinfo); - printf("clearFirst is %d\n", clearFirst); - #endif -@@ -1619,7 +1639,7 @@ - if (ret == JPEG_HEADER_TABLES_ONLY) { - retval = JNI_TRUE; - imageio_term_source(cinfo); // Pushback remaining buffer contents --#ifdef DEBUG -+#ifdef DEBUG_IIO_JPEG - printf("just read tables-only image; q table 0 at %p\n", - cinfo->quant_tbl_ptrs[0]); - #endif -@@ -1726,6 +1746,14 @@ - } - } - RELEASE_ARRAYS(env, data, src->next_input_byte); -+ -+ /* read icc profile data */ -+ profileData = read_icc_profile(env, cinfo); -+ -+ if ((*env)->ExceptionCheck(env)) { -+ return retval; -+ } -+ - (*env)->CallVoidMethod(env, this, - JPEGImageReader_setImageDataID, - cinfo->image_width, -@@ -1733,7 +1761,7 @@ - cinfo->jpeg_color_space, - cinfo->out_color_space, - cinfo->num_components, -- read_icc_profile(env, cinfo)); -+ profileData); - if (reset) { - jpeg_abort_decompress(cinfo); - } -@@ -1898,7 +1926,7 @@ - (*env)->ReleaseIntArrayElements(env, bandSizes, - bandSize, JNI_ABORT); - --#ifdef DEBUG -+#ifdef DEBUG_IIO_JPEG - printf("---- in reader.read ----\n"); - printf("numBands is %d\n", numBands); - printf("bands array: "); -@@ -2578,7 +2606,7 @@ - - data->streamBuf.suspendable = FALSE; - if (qtables != NULL) { --#ifdef DEBUG -+#ifdef DEBUG_IIO_JPEG - printf("in writeTables: qtables not NULL\n"); - #endif - setQTables(env, (j_common_ptr) cinfo, qtables, TRUE); -@@ -2854,7 +2882,7 @@ - - cinfo->restart_interval = restartInterval; - --#ifdef DEBUG -+#ifdef DEBUG_IIO_JPEG - printf("writer setup complete, starting compressor\n"); - #endif - -@@ -2905,13 +2933,13 @@ - for (; (in < pixelLimit) && (out < scanLineLimit); in += pixelStride) { - for (i = 0; i < numBands; i++) { - *out++ = data->scale[i][*(in+i)]; --#ifdef DEBUG -+#ifdef DEBUG_IIO_JPEG - if (in == data->pixelBuf.buf.bp){ // Just the first pixel - printf("in %d -> out %d, ", *(in+i), *(out-i-1)); - } - #endif - } --#ifdef DEBUG -+#ifdef DEBUG_IIO_JPEG - if (in == data->pixelBuf.buf.bp){ // Just the first pixel - printf("\n"); - } diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/6793818-jpegimagereader_too_greedy.patch --- a/patches/openjdk/6793818-jpegimagereader_too_greedy.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,228 +0,0 @@ -diff -Nru openjdk.orig/jdk/src/share/classes/java/awt/color/ICC_Profile.java openjdk/jdk/src/share/classes/java/awt/color/ICC_Profile.java ---- openjdk.orig/jdk/src/share/classes/java/awt/color/ICC_Profile.java 2012-10-26 19:25:49.000000000 +0100 -+++ openjdk/jdk/src/share/classes/java/awt/color/ICC_Profile.java 2013-08-30 15:54:06.720611009 +0100 -@@ -737,7 +737,7 @@ - ICC_Profile(ProfileDeferralInfo pdi) { - this.deferralInfo = pdi; - this.profileActivator = new ProfileActivator() { -- public void activate() { -+ public void activate() throws ProfileDataException { - activateDeferredProfile(); - } - }; -@@ -830,20 +830,16 @@ - case ColorSpace.CS_sRGB: - synchronized(ICC_Profile.class) { - if (sRGBprofile == null) { -- try { -- /* -- * Deferral is only used for standard profiles. -- * Enabling the appropriate access privileges is handled -- * at a lower level. -- */ -- sRGBprofile = getDeferredInstance( -- new ProfileDeferralInfo("sRGB.pf", -- ColorSpace.TYPE_RGB, -- 3, CLASS_DISPLAY)); -- } catch (IOException e) { -- throw new IllegalArgumentException( -- "Can't load standard profile: sRGB.pf"); -- } -+ /* -+ * Deferral is only used for standard profiles. -+ * Enabling the appropriate access privileges is handled -+ * at a lower level. -+ */ -+ ProfileDeferralInfo pInfo = -+ new ProfileDeferralInfo("sRGB.pf", -+ ColorSpace.TYPE_RGB, 3, -+ CLASS_DISPLAY); -+ sRGBprofile = getDeferredInstance(pInfo); - } - thisProfile = sRGBprofile; - } -@@ -853,7 +849,11 @@ - case ColorSpace.CS_CIEXYZ: - synchronized(ICC_Profile.class) { - if (XYZprofile == null) { -- XYZprofile = getStandardProfile("CIEXYZ.pf"); -+ ProfileDeferralInfo pInfo = -+ new ProfileDeferralInfo("CIEXYZ.pf", -+ ColorSpace.TYPE_XYZ, 3, -+ CLASS_DISPLAY); -+ XYZprofile = getDeferredInstance(pInfo); - } - thisProfile = XYZprofile; - } -@@ -863,7 +863,11 @@ - case ColorSpace.CS_PYCC: - synchronized(ICC_Profile.class) { - if (PYCCprofile == null) { -- PYCCprofile = getStandardProfile("PYCC.pf"); -+ ProfileDeferralInfo pInfo = -+ new ProfileDeferralInfo("PYCC.pf", -+ ColorSpace.TYPE_3CLR, 3, -+ CLASS_DISPLAY); -+ PYCCprofile = getDeferredInstance(pInfo); - } - thisProfile = PYCCprofile; - } -@@ -873,7 +877,11 @@ - case ColorSpace.CS_GRAY: - synchronized(ICC_Profile.class) { - if (GRAYprofile == null) { -- GRAYprofile = getStandardProfile("GRAY.pf"); -+ ProfileDeferralInfo pInfo = -+ new ProfileDeferralInfo("GRAY.pf", -+ ColorSpace.TYPE_GRAY, 1, -+ CLASS_DISPLAY); -+ GRAYprofile = getDeferredInstance(pInfo); - } - thisProfile = GRAYprofile; - } -@@ -883,7 +891,11 @@ - case ColorSpace.CS_LINEAR_RGB: - synchronized(ICC_Profile.class) { - if (LINEAR_RGBprofile == null) { -- LINEAR_RGBprofile = getStandardProfile("LINEAR_RGB.pf"); -+ ProfileDeferralInfo pInfo = -+ new ProfileDeferralInfo("LINEAR_RGB.pf", -+ ColorSpace.TYPE_RGB, 3, -+ CLASS_DISPLAY); -+ LINEAR_RGBprofile = getDeferredInstance(pInfo); - } - thisProfile = LINEAR_RGBprofile; - } -@@ -1047,9 +1059,7 @@ - * code will take care of access privileges. - * @see activateDeferredProfile() - */ -- static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) -- throws IOException { -- -+ static ICC_Profile getDeferredInstance(ProfileDeferralInfo pdi) { - if (!ProfileDeferralMgr.deferring) { - return getStandardProfile(pdi.filename); - } -@@ -1063,7 +1073,7 @@ - } - - -- void activateDeferredProfile() { -+ void activateDeferredProfile() throws ProfileDataException { - byte profileData[]; - FileInputStream fis; - final String fileName = deferralInfo.filename; -@@ -1082,25 +1092,29 @@ - } - }; - if ((fis = AccessController.doPrivileged(pa)) == null) { -- throw new IllegalArgumentException("Cannot open file " + fileName); -+ throw new ProfileDataException("Cannot open file " + fileName); - } - try { - profileData = getProfileDataFromStream(fis); - fis.close(); /* close the file */ - } - catch (IOException e) { -- throw new IllegalArgumentException("Invalid ICC Profile Data" + -- fileName); -+ ProfileDataException pde = new -+ ProfileDataException("Invalid ICC Profile Data" + fileName); -+ pde.initCause(e); -+ throw pde; - } - if (profileData == null) { -- throw new IllegalArgumentException("Invalid ICC Profile Data" + -+ throw new ProfileDataException("Invalid ICC Profile Data" + - fileName); - } - try { - ID = CMSManager.getModule().loadProfile(profileData); - } catch (CMMException c) { -- throw new IllegalArgumentException("Invalid ICC Profile Data" + -- fileName); -+ ProfileDataException pde = new -+ ProfileDataException("Invalid ICC Profile Data" + fileName); -+ pde.initCause(c); -+ throw pde; - } - } - -diff -Nru openjdk.orig/jdk/src/share/classes/sun/java2d/cmm/ProfileActivator.java openjdk/jdk/src/share/classes/sun/java2d/cmm/ProfileActivator.java ---- openjdk.orig/jdk/src/share/classes/sun/java2d/cmm/ProfileActivator.java 2012-10-26 19:26:01.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/java2d/cmm/ProfileActivator.java 2013-08-30 15:51:48.658462916 +0100 -@@ -25,6 +25,7 @@ - - package sun.java2d.cmm; - -+import java.awt.color.ProfileDataException; - - /** - * An interface to allow the ProfileDeferralMgr to activate a -@@ -35,6 +36,6 @@ - /** - * Activate a previously deferred ICC_Profile object. - */ -- public void activate(); -+ public void activate() throws ProfileDataException; - - } -diff -Nru openjdk.orig/jdk/src/share/classes/sun/java2d/cmm/ProfileDeferralMgr.java openjdk/jdk/src/share/classes/sun/java2d/cmm/ProfileDeferralMgr.java ---- openjdk.orig/jdk/src/share/classes/sun/java2d/cmm/ProfileDeferralMgr.java 2012-10-26 19:26:01.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/java2d/cmm/ProfileDeferralMgr.java 2013-08-30 15:51:48.658462916 +0100 -@@ -25,6 +25,7 @@ - - package sun.java2d.cmm; - -+import java.awt.color.ProfileDataException; - import java.util.Vector; - - -@@ -39,7 +40,7 @@ - public class ProfileDeferralMgr { - - public static boolean deferring = true; -- private static Vector aVector; -+ private static Vector aVector; - - /** - * Records a ProfileActivator object whose activate method will -@@ -51,7 +52,7 @@ - return; - } - if (aVector == null) { -- aVector = new Vector(3, 3); -+ aVector = new Vector(3, 3); - } - aVector.addElement(pa); - return; -@@ -89,8 +90,26 @@ - return; - } - n = aVector.size(); -- for (i = 0; i < n; i++) { -- ((ProfileActivator) aVector.get(i)).activate(); -+ for (ProfileActivator pa : aVector) { -+ try { -+ pa.activate(); -+ } catch (ProfileDataException e) { -+ /* -+ * Ignore profile activation error for now: -+ * such exception is pssible due to absence -+ * or corruption of standard color profile. -+ * As for now we expect all profiles should -+ * be shiped with jre and presence of this -+ * exception is indication of some configuration -+ * problem in jre installation. -+ * -+ * NB: we still are greedy loading deferred profiles -+ * and load them all if any of them is needed. -+ * Therefore broken profile (if any) might be never used. -+ * If there will be attempt to use broken profile then -+ * it will result in CMMException. -+ */ -+ } - } - aVector.removeAllElements(); - aVector = null; diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/6799141-split_out_versions.patch --- a/patches/openjdk/6799141-split_out_versions.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,891 +0,0 @@ -diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk ---- openjdk.orig/jdk/make/common/Defs-linux.gmk 2016-01-20 04:02:31.642880064 +0000 -+++ openjdk/jdk/make/common/Defs-linux.gmk 2016-01-20 04:06:25.098914903 +0000 -@@ -135,6 +135,14 @@ - LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH)) - endif - -+# If this is a --hash-style=gnu system, use --hash-style=both -+# The gnu .hash section won't work on some Linux systems like SuSE 10. -+_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | $(GREP) -- '--hash-style=gnu') -+ifneq ($(_HAS_HASH_STYLE_GNU),) -+ LDFLAGS_HASH_STYLE = -Wl,--hash-style=both -+endif -+LDFLAGS_COMMON += $(LDFLAGS_HASH_STYLE) -+ - # - # Selection of warning messages - # -diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2016-01-20 04:02:30.290903028 +0000 -+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2016-01-20 04:06:25.098914903 +0000 -@@ -143,18 +143,10 @@ - CC = $(COMPILER_PATH)gcc - CPP = $(COMPILER_PATH)gcc -E - CXX = $(COMPILER_PATH)g++ -- REQUIRED_CC_VER = 3.2 - - # Option used to create a shared library - SHARED_LIBRARY_FLAG = -G -- # But gcc is still needed no matter what on 32bit -- ifeq ($(ARCH_DATA_MODEL), 32) -- REQUIRED_GCC_VER = 2.95 -- GCC =$(GCC_COMPILER_PATH)gcc -- _GCC_VER :=$(shell $(GCC) -dumpversion 2>&1 ) -- GCC_VER :=$(call GetVersion,"$(_GCC_VER)") -- endif -- -+ - endif - - # Get gcc version -diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-msvc.gmk openjdk/jdk/make/common/shared/Compiler-msvc.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-msvc.gmk 2016-01-20 01:41:59.589809293 +0000 -+++ openjdk/jdk/make/common/shared/Compiler-msvc.gmk 2016-01-20 04:06:25.098914903 +0000 -@@ -47,8 +47,6 @@ - # Fill in unknown values - COMPILER_NAME=Unknown MSVC Compiler - COMPILER_VERSION= -- REQUIRED_CC_VER=16.10.40219.01 -- REQUIRED_LINK_VER=10.00.40219.01 - - # unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake - NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo -diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk openjdk/jdk/make/common/shared/Compiler-sun.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk 2016-01-20 04:02:31.598880811 +0000 -+++ openjdk/jdk/make/common/shared/Compiler-sun.gmk 2016-01-20 04:06:25.098914903 +0000 -@@ -33,29 +33,20 @@ - ifeq ($(PLATFORM), solaris) - # FIXUP: Change to SS12 when validated - #COMPILER_VERSION=SS12 -- #REQUIRED_CC_VER=5.9 - COMPILER_VERSION=SS11 -- REQUIRED_CC_VER=5.8 - CC = $(COMPILER_PATH)cc - CPP = $(COMPILER_PATH)cc -E - CXX = $(COMPILER_PATH)CC - LINT = $(COMPILER_PATH)lint - # Option used to create a shared library - SHARED_LIBRARY_FLAG = -G -- # But gcc is still needed no matter what on 32bit -- ifeq ($(ARCH_DATA_MODEL), 32) -- REQUIRED_GCC_VER = 2.95 -- GCC =$(GCC_COMPILER_PATH)gcc -- _GCC_VER :=$(shell $(GCC) -dumpversion 2>&1 ) -- GCC_VER :=$(call GetVersion,"$(_GCC_VER)") -- endif -+ GCC =$(GCC_COMPILER_PATH)gcc - endif - - # Sun Studio Compiler settings specific to Linux - ifeq ($(PLATFORM), linux) - # This has not been tested -- COMPILER_VERSION=SS12 -- REQUIRED_CC_VER=5.9 -+ COMPILER_VERSION=SS11 - CC = $(COMPILER_PATH)cc - CPP = $(COMPILER_PATH)cc -E - CXX = $(COMPILER_PATH)CC -diff -Nru openjdk.orig/jdk/make/common/shared/Defs.gmk openjdk/jdk/make/common/shared/Defs.gmk ---- openjdk.orig/jdk/make/common/shared/Defs.gmk 2016-01-20 04:02:31.646879996 +0000 -+++ openjdk/jdk/make/common/shared/Defs.gmk 2016-01-20 04:06:25.102914835 +0000 -@@ -113,9 +113,9 @@ - fi) - endef - --# Given a line of text, get the major.minor version number from it -+# Given a line of text, get the version number from it - define GetVersion --$(shell echo $1 | sed -e 's@[^1-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*@\1@' ) -+$(shell echo $1 | sed -e 's@[^0-9]*\([0-9][0-9]*\.[0-9][.0-9]*\).*@\1@' ) - endef - - # Given a major.minor.micro version, return the major, minor, or micro number -@@ -130,26 +130,26 @@ - endef - - # Macro that returns missing, same, newer, or older $1=version $2=required --# (currently does not check the micro number) - define CheckVersions - $(shell \ - if [ "$1" = "" -o "$2" = "" ]; then \ - echo missing; \ -+ elif [ "$1" = "$2" ]; then \ -+ echo same; \ -+ elif [ $(call MajorVersion,$1) -lt $(call MajorVersion,$2) ] ; then \ -+ echo older; \ -+ elif [ $(call MajorVersion,$1) -gt $(call MajorVersion,$2) ] ; then \ -+ echo newer; \ -+ elif [ $(call MinorVersion,$1) -lt $(call MinorVersion,$2) ]; then \ -+ echo older; \ -+ elif [ $(call MinorVersion,$1) -gt $(call MinorVersion,$2) ]; then \ -+ echo newer; \ -+ elif [ $(call MicroVersion,$1) -lt $(call MicroVersion,$2) ]; then \ -+ echo older; \ -+ elif [ $(call MicroVersion,$1) -gt $(call MicroVersion,$2) ]; then \ -+ echo newer; \ - else \ -- if [ "$1" = "$2" ]; then \ -- echo same; \ -- else \ -- if [ $(call MajorVersion,$1) -lt $(call MajorVersion,$2) ] ; then \ -- echo older; \ -- else \ -- if [ $(call MajorVersion,$1) -eq $(call MajorVersion,$2) -a \ -- $(call MinorVersion,$1) -lt $(call MinorVersion,$2) ]; then \ -- echo older; \ -- else \ -- echo newer; \ -- fi; \ -- fi; \ -- fi; \ -+ echo same; \ - fi) - endef - -@@ -499,3 +499,6 @@ - # Get shared compiler settings - include $(JDK_MAKE_SHARED_DIR)/Compiler.gmk - -+# Get the REQUIRED versions -+include $(JDK_MAKE_SHARED_DIR)/Defs-versions.gmk -+ -diff -Nru openjdk.orig/jdk/make/common/shared/Defs-versions.gmk openjdk/jdk/make/common/shared/Defs-versions.gmk ---- openjdk.orig/jdk/make/common/shared/Defs-versions.gmk 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/make/common/shared/Defs-versions.gmk 2016-01-20 04:06:25.102914835 +0000 -@@ -0,0 +1,183 @@ -+# -+# Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. -+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+# -+# This code is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License version 2 only, as -+# published by the Free Software Foundation. Sun designates this -+# particular file as subject to the "Classpath" exception as provided -+# by Sun in the LICENSE file that accompanied this code. -+# -+# This code is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+# version 2 for more details (a copy is included in the LICENSE file that -+# accompanied this code). -+# -+# You should have received a copy of the GNU General Public License version -+# 2 along with this work; if not, write to the Free Software Foundation, -+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+# -+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+# CA 95054 USA or visit www.sun.com if you need additional information or -+# have any questions. -+# -+ -+# -+# WARNING: This file is shared with other workspaces. -+# -+ -+# This file needs these set: CC_VERSION, PLATFORM, ARCH_FAMILY, and ARCH_DATA_MODEL. -+ -+########################################################################## -+# -+# List of JDK official minimum, expected, or required versions: -+# -+# REQUIRED_ALSA_VERSION -+# Linux only: The ALSA sound library version expected. -+# -+# REQUIRED_ANT_VER -+# The minimum 'ant' version. -+# -+# REQUIRED_BOOT_VER -+# The minimum boot jdk version. -+# -+# REQUIRED_CC_VER -+# The primary C compiler version expected. -+# -+# REQUIRED_CYGWIN_VER -+# Windows only: If CYGWIN is used, the minimum CYGWIN version. -+# -+# REQUIRED_DXSDK_VER -+# Windows only: The version of DirectX SDK expected. -+# -+# REQUIRED_FREE_SPACE -+# The minimum disk space needed as determined by running 'du -sk' on a fully -+# built workspace. -+# -+# REQUIRED_FREETYPE_VERSION -+# If we are using freetype, the freetype version expected. -+# -+# REQUIRED_GCC_VER -+# Solaris and Linux only. The required version of gcc/g++ for the plugin. -+# -+# REQUIRED_LINK_VER -+# Windows only: The version of link.exe expected. -+# -+# REQUIRED_MAKE_VER -+# The minimum version of GNU make. -+# -+# REQUIRED_MKS_VER -+# Windows only: If MKS used instead of CYGWIN, the minimum version of MKS. -+# -+# REQUIRED_OS_VARIANT_NAME -+# The OS variation name required. -+# Solaris: Solaris or OpenSolaris -+# Windows: Windows2000, WindowsXP, Windows2003, etc. -+# Linux: Fedora, RedHat, SuSE, Ubuntu, etc. -+# -+# REQUIRED_OS_VARIANT_VERSION -+# The version number associated with the above OS variant name. -+# Solaris: output of uname -r -+# Windows: 5.0 for Windows2000, 5.1 for WindowsXP, 5.2 for Windows2003, etc. -+# Linux: number for the variant, e.g. 9 for Fedora 9 -+# -+# REQUIRED_OS_VERSION -+# The formal OS version number. -+# Solaris & Windows: same as REQUIRED_OS_VARIANT_VERSION -+# Linux: the kernel version, or output of uname -r -+# -+# REQUIRED_UNZIP_VER -+# The minimum version of unzip. -+# -+# REQUIRED_ZIP_VER -+# The minimum version of unzip. -+# -+########### -+# -+# Differences in the build platform from these versions may trigger warnings -+# messages during the sanity checking when building the JDK. -+# -+# When building the OpenJDK most of these required or expected versions are -+# ignored or allowed to vary widely to accomodate the many build situations -+# of the OpenJDK. -+# -+########################################################################## -+ -+# Solaris specific -+ifeq ($(PLATFORM), solaris) -+ REQUIRED_OS_VERSION = 5.10 -+ REQUIRED_OS_VARIANT_NAME = Solaris -+ REQUIRED_OS_VARIANT_VERSION = $(REQUIRED_OS_VERSION) -+ ifeq ($(ARCH_FAMILY), sparc) -+ REQUIRED_FREE_SPACE = 1300000 -+ else -+ REQUIRED_FREE_SPACE = 1040000 -+ endif -+ ifeq ($(CC_VERSION),sun) -+ REQUIRED_CC_VER = 5.8 -+ endif -+ ifeq ($(CC_VERSION),gcc) -+ REQUIRED_CC_VER = 3.4.3 -+ endif -+ REQUIRED_GCC_VER = 2.95.2 -+endif -+ -+# Linux specific -+ifeq ($(PLATFORM), linux) -+ REQUIRED_OS_VERSION = 2.6 -+ REQUIRED_OS_VARIANT_NAME = Fedora -+ REQUIRED_OS_VARIANT_VERSION = 9 -+ REQUIRED_FREE_SPACE = 1460000 -+ REQUIRED_ALSA_VERSION = 0.9.1 -+ REQUIRED_GCC_VER = 2.95 -+ ifeq ($(CC_VERSION),gcc) -+ REQUIRED_CC_VER = 3.2 -+ endif -+ ifeq ($(CC_VERSION),sun) -+ REQUIRED_CC_VER = 5.8 -+ endif -+endif -+ -+# Windows specific -+ifeq ($(PLATFORM), windows) -+ ifeq ($(ARCH_DATA_MODEL),64) -+ REQUIRED_OS_VERSION = 5.2 -+ REQUIRED_OS_VARIANT_NAME = Windows2003 -+ else -+ REQUIRED_OS_VERSION = 5.1 -+ REQUIRED_OS_VARIANT_NAME = WindowsXP -+ endif -+ REQUIRED_OS_VARIANT_VERSION = $(REQUIRED_OS_VERSION) -+ REQUIRED_CYGWIN_VER = 4.0 -+ REQUIRED_MKS_VER = 6.1 -+ REQUIRED_FREE_SPACE = 500000 -+ REQUIRED_DXSDK_VER = 0x0900 -+ ifeq ($(CC_VERSION),msvc) -+ ifeq ($(ARCH_DATA_MODEL), 32) -+ REQUIRED_CC_VER = 13.10.3077 -+ REQUIRED_LINK_VER = 7.10.3077 -+ else -+ ifeq ($(ARCH), ia64) -+ REQUIRED_CC_VER = 13.00.9337.7 -+ REQUIRED_LINK_VER = 7.00.9337.7 -+ endif -+ ifeq ($(ARCH), amd64) -+ REQUIRED_CC_VER = 14.00.40310.41 -+ REQUIRED_LINK_VER = 8.00.40310.39 -+ endif -+ endif -+ endif -+ ifeq ($(CC_VERSION),gcc) -+ REQUIRED_CC_VER = 3.4.3 -+ endif -+endif -+ -+# Generic -+REQUIRED_ANT_VER = 1.6.3 -+REQUIRED_BOOT_VER = 1.5 -+REQUIRED_FREETYPE_VERSION = 2.3.0 -+REQUIRED_MAKE_VER = 3.78 -+REQUIRED_UNZIP_VER = 5.12 -+REQUIRED_ZIP_VER = 2.2 -+ -diff -Nru openjdk.orig/jdk/make/common/shared/Defs-windows.gmk openjdk/jdk/make/common/shared/Defs-windows.gmk ---- openjdk.orig/jdk/make/common/shared/Defs-windows.gmk 2016-01-20 01:41:59.597809158 +0000 -+++ openjdk/jdk/make/common/shared/Defs-windows.gmk 2016-01-20 04:06:25.102914835 +0000 -@@ -147,10 +147,7 @@ - UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH) - - # Get version of MKS or CYGWIN --ifdef USING_CYGWIN --_CYGWIN_VER :=$(shell $(UNAME)) --CYGWIN_VER :=$(call GetVersion,$(_CYGWIN_VER)) --else # MKS -+ifndef USING_CYGWIN - _MKS_VER :=$(shell $(MKSINFO) 2>&1 | $(GREP) Release | $(TAIL) -1 | $(SED) -e 's@.*\(Release.*\)@\1@') - MKS_VER :=$(call GetVersion,$(_MKS_VER)) - # At this point, we can re-define FullPath to use DOSNAME_CMD -diff -Nru openjdk.orig/jdk/make/common/shared/Platform.gmk openjdk/jdk/make/common/shared/Platform.gmk ---- openjdk.orig/jdk/make/common/shared/Platform.gmk 2016-01-20 04:02:30.290903028 +0000 -+++ openjdk/jdk/make/common/shared/Platform.gmk 2016-01-20 04:06:57.042372407 +0000 -@@ -51,8 +51,6 @@ - # USER login name of user (minus blanks) - # PLATFORM windows, solaris, or linux - # VARIANT OPT or DBG, OPT is the default --# OS_NAME solaris, linux, or nt --# OS_VERSION specific version of os, 5.10, 2.4.9-e.3, etc. - # TEMP_DISK /tmp or C:/temp - # ARCH_DATA_MODEL 32 or 64 - # ARCH sparc, sparcv9, i586, amd64, or ia64 -@@ -71,28 +69,11 @@ - # ISA_DIR solaris only: /sparcv9 or /amd64 - # LIBARCH32 solaris only: sparc or i386 - # LIBARCH64 solaris only: sparcv9 or amd64 --# REQUIRED_WINDOWS_VERSION windows only: specific version of windows - # USING_CYGWIN windows only: true or false --# WINDOWS_NT_VERSION_STRING windows only: long version name --# REQUIRED_OS_VERSION required OS version, e.g. 5.10, 2.4 - # ISHIELD_TEMP_MIN windows only: minimum disk space in temp area --# REQUIRED_ZIP_VER required version of zip --# REQUIRED_UNZIP_VER required version of unzip --# REQUIRED_DXSDK_VER windows only: required version of DirectX --# LINUX_VERSION_INFO linux only: location of linux release file --# REQUIRED_LINUX_VER linux only: required version of linux --# REQUIRED_LINUX_FULLVER linux only: required full version of linux --# REQUIRED_ALSA_VERSION linux only: required version of ALSA --# REQUIRED_FREETYPE_VERSION openjdk only: required version of freetype - - SYSTEM_UNAME := $(shell uname) - --# Normal boot jdk is previous release, but a hard requirement is a 1.6 boot --REQUIRED_BOOT_VER = 1.6 -- --# If we are using freetype, this is the required version --REQUIRED_FREETYPE_VERSION=2.3.0 -- - # - # Prune out all known SCM (Source Code Management) directories - # so they will not be included when copying directory trees -@@ -111,8 +92,6 @@ - # Platform settings specific to Solaris - ifeq ($(SYSTEM_UNAME), SunOS) - PLATFORM = solaris -- OS_NAME = solaris -- OS_VERSION := $(shell uname -r) - # Solaris sparc build can be either 32-bit or 64-bit. - # Default to 32, but allow explicit setting to 32 or 64. - ifndef ARCH_DATA_MODEL -@@ -164,12 +143,6 @@ - endif - # Suffix for file bundles used in previous release - BUNDLE_FILE_SUFFIX=.tar -- # Required Solaris version -- ifeq ($(ARCH), amd64) -- REQUIRED_OS_VERSION = 5.10 -- else -- REQUIRED_OS_VERSION = 5.8 -- endif - # How much RAM does this machine have (zones send an error to stderr): - MB_OF_MEMORY:=$(shell /usr/sbin/prtconf 2>/dev/null | fgrep 'Memory size:' | expand | cut -d' ' -f3) - endif -@@ -177,8 +150,6 @@ - # Platform settings specific to Linux - ifeq ($(SYSTEM_UNAME), Linux) - PLATFORM = linux -- OS_NAME = linux -- OS_VERSION := $(shell uname -r) - # Arch and OS name/version - ifndef CROSS_COMPILATION - mach := $(shell uname -m) -@@ -283,27 +254,6 @@ - - # Suffix for file bundles used in previous release - BUNDLE_FILE_SUFFIX=.tar.gz -- LINUX_VERSION_INFO = /etc/redhat-release -- ifeq ($(ARCH_DATA_MODEL), 32) -- REQUIRED_LINUX_VER = Advanced Server -- REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS -- REQUIRED_OS_VERSION = 2.4.9-e.3 -- else -- ifeq ($(ARCH), amd64) -- LINUX_VERSION_INFO = /etc/SuSE-release -- REQUIRED_LINUX_VER = 8.1 -- REQUIRED_LINUX_FULLVER = $(REQUIRED_LINUX_VER) SLSE AMD64 -- REQUIRED_OS_VERSION = 2.4.19-SMP -- else -- REQUIRED_LINUX_VER = Advanced Server -- REQUIRED_LINUX_FULLVER = Advanced Server release 2.1AS 64 bit -- REQUIRED_OS_VERSION = 2.4.19-SMP -- endif -- endif -- ifneq ($(ARCH), ia64) -- # ALSA 0.9.1 and above -- REQUIRED_ALSA_VERSION = ^((0[.]9[.][1-9])|(1[.][0-9][.][0-9]))[0-9]* -- endif - # How much RAM does this machine have: - MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2) - endif -@@ -311,23 +261,15 @@ - # Windows with and without CYGWIN will be slightly different - ifeq ($(SYSTEM_UNAME), Windows_NT) - PLATFORM = windows -- OS_VERSION := $(shell uname -r) -- WINDOWS_NT_VERSION_STRING=Windows_NT -- REQUIRED_MKS_VER=6.1 - endif - ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME))) - PLATFORM = windows -- OS_VERSION := 5 - USING_CYGWIN = true - export USING_CYGWIN -- WINDOWS_NT_VERSION_STRING=CYGWIN_NT -- REQUIRED_CYGWIN_VER=4.0 - endif - - # Platform settings specific to Windows - ifeq ($(PLATFORM), windows) -- OS_NAME = nt -- REQUIRED_OS_VERSION=5 - # Windows builds default to the appropriate for the underlaying - # architecture. - # Temporary disk area -@@ -383,7 +325,6 @@ - # If the user wants to perform a cross compile build then they must - # - set ARCH_DATA_MODEL=64 and either - # + set ARCH to ia64 or amd64, or -- REQUIRED_WINDOWS_VERSION=Server 2003 Enterprise x64 Edition - ifeq ($(PROC_ARCH),X64) - ARCH=amd64 - else -@@ -393,8 +334,6 @@ - # Value of Java os.arch property - ARCHPROP=$(LIBARCH) - else -- REQUIRED_WINDOWS_VERSION=2000 or Unknown -- #REQUIRED_WINDOWS_VERSION=XP Professional - # LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel - ARCH=i586 - LIBARCH=i386 -@@ -440,7 +379,6 @@ - # ISHIELD_TEMP_MIN is the difference of an empty C:\TEMP vs. one after a - # bundles build on windows. - ISHIELD_TEMP_MIN=250000 -- REQUIRED_DXSDK_VER = 0x0900 - # How much RAM does this machine have: - MB_OF_MEMORY := $(shell \ - if [ -f "C:/cygwin/bin/free.exe" ] ; then \ -@@ -483,10 +421,6 @@ - MIN_VM_MEMORY := 128 - endif - --REQUIRED_ZIP_VER = 2.2 --REQUIRED_UNZIP_VER = 5.12 --REQUIRED_MAKE_VER = 3.78 -- - # Unix type settings (same for all unix platforms) - ifneq ($(PLATFORM), windows) - # Temporary disk area -diff -Nru openjdk.orig/jdk/make/common/shared/Sanity.gmk openjdk/jdk/make/common/shared/Sanity.gmk ---- openjdk.orig/jdk/make/common/shared/Sanity.gmk 2016-01-20 04:02:27.542949705 +0000 -+++ openjdk/jdk/make/common/shared/Sanity.gmk 2016-01-20 04:06:25.102914835 +0000 -@@ -44,54 +44,100 @@ - SANITY_FILES = $(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE) - - # How to say "The Release Engineering people use this" --THE_OFFICIAL_USES=The official $(PLATFORM) builds use -+THE_OFFICIAL_USES=The official builds on $(PLATFORM) use - - # How to say "You are using:" - YOU_ARE_USING=You appear to be using - -+# Error message -+define SanityError -+$(ECHO) "ERROR: $1\n" >> $(ERROR_FILE) -+endef -+ -+# Warning message -+define SanityWarning -+$(ECHO) "WARNING: $1\n" >> $(WARNING_FILE) -+endef -+ -+# Official version error message: name version required_version -+define OfficialErrorMessage -+$(call SanityError,\ -+$(THE_OFFICIAL_USES) $1 $3. Your $1 $(if $2,undefined,$2) will not work.) -+endef -+ -+# Official version warning message: name version required_version -+define OfficialWarningMessage -+$(call SanityWarning,\ -+$(THE_OFFICIAL_USES) $1 $3. $(YOU_ARE_USING) $1 $2.) -+endef -+ -+ - # Settings and rules to validate the JDK build environment. - - ifeq ($(PLATFORM), solaris) -+ # What kind of system we are using (Variations are Solaris and OpenSolaris) -+ OS_VERSION := $(shell uname -r) -+ OS_VARIANT_NAME := $(strip $(shell head -1 /etc/release | awk '{print $$1;}') ) -+ OS_VARIANT_VERSION := $(OS_VERSION) - REQ_PATCH_LIST = $(JDK_TOPDIR)/make/PatchList.solaris - ifeq ($(ARCH_FAMILY), sparc) - PATCH_POSITION = $$4 - else - PATCH_POSITION = $$6 - endif -+ ifndef OPENJDK -+ _GCC_VER :=$(shell $(GCC) -dumpversion 2>&1 ) -+ GCC_VER :=$(call GetVersion,"$(_GCC_VER)") -+ endif - endif - - ifeq ($(PLATFORM), linux) -- ifeq ($(ARCH), amd64) -- LINUX_VERSION := $(shell \ -- if [ -r "$(LINUX_VERSION_INFO)" ] ; then \ -- $(CAT) $(LINUX_VERSION_INFO) | $(TAIL) -1 | $(NAWK) '{ print $$3; }';\ -- else \ -- $(ECHO) "Unknown linux"; \ -- fi ) -- else -- LINUX_VERSION := $(shell \ -- if [ -r "$(LINUX_VERSION_INFO)" ] ; then \ -- $(NAWK) '{ print $$4" "$$5; }' $(LINUX_VERSION_INFO) ; \ -- else \ -- $(ECHO) "Unknown linux"; \ -- fi ) -- endif -- ifneq ($(ARCH), ia64) -- # dummy program that outputs ALSA's version (created in target sane-alsa-versioncheck) -- ALSA_VERSION_CHECK = $(TEMPDIR)/alsaversioncheck -- ALSA_VERSION = `if [ -f "$(ALSA_VERSION_CHECK)" ] ; then $(ALSA_VERSION_CHECK) ; fi` -- endif -+ # What kind of system we are using (Variation is the Linux vendor) -+ OS_VERSION := $(shell uname -r) -+ OS_VARIANT_NAME := $(shell \ -+ if [ -f /etc/fedora-release ] ; then \ -+ echo "Fedora"; \ -+ elif [ -f /etc/redhat-release ] ; then \ -+ echo "RedHat"; \ -+ elif [ -f /etc/SuSE-release ] ; then \ -+ echo "SuSE"; \ -+ else \ -+ echo "Unknown"; \ -+ fi) -+ OS_VARIANT_VERSION := $(shell \ -+ if [ "$(OS_VARIANT_NAME)" = "Fedora" ] ; then \ -+ $(CAT) /etc/fedora-release | $(HEAD) -1 | $(NAWK) '{ print $$3; }' ; \ -+ fi) -+ ALSA_INCLUDE=/usr/include/alsa/version.h -+ ALSA_LIBRARY=/usr/lib/libasound.so -+ _ALSA_VERSION := $(shell $(EGREP) SND_LIB_VERSION_STR $(ALSA_INCLUDE) | \ -+ $(SED) -e 's@.*\"\(.*\)\".*@\1@' ) -+ ALSA_VERSION := $(call GetVersion,$(_ALSA_VERSION)) - endif - - ifeq ($(PLATFORM), windows) -- # Localized systeminfo has localized labels, but not localized values. -- _WINDOWS_VERSION := \ -- $(shell systeminfo 2> $(DEV_NULL) | grep 'Microsoft' | grep 'Windows' | \ -- cut -d':' -f2) -- ifeq ($(_WINDOWS_VERSION),) -- _WINDOWS_VERSION := Windows 2000 or Unknown (no systeminfo utility) -+ # Windows 2000 is 5.0, Windows XP is 5.1, Windows 2003 is 5.2 -+ # Assume 5.0 (Windows 2000) if systeminfo does not help -+ WINDOWS_MAPPING-5.0 := Windows2000 -+ WINDOWS_MAPPING-5.1 := WindowsXP -+ WINDOWS_MAPPING-5.2 := Windows2003 -+ # What kind of system we are using (Variation is the common name) -+ _OS_VERSION := \ -+ $(shell systeminfo 2> $(DEV_NULL) | \ -+ egrep '^OS Version:' | \ -+ awk '{print $$3;}' ) -+ ifeq ($(_OS_VERSION),) -+ OS_VERSION = 5.0 -+ else -+ OS_VERSION = $(_OS_VERSION) -+ endif -+ OS_VARIANT_NAME := $(WINDOWS_MAPPING-$(OS_VERSION)) -+ OS_VARIANT_VERSION := $(OS_VERSION) -+ ifdef USING_CYGWIN -+ # CYGWIN version -+ _CYGWIN_VER := $(SYSTEM_UNAME) -+ CYGWIN_VER :=$(call GetVersion,$(_CYGWIN_VER)) - endif -- WINDOWS_VERSION := $(strip $(_WINDOWS_VERSION)) - DXSDK_VER := $(shell $(EGREP) DIRECT3D_VERSION $(DXSDK_INCLUDE_PATH)/d3d9.h 2>&1 | \ - $(EGREP) "\#define" | $(NAWK) '{print $$3}') - endif -@@ -106,7 +152,6 @@ - UNZIP_VER :=$(call GetVersion,"$(_UNZIP_VER)") - BOOT_VER :=$(call GetVersion,"$(_BOOT_VER)") - --REQUIRED_ANT_VER := 1.6.3 - _ANT_VER :=$(shell $(ANT) -version 2>&1 ) - ANT_VER :=$(call GetVersion,"$(_ANT_VER)") - -@@ -167,7 +212,6 @@ - sane-compiler \ - sane-link \ - sane-cacerts \ -- sane-alsa-versioncheck \ - sane-alsa-headers \ - sane-ant_version \ - sane-zip_version \ -@@ -239,35 +283,29 @@ - # generate a fatal sanity error, and a warning about the official - # build platform just becomes clutter. - ###################################################### --OS_CHECK :=$(call CheckVersions,$(OS_VERSION),$(REQUIRED_OS_VERSION)) -+ifndef OPENJDK -+ OS_VERSION_CHECK := \ -+ $(call CheckVersions,$(OS_VERSION),$(REQUIRED_OS_VERSION)) -+ ifeq ($(OS_VARIANT_NAME),$(REQUIRED_OS_VARIANT_NAME)) -+ OS_VARIANT_VERSION_CHECK := \ -+ $(call CheckVersions,$(OS_VARIANT_VERSION),$(REQUIRED_OS_VARIANT_VERSION)) -+ endif -+endif - sane-os_version:: sane-arch_data_model sane-memory_check sane-locale sane-os_patch_level - ifndef OPENJDK -- @if [ "$(OS_CHECK)" = "missing" ]; then \ -- $(ECHO) "ERROR: The $(PLATFORM) OS version is undefined (Try: uname -r). \n" \ -- "" >> $(ERROR_FILE) ; \ -- fi -- @if [ "$(OS_CHECK)" != "same" ]; then \ -- $(ECHO) "WARNING: $(THE_OFFICIAL_USES) OS version $(REQUIRED_OS_VERSION). \n" \ -- " $(YOU_ARE_USING) OS version $(OS_VERSION). \n" \ -- "" >> $(WARNING_FILE) ; \ -- fi -- ifeq ($(PLATFORM), windows) -- @if [ "$(findstring $(REQUIRED_WINDOWS_VERSION),$(WINDOWS_VERSION))" = "" ]; then \ -- $(ECHO) "WARNING: $(YOU_ARE_USING) an unknown version of Windows. \n" \ -- " The required version is $(REQUIRED_WINDOWS_VERSION). \n" \ -- " $(YOU_ARE_USING) $(WINDOWS_VERSION) \n" \ -- "" >> $(WARNING_FILE) ; \ -- fi -- endif # windows -- ifeq ($(PLATFORM), linux) -- @if [ `$(ECHO) "$(LINUX_VERSION)" | $(EGREP) -c '$(REQUIRED_LINUX_VER)'` -ne 1 ]; then \ -- $(ECHO) "WARNING: The build is being done on Linux $(LINUX_VERSION). \n" \ -- " $(THE_OFFICIAL_USES) Linux $(REQUIRED_LINUX_VER), \n" \ -- " specifically Linux $(REQUIRED_LINUX_FULLVER). \n" \ -- " The version found was '$(OS_VERSION)'. \n" \ -- "" >> $(WARNING_FILE) ; \ -- fi -- endif # linux -+ ifneq ($(OS_VARIANT_NAME),$(REQUIRED_OS_VARIANT_NAME)) -+ ifeq ($(OS_VERSION_CHECK),missing) -+ @$(call OfficialErrorMessage,OS version,$(OS_VERSION),$(REQUIRED_OS_VERSION)) -+ endif -+ ifneq ($(OS_VERSION_CHECK),same) -+ @$(call OfficialWarningMessage,OS version,$(OS_VERSION),$(REQUIRED_OS_VERSION)) -+ endif -+ @$(call OfficialWarningMessage,OS variant,$(OS_VARIANT_NAME),$(REQUIRED_OS_VARIANT_NAME)) -+ else -+ ifneq ($(OS_VARIANT_VERSION_CHECK),same) -+ @$(call OfficialWarningMessage,$(OS_VARIANT_NAME) version,$(OS_VARIANT_VERSION),$(REQUIRED_OS_VARIANT_VERSION)) -+ endif -+ endif - endif # OPENJDK - - ifeq ($(PLATFORM), windows) -@@ -308,16 +346,12 @@ - CYGWIN_CHECK :=$(call CheckVersions,$(CYGWIN_VER),$(REQUIRED_CYGWIN_VER)) - sane-cygwin: - ifdef USING_CYGWIN -- @if [ "$(CYGWIN_CHECK)" = "missing" ]; then \ -- $(ECHO) "ERROR: The CYGWIN version is undefined. \n" \ -- " $(THE_OFFICIAL_USES) CYGWIN $(REQUIRED_CYGWIN_VER). \n" \ -- "" >> $(ERROR_FILE) ; \ -- fi -- @if [ "$(CYGWIN_CHECK)" = "older" ]; then \ -- $(ECHO) "ERROR: The build cannot be done on CYGWIN $(CYGWIN_VER). \n" \ -- " Use CYGWIN $(REQUIRED_CYGWIN_VER) or higher. \n" \ -- "" >> $(ERROR_FILE) ; \ -- fi -+ ifeq ($(CYGWIN_CHECK),missing) -+ @$(call OfficialErrorMessage,CYGWIN version,$(CYGWIN_VER),$(REQUIRED_CYGWIN_VER)) -+ endif -+ ifeq ($(CYGWIN_CHECK),older) -+ @$(call OfficialWarningMessage,CYGWIN version,$(CYGWIN_VER),$(REQUIRED_CYGWIN_VER)) -+ endif - endif - endif - -@@ -345,16 +379,12 @@ - MKS_CHECK :=$(call CheckVersions,$(MKS_VER),$(REQUIRED_MKS_VER)) - sane-mks: - ifndef USING_CYGWIN -- @if [ "$(MKS_CHECK)" = "missing" ]; then \ -- $(ECHO) "ERROR: The MKS version is undefined. \n" \ -- " $(THE_OFFICIAL_USES) MKS $(REQUIRED_MKS_VER). \n" \ -- "" >> $(ERROR_FILE) ; \ -- fi -- @if [ "$(MKS_CHECK)" = "older" ]; then \ -- $(ECHO) "ERROR: The build cannot be done on MKS $(MKS_VER). \n" \ -- " Use MKS $(REQUIRED_MKS_VER) or higher. \n" \ -- "" >> $(ERROR_FILE) ; \ -- fi -+ ifeq ($(MKS_CHECK),missing) -+ @$(call OfficialErrorMessage,MKS version,$(MKS_VER),$(REQUIRED_MKS_VER)) -+ endif -+ ifeq ($(MKS_CHECK),older) -+ @$(call OfficialErrorMessage,MKS version,$(MKS_VER),$(REQUIRED_MKS_VER)) -+ endif - endif - endif - -@@ -1270,11 +1300,6 @@ - # Check the compiler version(s) - ###################################################### - CC_CHECK :=$(call CheckVersions,$(CC_VER),$(REQUIRED_CC_VER)) --ifeq ($(PLATFORM), solaris) -- ifeq ($(ARCH_DATA_MODEL), 32) -- GCC_CHECK :=$(call CheckVersions,$(GCC_VER),$(REQUIRED_GCC_VER)) -- endif --endif - sane-compiler: sane-link - @if [ "$(CC_CHECK)" = "missing" ]; then \ - $(ECHO) "ERROR: The Compiler version is undefined. \n" \ -@@ -1289,16 +1314,6 @@ - " $(COMPILER_PATH) \n" \ - "" >> $(WARNING_FILE) ; \ - fi -- ifdef GCC_CHECK -- @if [ "$(GCC_CHECK)" != "same" ]; then \ -- $(ECHO) "WARNING: The $(PLATFORM) GCC compiler must be version $(REQUIRED_GCC_VER) \n" \ -- " $(YOU_ARE_USING) compiler version: $(GCC_VER) \n" \ -- " The compiler was obtained from the following location: \n" \ -- " $(GCC_COMPILER_PATH) \n" \ -- " Please change your compiler. \n" \ -- "" >> $(WARNING_FILE) ; \ -- fi -- endif - ifeq ($(PLATFORM), windows) - ifeq ($(ARCH_DATA_MODEL), 64) - ifneq ($(COMPILER_VERSION), VS2005) -@@ -1312,38 +1327,24 @@ - ###################################################### - # Check that ALSA headers and libs are installed and - # that the header has the right version. We only --# need /usr/include/alsa/*.h and /usr/lib/libasound.so -+# need /usr/include/alsa/version.h and /usr/lib/libasound.so - ###################################################### - --ifdef ALSA_VERSION_CHECK --$(ALSA_VERSION_CHECK): $(ALSA_VERSION_CHECK).c -- @$(prep-target) -- @$(CC) -o $@ $< -lasound -- --$(ALSA_VERSION_CHECK).c: -- @$(prep-target) -- @$(ECHO) "#include \n" \ -- "int main(char** argv, int argc) {\n" \ -- " printf(\"%s\", SND_LIB_VERSION_STR);\n" \ -- " return 0;\n" \ -- "}\n" \ -- > $@ -+ifdef REQUIRED_ALSA_VERSION -+ ALSA_CHECK := $(call CheckVersions,$(ALSA_VERSION),$(REQUIRED_ALSA_VERSION)) - endif -- --sane-alsa-versioncheck: $(ALSA_VERSION_CHECK) --sane-alsa-headers: sane-alsa-versioncheck --ifdef ALSA_VERSION_CHECK -- @if [ -f "$(ALSA_VERSION_CHECK)" ]; then \ -- if [ `$(ALSA_VERSION_CHECK) | $(EGREP) -c '$(REQUIRED_ALSA_VERSION)'` -ne 1 ] ; then \ -- $(ECHO) "ERROR: The ALSA version must be 0.9.1 or higher. \n" \ -- " You have the following ALSA version installed: $(ALSA_VERSION) \n" \ -+sane-alsa-headers: -+ifdef REQUIRED_ALSA_VERSION -+ if [ "$(ALSA_CHECK)" != "same" -a "$(ALSA_CHECK)" != "newer" ] ; then \ -+ $(ECHO) "ERROR: The ALSA version must be $(REQUIRED_ALSA_VERSION) or higher. \n" \ -+ " You have the following ALSA version installed: $${alsa_version) \n" \ - " Please reinstall ALSA (drivers and lib). You can download \n" \ - " the source distribution from http://www.alsa-project.org \n" \ - " or go to http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \ - "" >> $(ERROR_FILE) ; \ - fi \ - else \ -- $(ECHO) "ERROR: You seem to not have installed ALSA 0.9.1 or higher. \n" \ -+ $(ECHO) "ERROR: You seem to not have installed ALSA $(REQUIRED_ALSA_VERSION) or higher. \n" \ - " Please install ALSA (drivers and lib). You can download the \n" \ - " source distribution from http://www.alsa-project.org or go to \n" \ - " http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \ -@@ -1358,7 +1359,7 @@ - ###################################################### - # dump out the variable settings... - ###################################################### --sane-settings:: sane-alsa-versioncheck -+sane-settings:: - @$(ECHO) >> $(MESSAGE_FILE) - @$(ECHO) $(ALL_SETTINGS) >> $(MESSAGE_FILE) - @$(ECHO) >> $(MESSAGE_FILE) -@@ -1370,8 +1371,8 @@ - ifeq ($(PLATFORM), solaris) - ifndef OPENJDK - @if [ -r $(GCC_COMPILER_PATH) ]; then \ -- if [ ! "$(GCC_VER)" = 2.95.2 ]; then \ -- $(ECHO) "ERROR: The Solaris GCC compiler version must be 2.95.2. \n" \ -+ if [ ! "$(GCC_VER)" = $(REQUIRED_GCC_VERSION) ]; then \ -+ $(ECHO) "ERROR: The Solaris GCC compiler version must be $(REQUIRED_GCC_VERSION). \n" \ - " You are using the following compiler version: $(GCC_VER) \n" \ - " The compiler was obtained from the following location: \n" \ - " $(GCC_COMPILER_PATH) \n" \ -diff -Nru openjdk.orig/jdk/make/common/shared/Sanity-Settings.gmk openjdk/jdk/make/common/shared/Sanity-Settings.gmk ---- openjdk.orig/jdk/make/common/shared/Sanity-Settings.gmk 2016-01-20 01:42:00.025801958 +0000 -+++ openjdk/jdk/make/common/shared/Sanity-Settings.gmk 2016-01-20 04:06:25.102914835 +0000 -@@ -177,8 +177,6 @@ - ifeq ($(PLATFORM),windows) - ALL_SETTINGS+=$(call addRequiredSetting,PROCESSOR_ARCHITECTURE) - ALL_SETTINGS+=$(call addRequiredSetting,PROCESSOR_IDENTIFIER) -- ALL_SETTINGS+=$(call addRequiredSetting,WINDOWS_VERSION) -- ALL_SETTINGS+=$(call addRequiredSetting,WINDOWS_NT_VERSION_STRING) - ifdef USING_CYGWIN - ALL_SETTINGS+=$(call addRequiredSetting,USING_CYGWIN) - ALL_SETTINGS+=$(call addRequiredVersionSetting,CYGWIN_VER) -@@ -189,13 +187,11 @@ - endif - endif - ifeq ($(PLATFORM),linux) -- ALL_SETTINGS+=$(call addRequiredSetting,LINUX_VERSION) -- ifneq ($(ARCH), ia64) -- ALL_SETTINGS+=$(call addRequiredSetting,ALSA_VERSION) -- endif -+ ALL_SETTINGS+=$(call addRequiredSetting,ALSA_VERSION) - endif - ALL_SETTINGS+=$(call addRequiredVersionSetting,OS_VERSION) --ALL_SETTINGS+=$(call addRequiredSetting,OS_NAME) -+ALL_SETTINGS+=$(call addOptionalSetting,OS_VARIANT_NAME) -+ALL_SETTINGS+=$(call addOptionalSetting,OS_VARIANT_VERSION) - ALL_SETTINGS+=$(call addRequiredSetting,MB_OF_MEMORY) - - diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/6816311-compiler_name.patch --- a/patches/openjdk/6816311-compiler_name.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,212 +0,0 @@ -diff -Nru openjdk.orig/jdk/make/common/Defs-windows.gmk openjdk/jdk/make/common/Defs-windows.gmk ---- openjdk.orig/jdk/make/common/Defs-windows.gmk 2014-10-20 15:22:47.872123681 +0100 -+++ openjdk/jdk/make/common/Defs-windows.gmk 2014-10-20 15:24:10.649264581 +0100 -@@ -75,6 +75,14 @@ - # The following DLL's are considered MS runtime libraries and should - # not to be REBASEd, see deploy/make/common/Release.gmk. - # msvcr*.dll: Microsoft runtimes -+ifeq ($(ARCH_DATA_MODEL), 64) -+ ifeq ($(COMPILER_VERSION), VS2008) -+ MSVCRNN_DLL = msvcr90.dll -+ MSVCPNN_DLL = msvcp90.dll -+ MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL) -+ endif -+endif -+ - ifeq ($(COMPILER_VERSION), VS2010) - MSVCRNN_DLL = msvcr100.dll - MSVCPNN_DLL = msvcp100.dll -@@ -271,6 +279,8 @@ - # Treat compiler warnings as errors, if requested - # - CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL) -+# Turn off security warnings about using the standard C library function strcpy -+CFLAGS_COMMON += -D _CRT_SECURE_NO_DEPRECATE - ifeq ($(COMPILER_WARNINGS_FATAL),true) - CFLAGS_COMMON += -WX - endif -diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2014-10-20 15:22:47.900124067 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2014-10-20 15:24:10.649264581 +0100 -@@ -27,8 +27,6 @@ - # GCC Compiler settings - # - --COMPILER_NAME=GCC -- - ifeq ($(PLATFORM), windows) - - # Settings specific to Windows, pretty stale, hasn't been used -@@ -153,3 +151,7 @@ - _CC_VER :=$(shell $(CC) -dumpversion 2>&1 ) - CC_VER :=$(call GetVersion,"$(_CC_VER)") - -+# Name of compiler -+COMPILER_NAME = GCC$(call MajorVersion,$(CC_VER)) -+COMPILER_VERSION = $(COMPILER_NAME) -+ -diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-msvc.gmk openjdk/jdk/make/common/shared/Compiler-msvc.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-msvc.gmk 2014-10-20 15:22:47.900124067 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-msvc.gmk 2014-10-20 15:24:10.649264581 +0100 -@@ -78,6 +78,12 @@ - MT = $(_OTHER_TOOLS_BIN)/mt.exe - MTL = $(_OTHER_TOOLS_BIN)/midl.exe - endif -+ ifeq ($(CC_MAJORVER), 15) -+ COMPILER_NAME=Microsoft Windows SDK with Visual Studio 9 (6001.18000.367) -+ COMPILER_VERSION=VS2008 -+ RC = $(MSSDK61)/Bin/X64/rc.exe -+ MT = $(MSSDK61)/Bin/X64/mt.exe -+ endif - - # These variables can never be empty - ifndef COMPILER_PATH -diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk openjdk/jdk/make/common/shared/Compiler-sun.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk 2014-10-20 15:22:47.900124067 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-sun.gmk 2014-10-20 15:24:10.649264581 +0100 -@@ -27,13 +27,8 @@ - # Sun Studio Compiler settings - # - --COMPILER_NAME=Sun Studio -- - # Sun Studio Compiler settings specific to Solaris - ifeq ($(PLATFORM), solaris) -- # FIXUP: Change to SS12 when validated -- #COMPILER_VERSION=SS12 -- COMPILER_VERSION=SS11 - CC = $(COMPILER_PATH)cc - CPP = $(COMPILER_PATH)cc -E - CXX = $(COMPILER_PATH)CC -@@ -46,7 +41,6 @@ - # Sun Studio Compiler settings specific to Linux - ifeq ($(PLATFORM), linux) - # This has not been tested -- COMPILER_VERSION=SS11 - CC = $(COMPILER_PATH)cc - CPP = $(COMPILER_PATH)cc -E - CXX = $(COMPILER_PATH)CC -@@ -68,6 +62,18 @@ - _CC_VER :=$(shell $(CC) -V 2>&1 | $(HEAD) -n 1) - CC_VER :=$(call GetVersion,"$(_CC_VER)") - -+# Name of compilers being used -+COMPILER_VERSION-5.7 = SS10 -+COMPILER_NAME-5.7 = Sun Studio 10 -+COMPILER_VERSION-5.8 = SS11 -+COMPILER_NAME-5.8 = Sun Studio 11 -+COMPILER_VERSION-5.9 = SS12 -+COMPILER_NAME-5.9 = Sun Studio 12 -+COMPILER_VERSION-5.10 = SS13 -+COMPILER_NAME-5.10 = Sun Studio 13 -+COMPILER_VERSION = $(COMPILER_VERSION-$(CC_VER)) -+COMPILER_NAME = $(COMPILER_NAME-$(CC_VER)) -+ - # Arch specific settings (determines type of .o files and instruction set) - # Starting in SS12 (5.9), the arch options changed. - # The assembler /usr/ccs/bin/as wants older SS11 (5.8) style options. -diff -Nru openjdk.orig/jdk/make/common/shared/Defs-versions.gmk openjdk/jdk/make/common/shared/Defs-versions.gmk ---- openjdk.orig/jdk/make/common/shared/Defs-versions.gmk 2014-10-20 15:22:47.916124287 +0100 -+++ openjdk/jdk/make/common/shared/Defs-versions.gmk 2014-10-20 15:24:10.649264581 +0100 -@@ -45,6 +45,12 @@ - # REQUIRED_CC_VER - # The primary C compiler version expected. - # -+# REQUIRED_COMPILER_NAME -+# The long descriptive name of the compiler we should use -+# -+# REQUIRED_COMPILER_VERSION -+# The one word name that identifies the compilers being used. -+# - # REQUIRED_CYGWIN_VER - # Windows only: If CYGWIN is used, the minimum CYGWIN version. - # -@@ -114,6 +120,8 @@ - else - REQUIRED_FREE_SPACE = 1040000 - endif -+ REQUIRED_COMPILER_NAME = Sun Studio 11 -+ REQUIRED_COMPILER_VERSION = SS11 - ifeq ($(CC_VERSION),sun) - REQUIRED_CC_VER = 5.8 - endif -@@ -130,6 +138,8 @@ - REQUIRED_OS_VARIANT_VERSION = 9 - REQUIRED_FREE_SPACE = 1460000 - REQUIRED_ALSA_VERSION = 0.9.1 -+ REQUIRED_COMPILER_NAME = GCC3 -+ REQUIRED_COMPILER_VERSION = GCC3 - REQUIRED_GCC_VER = 2.95 - ifeq ($(CC_VERSION),gcc) - REQUIRED_CC_VER = 3.2 -@@ -155,14 +165,20 @@ - REQUIRED_DXSDK_VER = 0x0900 - ifeq ($(CC_VERSION),msvc) - ifeq ($(ARCH_DATA_MODEL), 32) -+ REQUIRED_COMPILER_NAME = Visual Studio .NET 2003 Professional C++ -+ REQUIRED_COMPILER_VERSION = VS2003 - REQUIRED_CC_VER = 13.10.3077 - REQUIRED_LINK_VER = 7.10.3077 - else - ifeq ($(ARCH), ia64) -- REQUIRED_CC_VER = 13.00.9337.7 -- REQUIRED_LINK_VER = 7.00.9337.7 -+ REQUIRED_COMPILER_NAME = Microsoft Platform SDK - November 2001 Edition -+ REQUIRED_COMPILER_VERSION = VS2003 -+ REQUIRED_CC_VER = 13.00.9337.7 -+ REQUIRED_LINK_VER = 7.00.9337.7 - endif - ifeq ($(ARCH), amd64) -+ REQUIRED_COMPILER_NAME=Microsoft Platform SDK - April 2005 Edition (3790.1830) -+ REQUIRED_COMPILER_VERSION=VS2005 - REQUIRED_CC_VER = 14.00.40310.41 - REQUIRED_LINK_VER = 8.00.40310.39 - endif -diff -Nru openjdk.orig/jdk/make/common/shared/Sanity.gmk openjdk/jdk/make/common/shared/Sanity.gmk ---- openjdk.orig/jdk/make/common/shared/Sanity.gmk 2014-10-20 15:22:47.904124123 +0100 -+++ openjdk/jdk/make/common/shared/Sanity.gmk 2014-10-20 15:24:10.653264635 +0100 -@@ -129,7 +129,7 @@ - ifeq ($(_OS_VERSION),) - OS_VERSION = 5.0 - else -- OS_VERSION = $(_OS_VERSION) -+ OS_VERSION = $(call MajorVersion,$(_OS_VERSION)).$(call MinorVersion,$(_OS_VERSION)) - endif - OS_VARIANT_NAME := $(WINDOWS_MAPPING-$(OS_VERSION)) - OS_VARIANT_VERSION := $(OS_VERSION) -@@ -1289,8 +1289,8 @@ - fi - @if [ "$(LINK_CHECK)" != "same" ]; then \ - $(ECHO) "WARNING: To build Java 2 SDK $(JDK_VERSION) you need : \n" \ -- " $(COMPILER_VERSION) - link.exe version \"$(REQUIRED_LINK_VER)\" \n" \ -- " Specifically the $(COMPILER_NAME) link.exe. \n " \ -+ " $(REQUIRED_COMPILER_VERSION) - link.exe version \"$(REQUIRED_LINK_VER)\" \n" \ -+ " Specifically the $(REQUIRED_COMPILER_NAME) link.exe. \n " \ - " $(YOU_ARE_USING) Linker version \"$(LINK_VER)\" \n" \ - "" >> $(WARNING_FILE) ; \ - fi -@@ -1307,21 +1307,13 @@ - fi - ifndef OPENJDK - @if [ "$(CC_CHECK)" != "same" ]; then \ -- $(ECHO) "WARNING: The $(PLATFORM) compiler is not version $(COMPILER_VERSION) $(REQUIRED_CC_VER) \n" \ -- " Specifically the $(COMPILER_NAME) $(CC_TYPE) compiler. \n " \ -- " $(YOU_ARE_USING) compiler version: $(CC_VER) \n" \ -+ $(ECHO) "WARNING: The $(PLATFORM) compiler is not version $(REQUIRED_COMPILER_VERSION) $(REQUIRED_CC_VER) \n" \ -+ " Specifically the $(REQUIRED_COMPILER_NAME) compiler. \n " \ -+ " $(YOU_ARE_USING) $(COMPILER_VERSION): $(CC_VER) \n" \ - " The compiler was obtained from the following location: \n" \ - " $(COMPILER_PATH) \n" \ - "" >> $(WARNING_FILE) ; \ - fi -- ifeq ($(PLATFORM), windows) -- ifeq ($(ARCH_DATA_MODEL), 64) -- ifneq ($(COMPILER_VERSION), VS2005) -- @$(ECHO) "WARNING: Should be using VS2005 compiler on 64bit platform. \n" \ -- "" >> $(WARNING_FILE) -- endif -- endif -- endif - endif - - ###################################################### diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/6888215-jpeg_memory_leak.patch --- a/patches/openjdk/6888215-jpeg_memory_leak.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -# HG changeset patch -# User bae -# Date 1256299191 -14400 -# Fri Oct 23 15:59:51 2009 +0400 -# Node ID 5fc5d3243a5c68774277a18938c6f496cabd7f94 -# Parent c579f830770746e8b679ebd3a8a40eb5253e16e5 -6888215: memory leak in jpeg plugin -Reviewed-by: igor, prr - -diff --git a/src/share/native/sun/awt/image/jpeg/imageioJPEG.c b/src/share/native/sun/awt/image/jpeg/imageioJPEG.c ---- openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c -+++ openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c -@@ -1437,6 +1437,7 @@ - JNU_ThrowByName( env, - "java/lang/OutOfMemoryError", - "Initializing Reader"); -+ free(cinfo); - return 0; - } - -@@ -1473,6 +1474,7 @@ - JNU_ThrowByName(env, - "java/lang/OutOfMemoryError", - "Initializing Reader"); -+ imageio_dispose((j_common_ptr)cinfo); - return 0; - } - cinfo->src->bytes_in_buffer = 0; -@@ -1489,6 +1491,7 @@ - JNU_ThrowByName( env, - "java/lang/OutOfMemoryError", - "Initializing Reader"); -+ imageio_dispose((j_common_ptr)cinfo); - return 0; - } - return (jlong) ret; -@@ -2420,8 +2423,7 @@ - JNU_ThrowByName( env, - "java/lang/OutOfMemoryError", - "Initializing Writer"); -- free(cinfo); -- free(jerr); -+ imageio_dispose((j_common_ptr)cinfo); - return 0; - } - -@@ -2439,8 +2441,7 @@ - JNU_ThrowByName( env, - "java/lang/OutOfMemoryError", - "Initializing Writer"); -- free(cinfo); -- free(jerr); -+ imageio_dispose((j_common_ptr)cinfo); - return 0; - } - return (jlong) ret; diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/6974017-minorver_for_solaris.patch --- a/patches/openjdk/6974017-minorver_for_solaris.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk openjdk/jdk/make/common/shared/Compiler-sun.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk 2013-09-02 16:05:41.237401088 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-sun.gmk 2013-09-02 16:07:06.026720438 +0100 -@@ -61,6 +61,7 @@ - # Get compiler version - _CC_VER :=$(shell $(CC) -V 2>&1 | $(HEAD) -n 1) - CC_VER :=$(call GetVersion,"$(_CC_VER)") -+CC_MINORVER :=$(call MinorVersion,$(CC_VER)) - - # Name of compilers being used - COMPILER_VERSION-5.7 = SS10 -@@ -69,8 +70,10 @@ - COMPILER_NAME-5.8 = Sun Studio 11 - COMPILER_VERSION-5.9 = SS12 - COMPILER_NAME-5.9 = Sun Studio 12 --COMPILER_VERSION-5.10 = SS13 --COMPILER_NAME-5.10 = Sun Studio 13 -+COMPILER_VERSION-5.10 = SS12u1 -+COMPILER_NAME-5.10 = Sun Studio 12 Update 1 -+COMPILER_VERSION-5.11 = OSS12u2 -+COMPILER_NAME-5.11 = Oracle Solaris Studio 12 Update 2 - COMPILER_VERSION = $(COMPILER_VERSION-$(CC_VER)) - COMPILER_NAME = $(COMPILER_NAME-$(CC_VER)) - diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/6980281-majorver_for_solaris.patch --- a/patches/openjdk/6980281-majorver_for_solaris.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -# HG changeset patch -# User bae -# Date 1291553491 -10800 -# Sun Dec 05 15:51:31 2010 +0300 -# Node ID 15e3f6f4a43327a0baa7c7ad0f41ea62c566506b -# Parent 024fe931de8c0e4b56b29d4b666fbcc69c6213e3 -6980281: SWAT: SwingSet2 got core dumped in Solaris-AMD64 using b107 swat build -Reviewed-by: prr, ohair - -diff --git a/make/common/Defs-solaris.gmk b/make/common/Defs-solaris.gmk ---- openjdk/jdk/make/common/Defs-solaris.gmk -+++ openjdk/jdk/make/common/Defs-solaris.gmk -@@ -466,12 +466,14 @@ - # On X86, make sure tail call optimization is off - # The z and y are the tail call optimizations. - ifeq ($(ARCH_FAMILY), i586) -- ifeq ($(shell $(EXPR) $(CC_VER) \> 5.8), 1) -- # Somehow, tail call optimization is creeping in. -- # Make sure it is off. -- # WARNING: These may cause compiler warnings about duplicate -O options -- CC_XKEEPFRAME_OPTIONS += -Wu,-O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz -- CXX_XKEEPFRAME_OPTIONS += -Qoption ube -O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz -+ ifeq ($(shell $(EXPR) $(CC_MAJORVER) \>= 5), 1) -+ ifeq ($(shell $(EXPR) $(CC_MINORVER) \> 8), 1) -+ # Somehow, tail call optimization is creeping in. -+ # Make sure it is off. -+ # WARNING: These may cause compiler warnings about duplicate -O options -+ CC_XKEEPFRAME_OPTIONS += -Wu,-O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz -+ CXX_XKEEPFRAME_OPTIONS += -Qoption ube -O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz -+ endif - endif - endif - -@@ -487,12 +489,15 @@ - CC_XKEEPFRAME_OPTIONS += -Wu,-Z~B - CXX_XKEEPFRAME_OPTIONS += -Qoption ube -Z~B - endif -- ifeq ($(shell $(EXPR) $(CC_VER) \> 5.6), 1) -- # Do NOT use frame pointer register as a general purpose opt register -- CC_OPT/NONE += -xregs=no%frameptr -- CXX_OPT/NONE += -xregs=no%frameptr -- CC_XKEEPFRAME_OPTIONS += -xregs=no%frameptr -- CXX_XKEEPFRAME_OPTIONS += -xregs=no%frameptr -+ -+ ifeq ($(shell $(EXPR) $(CC_MAJORVER) \>= 5), 1) -+ ifeq ($(shell $(EXPR) $(CC_MINORVER) \> 6), 1) -+ # Do NOT use frame pointer register as a general purpose opt register -+ CC_OPT/NONE += -xregs=no%frameptr -+ CXX_OPT/NONE += -xregs=no%frameptr -+ CC_XKEEPFRAME_OPTIONS += -xregs=no%frameptr -+ CXX_XKEEPFRAME_OPTIONS += -xregs=no%frameptr -+ endif - endif - endif - -diff --git a/make/common/shared/Compiler-sun.gmk b/make/common/shared/Compiler-sun.gmk ---- openjdk/jdk/make/common/shared/Compiler-sun.gmk -+++ openjdk/jdk/make/common/shared/Compiler-sun.gmk -@@ -61,6 +61,7 @@ - # Get compiler version - _CC_VER :=$(shell $(CC) -V 2>&1 | $(HEAD) -n 1) - CC_VER :=$(call GetVersion,"$(_CC_VER)") -+CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) - CC_MINORVER :=$(call MinorVersion,$(CC_VER)) - - # Name of compilers being used diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/6989774-imageio_compiler_warnings.patch --- a/patches/openjdk/6989774-imageio_compiler_warnings.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,519 +0,0 @@ -diff -Nru openjdk.orig/jdk/make/sun/jpeg/Makefile openjdk/jdk/make/sun/jpeg/Makefile ---- openjdk.orig/jdk/make/sun/jpeg/Makefile 2012-10-26 19:25:41.000000000 +0100 -+++ openjdk/jdk/make/sun/jpeg/Makefile 2013-08-30 16:29:41.181832003 +0100 -@@ -65,6 +65,19 @@ - FILES_reorder += reorder-$(ARCH) - endif - endif -+ -+ifeq ($(PLATFORM), linux) -+ -+ # Suppress gcc warnings like "variable might be clobbered by 'longjmp' -+ # or 'vfork'": this warning indicates that some variable is placed to -+ # a register by optimized compiler and it's value might be lost on longjmp(). -+ # Recommended way to avoid such warning is to declare the variable as -+ # volatile to prevent the optimization. However, this approach does not -+ # work because we have to declare all variables as volatile in result. -+ -+ OTHER_CFLAGS += -Wno-clobbered -+endif -+ - include $(BUILDDIR)/common/Mapfile-vers.gmk - include $(BUILDDIR)/common/Library.gmk - -diff -Nru openjdk.orig/jdk/make/sun/jpeg/reorder-i586 openjdk/jdk/make/sun/jpeg/reorder-i586 ---- openjdk.orig/jdk/make/sun/jpeg/reorder-i586 2012-10-26 19:25:41.000000000 +0100 -+++ openjdk/jdk/make/sun/jpeg/reorder-i586 2013-08-30 16:29:41.181832003 +0100 -@@ -22,7 +22,7 @@ - text: .text%alloc_small: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jmemmgr.o; - text: .text%reset_marker_reader: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%jIInCtlr; --text: .text%GET_ARRAYS: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jpegdecoder.o; -+# text: .text%GET_ARRAYS: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jpegdecoder.o; - text: .text%jReadHeader; - text: .text%jConsumeInput; - text: .text%reset_input_controller: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o; -@@ -30,36 +30,36 @@ - text: .text%sun_jpeg_init_source; - text: .text%consume_markers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o; - text: .text%read_markers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; --text: .text%first_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; -+# text: .text%first_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%sun_jpeg_fill_input_buffer; --text: .text%RELEASE_ARRAYS: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jpegdecoder.o; --text: .text%get_soi: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; -+# text: .text%RELEASE_ARRAYS: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jpegdecoder.o; -+# text: .text%get_soi: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%emit_message: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jerror.o; --text: .text%next_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; -+# text: .text%next_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%get_interesting_appn: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; --text: .text%examine_app0: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; -+# text: .text%examine_app0: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%skip_variable: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%sun_jpeg_skip_input_data; --text: .text%examine_app14: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; -+# text: .text%examine_app14: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%get_dqt: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%jAlcQTable; - text: .text%get_sof: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; --text: .text%get_dri: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; -+# text: .text%get_dri: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%get_dht: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%jAlcHTable; - text: .text%get_sos: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; --text: .text%initial_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o; -+# text: .text%initial_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o; - text: .text%jDivRound; --text: .text%default_decompress_parms: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdapimin.o; -+# text: .text%default_decompress_parms: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdapimin.o; - text: .text%jHasMultScn; - text: .text%jStrtDecompress; - text: .text%jIDMaster; --text: .text%master_selection: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; -+# text: .text%master_selection: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; - text: .text%jCalcDimensions; --text: .text%use_merged_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; --text: .text%prepare_range_limit_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; -+# text: .text%use_merged_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; -+# text: .text%prepare_range_limit_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; - text: .text%jIDColor; --text: .text%build_ycc_rgb_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcolor.o; -+# text: .text%build_ycc_rgb_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcolor.o; - text: .text%jIUpsampler; - text: .text%jRound; - text: .text%alloc_sarray: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jmemmgr.o; -@@ -70,16 +70,16 @@ - text: .text%jIHDecoder; - text: .text%jIDCoefC; - text: .text%jIDMainC; --text: .text%alloc_funny_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; -+# text: .text%alloc_funny_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; - text: .text%realize_virt_arrays: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jmemmgr.o; - text: .text%start_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o; --text: .text%per_scan_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o; --text: .text%latch_quant_tables: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o; -+# text: .text%per_scan_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o; -+# text: .text%latch_quant_tables: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o; - text: .text%start_pass_huff_decoder: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdhuff.o; - text: .text%jMkDDerived; - text: .text%start_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o; --text: .text%start_iMCU_row: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o; --text: .text%output_pass_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdapistd.o; -+# text: .text%start_iMCU_row: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o; -+# text: .text%output_pass_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdapistd.o; - text: .text%prepare_for_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; - text: .text%start_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jddctmgr.o; - text: .text%start_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o; -@@ -87,7 +87,7 @@ - text: .text%start_pass_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdsample.o; - text: .text%start_pass_dpost: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdpostct.o; - text: .text%start_pass_main: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; --text: .text%make_funny_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; -+# text: .text%make_funny_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; - text: .text%jReadScanlines; - text: .text%process_data_context_main: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; - text: .text%decompress_onepass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o; -@@ -100,11 +100,11 @@ - text: .text%fullsize_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdsample.o; - text: .text%h2v2_fancy_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdsample.o; - text: .text%ycc_rgb_convert: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcolor.o; --text: .text%set_wraparound_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; --text: .text%process_restart: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdhuff.o; -+# text: .text%set_wraparound_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; -+# text: .text%process_restart: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdhuff.o; - text: .text%read_restart_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%finish_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o; --text: .text%set_bottom_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; -+# text: .text%set_bottom_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; - text: .text%jFinDecompress; - text: .text%finish_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; - text: .text%sun_jpeg_term_source; -diff -Nru openjdk.orig/jdk/make/sun/jpeg/reorder-sparc openjdk/jdk/make/sun/jpeg/reorder-sparc ---- openjdk.orig/jdk/make/sun/jpeg/reorder-sparc 2012-10-26 19:25:41.000000000 +0100 -+++ openjdk/jdk/make/sun/jpeg/reorder-sparc 2013-08-30 16:29:41.181832003 +0100 -@@ -30,10 +30,10 @@ - text: .text%sun_jpeg_init_source; - text: .text%consume_markers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o; - text: .text%read_markers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; --text: .text%first_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; -+# text: .text%first_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%sun_jpeg_fill_input_buffer; - text: .text%RELEASE_ARRAYS: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jpegdecoder.o; --text: .text%get_soi: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; -+# text: .text%get_soi: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%emit_message: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jerror.o; - text: .text%next_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%get_interesting_appn: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; -@@ -44,7 +44,7 @@ - text: .text%get_dqt: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%jAlcQTable; - text: .text%get_sof: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; --text: .text%get_dri: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; -+# text: .text%get_dri: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%get_dht: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%jAlcHTable; - text: .text%get_sos: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; -@@ -56,10 +56,10 @@ - text: .text%jIDMaster; - text: .text%master_selection: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; - text: .text%jCalcDimensions; --text: .text%use_merged_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; --text: .text%prepare_range_limit_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; -+# text: .text%use_merged_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; -+# text: .text%prepare_range_limit_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; - text: .text%jIDColor; --text: .text%build_ycc_rgb_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcolor.o; -+# text: .text%build_ycc_rgb_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcolor.o; - text: .text%jIUpsampler; - text: .text%jRound; - text: .text%alloc_sarray: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jmemmgr.o; -@@ -78,7 +78,7 @@ - text: .text%start_pass_huff_decoder: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdhuff.o; - text: .text%jMkDDerived; - text: .text%start_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o; --text: .text%start_iMCU_row: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o; -+# text: .text%start_iMCU_row: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcoefct.o; - text: .text%output_pass_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdapistd.o; - text: .text%prepare_for_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; - text: .text%start_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jddctmgr.o; -@@ -100,11 +100,11 @@ - text: .text%fullsize_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdsample.o; - text: .text%h2v2_fancy_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdsample.o; - text: .text%ycc_rgb_convert: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdcolor.o; --text: .text%set_wraparound_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; --text: .text%process_restart: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdhuff.o; -+# text: .text%set_wraparound_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; -+#text: .text%process_restart: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdhuff.o; - text: .text%read_restart_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmarker.o; - text: .text%finish_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdinput.o; --text: .text%set_bottom_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; -+# text: .text%set_bottom_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmainct.o; - text: .text%jFinDecompress; - text: .text%finish_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj/jdmaster.o; - text: .text%sun_jpeg_term_source; -diff -Nru openjdk.orig/jdk/make/sun/jpeg/reorder-sparcv9 openjdk/jdk/make/sun/jpeg/reorder-sparcv9 ---- openjdk.orig/jdk/make/sun/jpeg/reorder-sparcv9 2012-10-26 19:25:41.000000000 +0100 -+++ openjdk/jdk/make/sun/jpeg/reorder-sparcv9 2013-08-30 16:29:41.181832003 +0100 -@@ -30,10 +30,10 @@ - text: .text%sun_jpeg_init_source; - text: .text%consume_markers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdinput.o; - text: .text%read_markers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; --text: .text%first_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; -+# text: .text%first_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; - text: .text%sun_jpeg_fill_input_buffer; - text: .text%RELEASE_ARRAYS: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jpegdecoder.o; --text: .text%get_soi: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; -+# text: .text%get_soi: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; - text: .text%emit_message: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jerror.o; - text: .text%next_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; - text: .text%get_interesting_appn: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; -@@ -44,7 +44,7 @@ - text: .text%get_dqt: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; - text: .text%jAlcQTable; - text: .text%get_sof: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; --text: .text%get_dri: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; -+# text: .text%get_dri: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; - text: .text%get_dht: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; - text: .text%jAlcHTable; - text: .text%get_sos: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; -@@ -56,10 +56,10 @@ - text: .text%jIDMaster; - text: .text%master_selection: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o; - text: .text%jCalcDimensions; --text: .text%use_merged_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o; --text: .text%prepare_range_limit_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o; -+# text: .text%use_merged_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o; -+# text: .text%prepare_range_limit_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o; - text: .text%jIDColor; --text: .text%build_ycc_rgb_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdcolor.o; -+# text: .text%build_ycc_rgb_table: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdcolor.o; - text: .text%jIUpsampler; - text: .text%jRound; - text: .text%alloc_sarray: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jmemmgr.o; -@@ -78,7 +78,7 @@ - text: .text%start_pass_huff_decoder: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdhuff.o; - text: .text%jMkDDerived; - text: .text%start_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdcoefct.o; --text: .text%start_iMCU_row: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdcoefct.o; -+# text: .text%start_iMCU_row: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdcoefct.o; - text: .text%output_pass_setup: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdapistd.o; - text: .text%prepare_for_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o; - text: .text%start_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jddctmgr.o; -@@ -100,11 +100,11 @@ - text: .text%fullsize_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdsample.o; - text: .text%h2v2_fancy_upsample: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdsample.o; - text: .text%ycc_rgb_convert: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdcolor.o; --text: .text%set_wraparound_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmainct.o; -+# text: .text%set_wraparound_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmainct.o; - text: .text%process_restart: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdhuff.o; - text: .text%read_restart_marker: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmarker.o; - text: .text%finish_input_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdinput.o; --text: .text%set_bottom_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmainct.o; -+# text: .text%set_bottom_pointers: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmainct.o; - text: .text%jFinDecompress; - text: .text%finish_output_pass: OUTPUTDIR/tmp/sun/sun.awt/jpeg/obj64/jdmaster.o; - text: .text%sun_jpeg_term_source; -diff -Nru openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c ---- openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2013-08-30 16:26:19.446692090 +0100 -+++ openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2013-08-30 16:31:55.715925913 +0100 -@@ -110,8 +110,8 @@ - jobject stream; // ImageInputStream or ImageOutputStream - jbyteArray hstreamBuffer; // Handle to a Java buffer for the stream - JOCTET *buf; // Pinned buffer pointer */ -- int bufferOffset; // holds offset between unpin and the next pin -- int bufferLength; // Allocated, nut just used -+ size_t bufferOffset; // holds offset between unpin and the next pin -+ size_t bufferLength; // Allocated, nut just used - int suspendable; // Set to true to suspend input - long remaining_skip; // Used only on input - } streamBuffer, *streamBufferPtr; -@@ -130,7 +130,7 @@ - * Used to signal that no data need be restored from an unpin to a pin. - * I.e. the buffer is empty. - */ --#define NO_DATA -1 -+#define NO_DATA ((size_t)-1) - - // Forward reference - static void resetStreamBuffer(JNIEnv *env, streamBufferPtr sb); -@@ -393,7 +393,6 @@ - static imageIODataPtr initImageioData (JNIEnv *env, - j_common_ptr cinfo, - jobject obj) { -- int i, j; - - imageIODataPtr data = (imageIODataPtr) malloc (sizeof(imageIOData)); - if (data == NULL) { -@@ -992,7 +991,7 @@ - streamBufferPtr sb = &data->streamBuf; - JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); - jint ret; -- int offset, buflen; -+ size_t offset, buflen; - - /* - * The original (jpegdecoder.c) had code here that called -@@ -1530,7 +1529,7 @@ - imageio_dispose((j_common_ptr)cinfo); - return 0; - } -- return (jlong) ret; -+ return ptr_to_jlong(ret); - } - - /* -@@ -1544,7 +1543,7 @@ - jobject this, - jlong ptr) { - -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - j_common_ptr cinfo; - - if (data == NULL) { -@@ -1583,7 +1582,7 @@ - int h_samp0, h_samp1, h_samp2; - int v_samp0, v_samp1, v_samp2; - jboolean retval = JNI_FALSE; -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - j_decompress_ptr cinfo; - struct jpeg_source_mgr *src; - sun_jpeg_error_ptr jerr; -@@ -1781,7 +1780,7 @@ - jlong ptr, - jint code) { - -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - j_decompress_ptr cinfo; - - if (data == NULL) { -@@ -1823,7 +1822,7 @@ - struct jpeg_source_mgr *src; - JSAMPROW scanLinePtr = NULL; - jint bands[MAX_BANDS]; -- int i, j; -+ int i; - jint *body; - int scanlineLimit; - int pixelStride; -@@ -1833,14 +1832,12 @@ - pixelBufferPtr pb; - sun_jpeg_error_ptr jerr; - boolean done; -- jint *bandSize; -- int maxBandValue, halfMaxBandValue; - boolean mustScale = FALSE; - boolean progressive = FALSE; - boolean orderedBands = TRUE; -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - j_decompress_ptr cinfo; -- unsigned int numBytes; -+ size_t numBytes; - - /* verify the inputs */ - -@@ -1872,10 +1869,10 @@ - return JNI_FALSE; - } - -- if (stepX > cinfo->image_width) { -+ if (stepX > (jint)cinfo->image_width) { - stepX = cinfo->image_width; - } -- if (stepY > cinfo->image_height) { -+ if (stepY > (jint)cinfo->image_height) { - stepY = cinfo->image_height; - } - -@@ -2172,7 +2169,7 @@ - jobject this, - jlong ptr) { - -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - - if (data == NULL) { - JNU_ThrowByName(env, -@@ -2190,7 +2187,7 @@ - (JNIEnv *env, - jobject this, - jlong ptr) { -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - j_decompress_ptr cinfo; - - if (data == NULL) { -@@ -2212,7 +2209,7 @@ - jobject this, - jlong ptr) { - -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - j_decompress_ptr cinfo; - sun_jpeg_error_ptr jerr; - -@@ -2285,7 +2282,7 @@ - jclass reader, - jlong ptr) { - -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - j_common_ptr info = destroyImageioData(env, data); - - imageio_dispose(info); -@@ -2370,8 +2367,8 @@ - JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); - - /* find out how much needs to be written */ -- jint datacount = sb->bufferLength - dest->free_in_buffer; -- -+ /* this conversion from size_t to jint is safe, because the lenght of the buffer is limited by jint */ -+ jint datacount = (jint)(sb->bufferLength - dest->free_in_buffer); - if (datacount != 0) { - RELEASE_ARRAYS(env, data, (const JOCTET *)(dest->next_output_byte)); - -@@ -2537,7 +2534,7 @@ - imageio_dispose((j_common_ptr)cinfo); - return 0; - } -- return (jlong) ret; -+ return ptr_to_jlong(ret); - } - - JNIEXPORT void JNICALL -@@ -2546,7 +2543,7 @@ - jobject this, - jlong ptr) { - -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - j_compress_ptr cinfo; - - if (data == NULL) { -@@ -2577,7 +2574,7 @@ - - struct jpeg_destination_mgr *dest; - sun_jpeg_error_ptr jerr; -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - j_compress_ptr cinfo; - - if (data == NULL) { -@@ -2677,7 +2674,7 @@ - jint *bandSize; - int maxBandValue, halfMaxBandValue; - boolean mustScale = FALSE; -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - j_compress_ptr cinfo; - - /* verify the inputs */ -@@ -2783,6 +2780,16 @@ - buffer); - JNU_ThrowByName(env, "javax/imageio/IIOException", buffer); - } -+ -+ if (scale != NULL) { -+ for (i = 0; i < numBands; i++) { -+ if (scale[i] != NULL) { -+ free(scale[i]); -+ } -+ } -+ free(scale); -+ } -+ - free(scanLinePtr); - return data->abortFlag; - } -@@ -2989,7 +2996,7 @@ - jobject this, - jlong ptr) { - -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - - if (data == NULL) { - JNU_ThrowByName(env, -@@ -3006,7 +3013,7 @@ - (JNIEnv *env, - jobject this, - jlong ptr) { -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - j_compress_ptr cinfo; - - if (data == NULL) { -@@ -3038,7 +3045,7 @@ - jclass writer, - jlong ptr) { - -- imageIODataPtr data = (imageIODataPtr) ptr; -+ imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); - j_common_ptr info = destroyImageioData(env, data); - - imageio_dispose(info); -diff -Nru openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c ---- openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c 2012-10-26 19:26:12.000000000 +0100 -+++ openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c 2013-08-30 16:29:41.181832003 +0100 -@@ -328,7 +328,7 @@ - if ((*env)->ExceptionOccurred(env) || !GET_ARRAYS(env, src)) { - cinfo->err->error_exit((struct jpeg_common_struct *) cinfo); - } -- if (ret <= src->remaining_skip) { -+ if (ret < 0 || (unsigned int)ret <= src->remaining_skip) { - return; - } - if (src->remaining_skip) { -@@ -397,7 +397,7 @@ - } - num_bytes += src->remaining_skip; - src->remaining_skip = 0; -- ret = src->pub.bytes_in_buffer; -+ ret = (int)src->pub.bytes_in_buffer; /* this conversion is safe, because capacity of the buffer is limited by jnit */ - if (ret >= num_bytes) { - src->pub.next_input_byte += num_bytes; - src->pub.bytes_in_buffer -= num_bytes; diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/7000225-bad_tabs.patch --- a/patches/openjdk/7000225-bad_tabs.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -# HG changeset patch -# User andrew -# Date 1290478643 0 -# Tue Nov 23 02:17:23 2010 +0000 -# Node ID beb9f3298ad3b32c24ceda7b7d3ed812152bafaa -# Parent 565be51eb60e3660f9261d3cee23b81d0e50e440 -7000225: Sanity check on sane-alsa-headers is broken -Summary: Fix use of tab separators, ${alsa_version} expansion and conditional -Reviewed-by: ohair - -diff --git a/make/common/shared/Sanity.gmk b/make/common/shared/Sanity.gmk ---- openjdk/jdk/make/common/shared/Sanity.gmk -+++ openjdk/jdk/make/common/shared/Sanity.gmk -@@ -1389,20 +1389,21 @@ - endif - sane-alsa-headers: - ifdef REQUIRED_ALSA_VERSION -- if [ "$(ALSA_CHECK)" != "same" -a "$(ALSA_CHECK)" != "newer" ] ; then \ -- $(ECHO) "ERROR: The ALSA version must be $(REQUIRED_ALSA_VERSION) or higher. \n" \ -- " You have the following ALSA version installed: $${alsa_version) \n" \ -- " Please reinstall ALSA (drivers and lib). You can download \n" \ -- " the source distribution from http://www.alsa-project.org \n" \ -- " or go to http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \ -- "" >> $(ERROR_FILE) ; \ -- fi \ -+ @if [ "$(ALSA_CHECK)" != "missing" ] ; then \ -+ if [ "$(ALSA_CHECK)" != "same" -a "$(ALSA_CHECK)" != "newer" ] ; then \ -+ $(ECHO) "ERROR: The ALSA version must be $(REQUIRED_ALSA_VERSION) or higher. \n" \ -+ " You have the following ALSA version installed: $${alsa_version} \n" \ -+ " Please reinstall ALSA (drivers and lib). You can download \n" \ -+ " the source distribution from http://www.alsa-project.org \n" \ -+ " or go to http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \ -+ "" >> $(ERROR_FILE) ; \ -+ fi ; \ - else \ -- $(ECHO) "ERROR: You seem to not have installed ALSA $(REQUIRED_ALSA_VERSION) or higher. \n" \ -- " Please install ALSA (drivers and lib). You can download the \n" \ -- " source distribution from http://www.alsa-project.org or go to \n" \ -- " http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \ -- "" >> $(ERROR_FILE) ; \ -+ $(ECHO) "ERROR: You seem to not have installed ALSA $(REQUIRED_ALSA_VERSION) or higher. \n" \ -+ " Please install ALSA (drivers and lib). You can download the \n" \ -+ " source distribution from http://www.alsa-project.org or go to \n" \ -+ " http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \ -+ "" >> $(ERROR_FILE) ; \ - fi - endif - diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/7025066-embedded_build.patch --- a/patches/openjdk/7025066-embedded_build.patch Tue Aug 16 03:15:54 2016 +0100 +++ b/patches/openjdk/7025066-embedded_build.patch Wed Aug 17 02:53:46 2016 +0100 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/jdk/make/common/Defs-embedded.gmk openjdk/jdk/make/common/Defs-embedded.gmk --- openjdk.orig/jdk/make/common/Defs-embedded.gmk 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/make/common/Defs-embedded.gmk 2013-10-09 11:57:00.416951716 +0100 ++++ openjdk/jdk/make/common/Defs-embedded.gmk 2016-08-16 05:13:50.371020643 +0100 @@ -0,0 +1,53 @@ +# +# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. @@ -56,8 +56,8 @@ +endif # JAVASE_EMBEDDED + diff -Nru openjdk.orig/jdk/make/common/Defs.gmk openjdk/jdk/make/common/Defs.gmk ---- openjdk.orig/jdk/make/common/Defs.gmk 2013-10-09 01:32:58.126292030 +0100 -+++ openjdk/jdk/make/common/Defs.gmk 2013-10-09 12:02:00.033606462 +0100 +--- openjdk.orig/jdk/make/common/Defs.gmk 2016-08-16 05:12:36.908221727 +0100 ++++ openjdk/jdk/make/common/Defs.gmk 2016-08-16 05:13:50.371020643 +0100 @@ -124,6 +124,12 @@ include $(JDK_TOPDIR)/make/common/Defs-$(PLATFORM).gmk @@ -72,8 +72,8 @@ # ifdef OPENJDK diff -Nru openjdk.orig/jdk/make/common/Library.gmk openjdk/jdk/make/common/Library.gmk ---- openjdk.orig/jdk/make/common/Library.gmk 2013-10-09 01:32:58.126292030 +0100 -+++ openjdk/jdk/make/common/Library.gmk 2013-10-09 11:57:00.416951716 +0100 +--- openjdk.orig/jdk/make/common/Library.gmk 2016-08-16 03:20:55.641983012 +0100 ++++ openjdk/jdk/make/common/Library.gmk 2016-08-16 05:13:50.371020643 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. @@ -92,7 +92,7 @@ # files as quickly as possible. diff -Nru openjdk.orig/jdk/make/common/Release-embedded.gmk openjdk/jdk/make/common/Release-embedded.gmk --- openjdk.orig/jdk/make/common/Release-embedded.gmk 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/make/common/Release-embedded.gmk 2013-10-09 11:57:00.416951716 +0100 ++++ openjdk/jdk/make/common/Release-embedded.gmk 2016-08-16 05:13:50.371020643 +0100 @@ -0,0 +1,232 @@ +# +# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. @@ -327,8 +327,8 @@ +endif # JAVASE_EMBEDDED + diff -Nru openjdk.orig/jdk/make/common/Release.gmk openjdk/jdk/make/common/Release.gmk ---- openjdk.orig/jdk/make/common/Release.gmk 2013-10-09 01:32:55.966258542 +0100 -+++ openjdk/jdk/make/common/Release.gmk 2013-10-09 12:01:06.860785412 +0100 +--- openjdk.orig/jdk/make/common/Release.gmk 2016-08-16 05:12:36.912221661 +0100 ++++ openjdk/jdk/make/common/Release.gmk 2016-08-16 05:13:50.375020578 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. @@ -336,7 +336,7 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it -@@ -35,7 +35,7 @@ +@@ -41,7 +41,7 @@ IMAGE_BINDIR = bin @@ -345,7 +345,7 @@ # classes in the com.sun.java.swing.plaf packages, since we've always # allowed, and even advocated, extending them (see bug 6476749). # -@@ -221,6 +221,16 @@ +@@ -227,6 +227,16 @@ fi endef @@ -362,7 +362,7 @@ # # Targets. # -@@ -652,7 +662,7 @@ +@@ -662,7 +672,7 @@ $(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@ $(RESOURCES_JAR): $(RES_JAR_ARGLIST) $(JAR_MANIFEST_FILE) $(prep-target) @@ -371,7 +371,7 @@ @$(RES_JAR_ARGLIST) $(JAR_JFLAGS) @$(java-vm-cleanup) -@@ -660,7 +670,7 @@ +@@ -670,7 +680,7 @@ JSSE_JAR=$(TEMPDIR)/jsse-orig.jar $(JSSE_JAR): $(JAR_MANIFEST_FILE) $(prep-target) @@ -380,7 +380,7 @@ $(JSSE_CLASSES_DIRS:%=-C $(CLASSBINDIR) %) \ $(JAR_JFLAGS) @$(java-vm-cleanup) -@@ -711,7 +721,7 @@ +@@ -721,7 +731,7 @@ $(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@ $(RT_JAR): $(RT_JAR_ARGLIST) $(JAR_MANIFEST_FILE) $(prep-target) @@ -389,7 +389,7 @@ @$(RT_JAR_ARGLIST) $(JAR_JFLAGS) @$(java-vm-cleanup) -@@ -719,6 +729,10 @@ +@@ -729,6 +739,10 @@ BUILDMETAINDEX_JARFILE = $(ABS_BUILDTOOLJARDIR)/buildmetaindex.jar @@ -400,7 +400,7 @@ ###################################################### # JRE Image ###################################################### -@@ -948,7 +962,7 @@ +@@ -959,7 +973,7 @@ @# @# lib/tools.jar @# @@ -409,7 +409,7 @@ -C $(CLASSBINDIR) , $(TOOLS)) \ $(JAR_JFLAGS) @$(java-vm-cleanup) -@@ -962,7 +976,7 @@ +@@ -973,7 +987,7 @@ -Acom.sun.tools.javac.sym.Jar=$(RT_JAR) \ -Acom.sun.tools.javac.sym.Dest=$(OUTPUTDIR)/symbols/META-INF/sym/rt.jar \ $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS) @@ -419,9 +419,9 @@ @$(java-vm-cleanup) $(CP) $(LIBDIR)/ct.sym $(JDK_IMAGE_DIR)/lib/ct.sym diff -Nru openjdk.orig/jdk/make/common/shared/Sanity-Settings.gmk openjdk/jdk/make/common/shared/Sanity-Settings.gmk ---- openjdk.orig/jdk/make/common/shared/Sanity-Settings.gmk 2013-10-09 01:32:58.154292464 +0100 -+++ openjdk/jdk/make/common/shared/Sanity-Settings.gmk 2013-10-09 11:57:00.420951778 +0100 -@@ -180,7 +180,9 @@ +--- openjdk.orig/jdk/make/common/shared/Sanity-Settings.gmk 2016-08-16 03:20:55.645982946 +0100 ++++ openjdk/jdk/make/common/shared/Sanity-Settings.gmk 2016-08-16 05:13:50.375020578 +0100 +@@ -187,7 +187,9 @@ endif endif ifeq ($(PLATFORM),linux) @@ -433,8 +433,8 @@ ALL_SETTINGS+=$(call addRequiredVersionSetting,OS_VERSION) ALL_SETTINGS+=$(call addOptionalSetting,OS_VARIANT_NAME) diff -Nru openjdk.orig/jdk/make/java/zip/Makefile openjdk/jdk/make/java/zip/Makefile ---- openjdk.orig/jdk/make/java/zip/Makefile 2013-10-09 01:32:53.166215133 +0100 -+++ openjdk/jdk/make/java/zip/Makefile 2013-10-09 11:59:34.411356495 +0100 +--- openjdk.orig/jdk/make/java/zip/Makefile 2016-08-16 03:20:55.649982880 +0100 ++++ openjdk/jdk/make/java/zip/Makefile 2016-08-16 05:14:24.234467021 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. @@ -442,7 +442,7 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it -@@ -46,7 +46,10 @@ +@@ -48,7 +48,10 @@ java/util/jar/JarFile.java ifneq ($(PLATFORM), windows) @@ -451,6 +451,6 @@ + ifneq ($(LIBZIP_CAN_USE_MMAP),false) + OTHER_CFLAGS += -DUSE_MMAP + endif - else - # Files built here do not compile with warning level 3 if warnings are fatal - COMPILER_WARNINGS_FATAL=false + endif + + # diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/7038711-fix_no-clobber_usage.patch --- a/patches/openjdk/7038711-fix_no-clobber_usage.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk ---- openjdk.orig/jdk/make/common/Defs-linux.gmk 2013-09-02 16:42:50.832083666 +0100 -+++ openjdk/jdk/make/common/Defs-linux.gmk 2013-09-02 16:43:24.332604388 +0100 -@@ -258,9 +258,8 @@ - # statically link libgcc but will print a warning with the flag. We don't - # want the warning, so check gcc version first. - # --CC_VER_MAJOR := $(shell $(CC) -dumpversion | $(SED) 's/egcs-//' | $(CUT) -d'.' -f1) --ifeq ("$(CC_VER_MAJOR)", "3") --OTHER_LDFLAGS += -static-libgcc -+ifeq ($(CC_MAJORVER),3) -+ OTHER_LDFLAGS += -static-libgcc - endif - - # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) -diff -Nru openjdk.orig/jdk/make/common/Defs-solaris.gmk openjdk/jdk/make/common/Defs-solaris.gmk ---- openjdk.orig/jdk/make/common/Defs-solaris.gmk 2013-09-02 16:42:51.816098963 +0100 -+++ openjdk/jdk/make/common/Defs-solaris.gmk 2013-09-02 16:43:24.332604388 +0100 -@@ -437,14 +437,15 @@ - # On X86, make sure tail call optimization is off - # The z and y are the tail call optimizations. - ifeq ($(ARCH_FAMILY), i586) -- ifeq ($(shell $(EXPR) $(CC_MAJORVER) \>= 5), 1) -- ifeq ($(shell $(EXPR) $(CC_MINORVER) \> 8), 1) -- # Somehow, tail call optimization is creeping in. -- # Make sure it is off. -- # WARNING: These may cause compiler warnings about duplicate -O options -- CC_XKEEPFRAME_OPTIONS += -Wu,-O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz -- CXX_XKEEPFRAME_OPTIONS += -Qoption ube -O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz -- endif -+ CC_NEWER_THAN_58 := \ -+ $(shell $(EXPR) $(CC_MAJORVER) \> 5 \| \ -+ \( $(CC_MAJORVER) = 5 \& $(CC_MINORVER) \> 8 \) ) -+ ifeq ($(CC_NEWER_THAN_58),1) -+ # Somehow, tail call optimization is creeping in. -+ # Make sure it is off. -+ # WARNING: These may cause compiler warnings about duplicate -O options -+ CC_XKEEPFRAME_OPTIONS += -Wu,-O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz -+ CXX_XKEEPFRAME_OPTIONS += -Qoption ube -O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz - endif - endif - -@@ -461,14 +462,15 @@ - CXX_XKEEPFRAME_OPTIONS += -Qoption ube -Z~B - endif - -- ifeq ($(shell $(EXPR) $(CC_MAJORVER) \>= 5), 1) -- ifeq ($(shell $(EXPR) $(CC_MINORVER) \> 6), 1) -- # Do NOT use frame pointer register as a general purpose opt register -- CC_OPT/NONE += -xregs=no%frameptr -- CXX_OPT/NONE += -xregs=no%frameptr -- CC_XKEEPFRAME_OPTIONS += -xregs=no%frameptr -- CXX_XKEEPFRAME_OPTIONS += -xregs=no%frameptr -- endif -+ CC_NEWER_THAN_56 := \ -+ $(shell $(EXPR) $(CC_MAJORVER) \> 5 \| \ -+ \( $(CC_MAJORVER) = 5 \& $(CC_MINORVER) \> 6 \) ) -+ ifeq ($(CC_NEWER_THAN_56),1) -+ # Do NOT use frame pointer register as a general purpose opt register -+ CC_OPT/NONE += -xregs=no%frameptr -+ CXX_OPT/NONE += -xregs=no%frameptr -+ CC_XKEEPFRAME_OPTIONS += -xregs=no%frameptr -+ CXX_XKEEPFRAME_OPTIONS += -xregs=no%frameptr - endif - endif - -@@ -546,8 +548,10 @@ - CFLAGS_REQUIRED_sparc += -xregs=no%appl - CFLAGS_REQUIRED_sparcv9 += -xregs=no%appl - endif -- ifeq ($(shell $(EXPR) $(CC_VER) \> 5.6), 1) -- # We MUST allow data alignment of 4 for sparc V8 (32bit) -+ CC_NEWER_THAN_56 := \ -+ $(shell $(EXPR) $(CC_MAJORVER) \> 5 \| \ -+ \( $(CC_MAJORVER) = 5 \& $(CC_MINORVER) \> 6 \) ) -+ ifeq ($(CC_NEWER_THAN_56),1) - # Presents an ABI issue with customer JNI libs? We must be able to - # to handle 4byte aligned objects? (rare occurance, but possible?) - CFLAGS_REQUIRED_sparc += -xmemalign=4s -diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2013-09-02 16:42:50.872084289 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2013-09-02 16:43:24.332604388 +0100 -@@ -150,6 +150,8 @@ - # Get gcc version - _CC_VER :=$(shell $(CC) -dumpversion 2>&1 ) - CC_VER :=$(call GetVersion,"$(_CC_VER)") -+CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) -+CC_MINORVER :=$(call MinorVersion,$(CC_VER)) - - # Name of compiler - COMPILER_NAME = GCC$(call MajorVersion,$(CC_VER)) -diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk openjdk/jdk/make/common/shared/Compiler-sun.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk 2013-09-02 16:42:51.816098963 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-sun.gmk 2013-09-02 16:44:23.061517244 +0100 -@@ -117,7 +117,10 @@ - LINT_XARCH_OPTION_OLD/64 += -Xarch=amd64 - endif - # Pick the options we want based on the compiler being used. --ifeq ($(shell expr $(CC_VER) \>= 5.9), 1) -+CC_59_OR_NEWER := \ -+ $(shell expr $(CC_MAJORVER) \> 5 \| \ -+ \( $(CC_MAJORVER) = 5 \& $(CC_MINORVER) \>= 9 \) ) -+ifeq ($(CC_59_OR_NEWER), 1) - XARCH_OPTION/32 = $(XARCH_OPTION_NEW/32) - XARCH_OPTION/64 = $(XARCH_OPTION_NEW/64) - LINT_XARCH_OPTION/32 = $(LINT_XARCH_OPTION_NEW/32) -diff -Nru openjdk.orig/jdk/make/sun/jpeg/Makefile openjdk/jdk/make/sun/jpeg/Makefile ---- openjdk.orig/jdk/make/sun/jpeg/Makefile 2013-09-02 16:42:50.804083232 +0100 -+++ openjdk/jdk/make/sun/jpeg/Makefile 2013-09-02 16:44:44.629852492 +0100 -@@ -74,7 +74,14 @@ - # volatile to prevent the optimization. However, this approach does not - # work because we have to declare all variables as volatile in result. - -- OTHER_CFLAGS += -Wno-clobbered -+ ifndef CROSS_COMPILE_ARCH -+ CC_43_OR_NEWER := \ -+ $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \ -+ \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) ) -+ ifeq ($(CC_43_OR_NEWER),1) -+ OTHER_CFLAGS += -Wno-clobbered -+ endif -+ endif - endif - - include $(BUILDDIR)/common/Mapfile-vers.gmk diff -r d247f1787f04 -r 8b26ecee3670 patches/openjdk/7199862-pr2198-ensure_cache_connection_still_alive.patch --- a/patches/openjdk/7199862-pr2198-ensure_cache_connection_still_alive.patch Tue Aug 16 03:15:54 2016 +0100 +++ b/patches/openjdk/7199862-pr2198-ensure_cache_connection_still_alive.patch Wed Aug 17 02:53:46 2016 +0100 @@ -33,7 +33,7 @@ @@ -268,6 +269,12 @@ /* see if one's already around */ if (useCache) { - ret = (HttpClient) kac.get(url, null); + ret = kac.get(url, null); + if (ret != null && httpuc != null && + httpuc.streaming() && + httpuc.getRequestMethod() == "POST") { diff -r d247f1787f04 -r 8b26ecee3670 patches/parisc.patch --- a/patches/parisc.patch Tue Aug 16 03:15:54 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ ---- openjdk/jdk/make/common/shared/Compiler-gcc.gmk.orig 2009-12-19 12:45:34.000000000 +0000 -+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2009-12-19 12:45:09.000000000 +0000 -@@ -106,6 +106,11 @@ - REQUIRED_CC_VER = 3.2 - REQUIRED_GCC_VER = 3.2.* - endif -+ ifneq ("$(findstring parisc,$(ARCH))", "") -+ # mips -+ REQUIRED_CC_VER = 4.4 -+ REQUIRED_GCC_VER = 4.4.* -+ endif - ifneq ("$(findstring ppc,$(ARCH))", "") - # ppc or ppc64 - REQUIRED_CC_VER = 3.2