Compare commits
No commits in common. "c10s" and "c8" have entirely different histories.
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
SOURCES/shenandoah8u442-b06.tar.xz
|
||||
SOURCES/tapsets-icedtea-3.15.0.tar.xz
|
2
.java-1.8.0-openjdk.metadata
Normal file
2
.java-1.8.0-openjdk.metadata
Normal file
@ -0,0 +1,2 @@
|
||||
f5c84eb1dd6c8dba50a2ae89e01ec1d1b4f26fde SOURCES/shenandoah8u442-b06.tar.xz
|
||||
7ae2cba67467825b2c2a5fec7aea041865023002 SOURCES/tapsets-icedtea-3.15.0.tar.xz
|
57
SOURCES/CheckVendor.java
Normal file
57
SOURCES/CheckVendor.java
Normal file
@ -0,0 +1,57 @@
|
||||
/* CheckVendor -- Check the vendor properties match specified values.
|
||||
Copyright (C) 2020 Red Hat, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public class CheckVendor {
|
||||
|
||||
public static void main(String[] args) {
|
||||
if (args.length < 3) {
|
||||
System.err.println("CheckVendor <VENDOR> <VENDOR-URL> <VENDOR-BUG-URL>");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
String vendor = System.getProperty("java.vendor");
|
||||
String expectedVendor = args[0];
|
||||
String vendorURL = System.getProperty("java.vendor.url");
|
||||
String expectedVendorURL = args[1];
|
||||
String vendorBugURL = System.getProperty("java.vendor.url.bug");
|
||||
String expectedVendorBugURL = args[2];
|
||||
|
||||
if (!expectedVendor.equals(vendor)) {
|
||||
System.err.printf("Invalid vendor %s, expected %s\n",
|
||||
vendor, expectedVendor);
|
||||
System.exit(2);
|
||||
}
|
||||
|
||||
if (!expectedVendorURL.equals(vendorURL)) {
|
||||
System.err.printf("Invalid vendor URL %s, expected %s\n",
|
||||
vendorURL, expectedVendorURL);
|
||||
System.exit(3);
|
||||
}
|
||||
|
||||
if (!expectedVendorBugURL.equals(vendorBugURL)) {
|
||||
System.err.printf("Invalid vendor bug URL%s, expected %s\n",
|
||||
vendorBugURL, expectedVendorBugURL);
|
||||
System.exit(4);
|
||||
}
|
||||
|
||||
System.err.printf("Vendor information verified as %s, %s, %s\n",
|
||||
vendor, vendorURL, vendorBugURL);
|
||||
}
|
||||
}
|
3336
SOURCES/NEWS
Normal file
3336
SOURCES/NEWS
Normal file
File diff suppressed because it is too large
Load Diff
34
SOURCES/README.md
Normal file
34
SOURCES/README.md
Normal file
@ -0,0 +1,34 @@
|
||||
OpenJDK 8 is a Long-Term Support (LTS) release of the Java platform.
|
||||
|
||||
For a list of major changes in OpenJDK 8 (java-1.8.0-openjdk), see the
|
||||
upstream release page: https://openjdk.org/projects/jdk8/features
|
||||
|
||||
# Rebuilding the OpenJDK package
|
||||
|
||||
The OpenJDK packages are now created from a single build which is then
|
||||
packaged for different major versions of Red Hat Enterprise Linux
|
||||
(RHEL). This allows the OpenJDK team to focus their efforts on the
|
||||
development and testing of this single build, rather than having
|
||||
multiple builds which only differ by the platform they were built on.
|
||||
|
||||
This does make rebuilding the package slightly more complicated than a
|
||||
normal package. Modifications should be made to the
|
||||
`java-1.8.0-openjdk-portable.specfile` file, which can be found with
|
||||
this README file in the source RPM or installed in the documentation
|
||||
tree by the `java-1.8.0-openjdk-headless` RPM.
|
||||
|
||||
Once the modified `java-1.8.0-openjdk-portable` RPMs are built, they
|
||||
should be installed and will produce a number of tarballs in the
|
||||
`/usr/lib/jvm` directory. The `java-1.8.0-openjdk` RPMs can then be
|
||||
built, which will use these tarballs to create the usual RPMs found in
|
||||
RHEL. The `java-1.8.0-openjdk-portable` RPMs can be uninstalled once
|
||||
the desired final RPMs are produced.
|
||||
|
||||
Note that the `java-1.8.0-openjdk.spec` file has a hard requirement on
|
||||
the exact version of java-1.8.0-openjdk-portable to use, so this will
|
||||
need to be modified if the version or rpmrelease values are changed in
|
||||
`java-1.8.0-openjdk-portable.specfile`.
|
||||
|
||||
To reduce the number of RPMs involved, the `fastdebug` and `slowdebug`
|
||||
builds may be disabled using `--without fastdebug` and `--without
|
||||
slowdebug`.
|
72
SOURCES/TestCryptoLevel.java
Normal file
72
SOURCES/TestCryptoLevel.java
Normal file
@ -0,0 +1,72 @@
|
||||
/* TestCryptoLevel -- Ensure unlimited crypto policy is in use.
|
||||
Copyright (C) 2012 Red Hat, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import java.security.Permission;
|
||||
import java.security.PermissionCollection;
|
||||
|
||||
public class TestCryptoLevel
|
||||
{
|
||||
public static void main(String[] args)
|
||||
throws NoSuchFieldException, ClassNotFoundException,
|
||||
IllegalAccessException, InvocationTargetException
|
||||
{
|
||||
Class<?> cls = null;
|
||||
Method def = null, exempt = null;
|
||||
|
||||
try
|
||||
{
|
||||
cls = Class.forName("javax.crypto.JceSecurity");
|
||||
}
|
||||
catch (ClassNotFoundException ex)
|
||||
{
|
||||
System.err.println("Running a non-Sun JDK.");
|
||||
System.exit(0);
|
||||
}
|
||||
try
|
||||
{
|
||||
def = cls.getDeclaredMethod("getDefaultPolicy");
|
||||
exempt = cls.getDeclaredMethod("getExemptPolicy");
|
||||
}
|
||||
catch (NoSuchMethodException ex)
|
||||
{
|
||||
System.err.println("Running IcedTea with the original crypto patch.");
|
||||
System.exit(0);
|
||||
}
|
||||
def.setAccessible(true);
|
||||
exempt.setAccessible(true);
|
||||
PermissionCollection defPerms = (PermissionCollection) def.invoke(null);
|
||||
PermissionCollection exemptPerms = (PermissionCollection) exempt.invoke(null);
|
||||
Class<?> apCls = Class.forName("javax.crypto.CryptoAllPermission");
|
||||
Field apField = apCls.getDeclaredField("INSTANCE");
|
||||
apField.setAccessible(true);
|
||||
Permission allPerms = (Permission) apField.get(null);
|
||||
if (defPerms.implies(allPerms) && (exemptPerms == null || exemptPerms.implies(allPerms)))
|
||||
{
|
||||
System.err.println("Running with the unlimited policy.");
|
||||
System.exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
System.err.println("WARNING: Running with a restricted crypto policy.");
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
49
SOURCES/TestECDSA.java
Normal file
49
SOURCES/TestECDSA.java
Normal file
@ -0,0 +1,49 @@
|
||||
/* TestECDSA -- Ensure ECDSA signatures are working.
|
||||
Copyright (C) 2016 Red Hat, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.security.KeyPair;
|
||||
import java.security.KeyPairGenerator;
|
||||
import java.security.Signature;
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public class TestECDSA {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("EC");
|
||||
KeyPair key = keyGen.generateKeyPair();
|
||||
|
||||
byte[] data = "This is a string to sign".getBytes("UTF-8");
|
||||
|
||||
Signature dsa = Signature.getInstance("NONEwithECDSA");
|
||||
dsa.initSign(key.getPrivate());
|
||||
dsa.update(data);
|
||||
byte[] sig = dsa.sign();
|
||||
System.out.println("Signature: " + new BigInteger(1, sig).toString(16));
|
||||
|
||||
Signature dsaCheck = Signature.getInstance("NONEwithECDSA");
|
||||
dsaCheck.initVerify(key.getPublic());
|
||||
dsaCheck.update(data);
|
||||
boolean success = dsaCheck.verify(sig);
|
||||
if (!success) {
|
||||
throw new RuntimeException("Test failed. Signature verification error");
|
||||
}
|
||||
System.out.println("Test passed.");
|
||||
}
|
||||
}
|
84
SOURCES/TestSecurityProperties.java
Normal file
84
SOURCES/TestSecurityProperties.java
Normal file
@ -0,0 +1,84 @@
|
||||
/* TestSecurityProperties -- Ensure system security properties can be used to
|
||||
enable the crypto policies.
|
||||
Copyright (C) 2022 Red Hat, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.security.Security;
|
||||
import java.util.Properties;
|
||||
|
||||
public class TestSecurityProperties {
|
||||
// JDK 11
|
||||
private static final String JDK_PROPS_FILE_JDK_11 = System.getProperty("java.home") + "/conf/security/java.security";
|
||||
// JDK 8
|
||||
private static final String JDK_PROPS_FILE_JDK_8 = System.getProperty("java.home") + "/lib/security/java.security";
|
||||
|
||||
private static final String POLICY_FILE = "/etc/crypto-policies/back-ends/java.config";
|
||||
|
||||
private static final String MSG_PREFIX = "DEBUG: ";
|
||||
|
||||
public static void main(String[] args) {
|
||||
if (args.length == 0) {
|
||||
System.err.println("TestSecurityProperties <true|false>");
|
||||
System.err.println("Invoke with 'true' if system security properties should be enabled.");
|
||||
System.err.println("Invoke with 'false' if system security properties should be disabled.");
|
||||
System.exit(1);
|
||||
}
|
||||
boolean enabled = Boolean.valueOf(args[0]);
|
||||
System.out.println(MSG_PREFIX + "System security properties enabled: " + enabled);
|
||||
Properties jdkProps = new Properties();
|
||||
loadProperties(jdkProps);
|
||||
if (enabled) {
|
||||
loadPolicy(jdkProps);
|
||||
}
|
||||
for (Object key: jdkProps.keySet()) {
|
||||
String sKey = (String)key;
|
||||
String securityVal = Security.getProperty(sKey);
|
||||
String jdkSecVal = jdkProps.getProperty(sKey);
|
||||
if (!securityVal.equals(jdkSecVal)) {
|
||||
String msg = "Expected value '" + jdkSecVal + "' for key '" +
|
||||
sKey + "'" + " but got value '" + securityVal + "'";
|
||||
throw new RuntimeException("Test failed! " + msg);
|
||||
} else {
|
||||
System.out.println(MSG_PREFIX + sKey + " = " + jdkSecVal + " as expected.");
|
||||
}
|
||||
}
|
||||
System.out.println("TestSecurityProperties PASSED!");
|
||||
}
|
||||
|
||||
private static void loadProperties(Properties props) {
|
||||
String javaVersion = System.getProperty("java.version");
|
||||
System.out.println(MSG_PREFIX + "Java version is " + javaVersion);
|
||||
String propsFile = JDK_PROPS_FILE_JDK_11;
|
||||
if (javaVersion.startsWith("1.8.0")) {
|
||||
propsFile = JDK_PROPS_FILE_JDK_8;
|
||||
}
|
||||
try (FileInputStream fin = new FileInputStream(propsFile)) {
|
||||
props.load(fin);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Test failed!", e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadPolicy(Properties props) {
|
||||
try (FileInputStream fin = new FileInputStream(POLICY_FILE)) {
|
||||
props.load(fin);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Test failed!", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
160
SOURCES/TestTranslations.java
Normal file
160
SOURCES/TestTranslations.java
Normal file
@ -0,0 +1,160 @@
|
||||
/* TestTranslations -- Ensure translations are available for new timezones
|
||||
Copyright (C) 2022 Red Hat, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import java.text.DateFormatSymbols;
|
||||
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.TextStyle;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.TimeZone;
|
||||
|
||||
public class TestTranslations {
|
||||
|
||||
private static Map<Locale,String[]> KYIV, CIUDAD_JUAREZ;
|
||||
|
||||
static {
|
||||
Map<Locale,String[]> map = new HashMap<Locale,String[]>();
|
||||
map.put(Locale.US, new String[] { "Eastern European Time", "GMT+02:00", "EET",
|
||||
"Eastern European Summer Time", "GMT+03:00", "EEST",
|
||||
"Eastern European Time", "GMT+02:00", "EET"});
|
||||
map.put(Locale.FRANCE, new String[] { "Heure d'Europe de l'Est", "UTC+02:00", "EET",
|
||||
"Heure d'\u00e9t\u00e9 d'Europe de l'Est", "UTC+03:00", "EEST",
|
||||
"Heure d'Europe de l'Est", "UTC+02:00", "EET"});
|
||||
map.put(Locale.GERMANY, new String[] { "Osteurop\u00e4ische Zeit", "OEZ", "OEZ",
|
||||
"Osteurop\u00e4ische Sommerzeit", "OESZ", "OESZ",
|
||||
"Osteurop\u00e4ische Zeit", "OEZ", "OEZ"});
|
||||
KYIV = Collections.unmodifiableMap(map);
|
||||
|
||||
map = new HashMap<Locale,String[]>();
|
||||
map.put(Locale.US, new String[] { "Mountain Standard Time", "MST", "MST",
|
||||
"Mountain Daylight Time", "MDT", "MDT",
|
||||
"Mountain Time", "MT", "MT"});
|
||||
map.put(Locale.FRANCE, new String[] { "Heure normale des Rocheuses", "UTC\u221207:00", "MST",
|
||||
"Heure avanc\u00e9e des Rocheuses", "UTC\u221206:00", "MDT",
|
||||
"Rocheuses", "UTC\u221207:00", "MT"});
|
||||
map.put(Locale.GERMANY, new String[] { "Rocky Mountains Normalzeit", "GMT-07:00", "MST",
|
||||
"Rocky Mountains Sommerzeit", "GMT-06:00", "MDT",
|
||||
"Zeitzone Mountain", "GMT-07:00", "MT"});
|
||||
CIUDAD_JUAREZ = Collections.unmodifiableMap(map);
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
if (args.length < 1) {
|
||||
System.err.println("Test must be started with the name of the locale provider.");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
System.out.println("Checking sanity of full zone string set...");
|
||||
boolean invalid = Arrays.stream(Locale.getAvailableLocales())
|
||||
.peek(l -> System.out.println("Locale: " + l))
|
||||
.map(l -> DateFormatSymbols.getInstance(l).getZoneStrings())
|
||||
.flatMap(zs -> Arrays.stream(zs))
|
||||
.flatMap(names -> Arrays.stream(names))
|
||||
.filter(name -> Objects.isNull(name) || name.isEmpty())
|
||||
.findAny()
|
||||
.isPresent();
|
||||
if (invalid) {
|
||||
System.err.println("Zone string for a locale returned null or empty string");
|
||||
System.exit(2);
|
||||
}
|
||||
|
||||
String localeProvider = args[0];
|
||||
testZone(localeProvider, KYIV,
|
||||
new String[] { "Europe/Kiev", "Europe/Kyiv", "Europe/Uzhgorod", "Europe/Zaporozhye" });
|
||||
testZone(localeProvider, CIUDAD_JUAREZ,
|
||||
new String[] { "America/Cambridge_Bay", "America/Ciudad_Juarez" });
|
||||
}
|
||||
|
||||
private static void testZone(String localeProvider, Map<Locale,String[]> exp, String[] ids) {
|
||||
for (Locale l : exp.keySet()) {
|
||||
String[] expected = exp.get(l);
|
||||
System.out.printf("Expected values for %s are %s\n", l, Arrays.toString(expected));
|
||||
for (String id : ids) {
|
||||
String expectedShortStd = null;
|
||||
String expectedShortDST = null;
|
||||
String expectedShortGen = null;
|
||||
|
||||
System.out.printf("Checking locale %s for %s...\n", l, id);
|
||||
|
||||
if ("JRE".equals(localeProvider)) {
|
||||
expectedShortStd = expected[2];
|
||||
expectedShortDST = expected[5];
|
||||
expectedShortGen = expected[8];
|
||||
} else if ("CLDR".equals(localeProvider)) {
|
||||
expectedShortStd = expected[1];
|
||||
expectedShortDST = expected[4];
|
||||
expectedShortGen = expected[7];
|
||||
} else {
|
||||
System.err.printf("Invalid locale provider %s\n", localeProvider);
|
||||
System.exit(3);
|
||||
}
|
||||
System.out.printf("Locale Provider is %s, using short values %s, %s and %s\n",
|
||||
localeProvider, expectedShortStd, expectedShortDST, expectedShortGen);
|
||||
|
||||
String longStd = TimeZone.getTimeZone(id).getDisplayName(false, TimeZone.LONG, l);
|
||||
String shortStd = TimeZone.getTimeZone(id).getDisplayName(false, TimeZone.SHORT, l);
|
||||
String longDST = TimeZone.getTimeZone(id).getDisplayName(true, TimeZone.LONG, l);
|
||||
String shortDST = TimeZone.getTimeZone(id).getDisplayName(true, TimeZone.SHORT, l);
|
||||
String longGen = ZoneId.of(id).getDisplayName(TextStyle.FULL, l);
|
||||
String shortGen = ZoneId.of(id).getDisplayName(TextStyle.SHORT, l);
|
||||
|
||||
if (!expected[0].equals(longStd)) {
|
||||
System.err.printf("Long standard display name for %s in %s was %s, expected %s\n",
|
||||
id, l, longStd, expected[0]);
|
||||
System.exit(4);
|
||||
}
|
||||
|
||||
if (!expectedShortStd.equals(shortStd)) {
|
||||
System.err.printf("Short standard display name for %s in %s was %s, expected %s\n",
|
||||
id, l, shortStd, expectedShortStd);
|
||||
System.exit(5);
|
||||
}
|
||||
|
||||
if (!expected[3].equals(longDST)) {
|
||||
System.err.printf("Long DST display name for %s in %s was %s, expected %s\n",
|
||||
id, l, longDST, expected[3]);
|
||||
System.exit(6);
|
||||
}
|
||||
|
||||
if (!expectedShortDST.equals(shortDST)) {
|
||||
System.err.printf("Short DST display name for %s in %s was %s, expected %s\n",
|
||||
id, l, shortDST, expectedShortDST);
|
||||
System.exit(7);
|
||||
}
|
||||
|
||||
if (!expected[6].equals(longGen)) {
|
||||
System.err.printf("Long generic display name for %s in %s was %s, expected %s\n",
|
||||
id, l, longGen, expected[6]);
|
||||
System.exit(8);
|
||||
}
|
||||
|
||||
if (!expectedShortGen.equals(shortGen)) {
|
||||
System.err.printf("Short generic display name for %s in %s was %s, expected %s\n",
|
||||
id, l, shortGen, expectedShortGen);
|
||||
System.exit(9);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1558
SOURCES/config.guess
vendored
Normal file
1558
SOURCES/config.guess
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1788
SOURCES/config.sub
vendored
Normal file
1788
SOURCES/config.sub
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1954
SOURCES/fips-8u-6d1aade0648.patch
Normal file
1954
SOURCES/fips-8u-6d1aade0648.patch
Normal file
File diff suppressed because it is too large
Load Diff
2607
SOURCES/java-1.8.0-openjdk-portable.specfile
Normal file
2607
SOURCES/java-1.8.0-openjdk-portable.specfile
Normal file
File diff suppressed because it is too large
Load Diff
10
SOURCES/jconsole.desktop.in
Normal file
10
SOURCES/jconsole.desktop.in
Normal file
@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Name=OpenJDK @JAVA_VER@ for @target_cpu@ Monitoring & Management Console (@OPENJDK_VER@)
|
||||
Comment=Monitor and manage OpenJDK applications
|
||||
Exec=_SDKBINDIR_/jconsole
|
||||
Icon=java-@JAVA_VER@-@JAVA_VENDOR@
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupWMClass=sun-tools-jconsole-JConsole
|
||||
Categories=Development;Profiling;Java;
|
||||
Version=1.0
|
115
SOURCES/jdk8035341-allow_using_system_installed_libpng.patch
Normal file
115
SOURCES/jdk8035341-allow_using_system_installed_libpng.patch
Normal file
@ -0,0 +1,115 @@
|
||||
diff -ruN jdk8/common/autoconf/libraries.m4 jdk8/common/autoconf/libraries.m4
|
||||
--- jdk8/common/autoconf/libraries.m4 2013-11-14 20:08:01.845065585 -0500
|
||||
+++ jdk8/common/autoconf/libraries.m4 2013-11-14 20:10:56.186553066 -0500
|
||||
@@ -676,6 +676,47 @@
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
+ # Check for the png library
|
||||
+ #
|
||||
+
|
||||
+ AC_ARG_WITH(libpng, [AS_HELP_STRING([--with-libpng],
|
||||
+ [use libpng from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
|
||||
+
|
||||
+ AC_CHECK_LIB(png, png_sig_cmp,
|
||||
+ [ LIBPNG_FOUND=yes ],
|
||||
+ [ LIBPNG_FOUND=no ])
|
||||
+
|
||||
+ AC_MSG_CHECKING([for which libpng to use])
|
||||
+
|
||||
+ # default is bundled
|
||||
+ DEFAULT_LIBPNG=bundled
|
||||
+
|
||||
+ #
|
||||
+ # if user didn't specify, use DEFAULT_LIBPNG
|
||||
+ #
|
||||
+ if test "x${with_libpng}" = "x"; then
|
||||
+ with_libpng=${DEFAULT_libpng}
|
||||
+ fi
|
||||
+
|
||||
+
|
||||
+ if test "x${with_libpng}" = "xbundled"; then
|
||||
+ USE_EXTERNAL_LIBPNG=false
|
||||
+ AC_MSG_RESULT([bundled])
|
||||
+ elif test "x${with_libpng}" = "xsystem"; then
|
||||
+ if test "x${LIBPNG_FOUND}" = "xyes"; then
|
||||
+ USE_EXTERNAL_LIBPNG=true
|
||||
+ AC_MSG_RESULT([system])
|
||||
+ else
|
||||
+ AC_MSG_RESULT([system not found])
|
||||
+ AC_MSG_ERROR([--with-libpng=system specified, but no libpng found!])
|
||||
+ fi
|
||||
+ else
|
||||
+ AC_MSG_ERROR([Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'])
|
||||
+ fi
|
||||
+ AC_SUBST(USE_EXTERNAL_LIBPNG)
|
||||
+
|
||||
+ ###############################################################################
|
||||
+ #
|
||||
# Check for the zlib library
|
||||
#
|
||||
|
||||
diff -ruN jdk8/common/autoconf/spec.gmk.in jdk8/common/autoconf/spec.gmk.in
|
||||
--- jdk8/common/autoconf/spec.gmk.in 2013-10-31 19:24:33.000000000 -0400
|
||||
+++ jdk8/common/autoconf/spec.gmk.in 2013-11-14 21:10:56.365976518 -0500
|
||||
@@ -548,6 +548,7 @@
|
||||
ENABLE_JFR=@ENABLE_JFR@
|
||||
ENABLE_INTREE_EC=@ENABLE_INTREE_EC@
|
||||
USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
|
||||
+USE_EXTERNAL_LIBPNG:=@USE_EXTERNAL_LIBPNG@
|
||||
USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
|
||||
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
|
||||
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
|
||||
diff -ruN jdk8/jdk/make/lib/Awt2dLibraries.gmk jdk8/jdk/make/lib/Awt2dLibraries.gmk
|
||||
--- jdk8/jdk/make/lib/Awt2dLibraries.gmk 2013-11-14 20:08:01.845065585 -0500
|
||||
+++ jdk8/jdk/make/lib/Awt2dLibraries.gmk 2013-11-14 20:14:10.791982343 -0500
|
||||
@@ -1183,7 +1183,6 @@
|
||||
|
||||
ifndef BUILD_HEADLESS_ONLY
|
||||
LIBSPLASHSCREEN_DIRS := \
|
||||
- $(JDK_TOPDIR)/src/share/native/sun/awt/libpng \
|
||||
$(JDK_TOPDIR)/src/share/native/sun/awt/splashscreen
|
||||
|
||||
ifeq ($(USE_EXTERNAL_LIBGIF), true)
|
||||
@@ -1200,6 +1199,13 @@
|
||||
LIBJPEG_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/jpeg
|
||||
endif
|
||||
|
||||
+ ifeq ($(USE_EXTERNAL_LIBPNG), true)
|
||||
+ LIBPNG_LDFLAGS := -lpng
|
||||
+ else
|
||||
+ LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/image/libpng
|
||||
+ LIBPNG_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/libpng
|
||||
+ endif
|
||||
+
|
||||
ifneq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
|
||||
else
|
||||
@@ -1263,12 +1269,12 @@
|
||||
LANG := C, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
|
||||
- $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS), \
|
||||
+ $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(LIBPNG_CFLAGS), \
|
||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) \
|
||||
- $(LIBZ) $(GIFLIB_LDFLAGS) $(LIBJPEG_LDFLAGS), \
|
||||
+ $(LIBZ) $(GIFLIB_LDFLAGS) $(LIBJPEG_LDFLAGS) $(LIBPNG_LDFLAGS), \
|
||||
LDFLAGS_SUFFIX_solaris := -lc, \
|
||||
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
|
||||
RC_FLAGS := $(RC_FLAGS) \
|
||||
diff -ruN jdk8/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c jdk8/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c
|
||||
--- jdk8/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c 2013-10-31 19:44:18.000000000 -0400
|
||||
+++ jdk8/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c 2013-11-14 20:14:41.363892797 -0500
|
||||
@@ -25,8 +25,7 @@
|
||||
|
||||
#include "splashscreen_impl.h"
|
||||
|
||||
-#include "../libpng/png.h"
|
||||
-
|
||||
+#include <png.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#define SIG_BYTES 8
|
51
SOURCES/jdk8141590-bundle_libffi-followup.patch
Normal file
51
SOURCES/jdk8141590-bundle_libffi-followup.patch
Normal file
@ -0,0 +1,51 @@
|
||||
commit 928f3bf4a3017931ecc7012688e62d8a03264e61
|
||||
Author: Andrew Hughes <gnu.andrew@redhat.com>
|
||||
AuthorDate: Thu Jan 16 17:40:36 2025 +0000
|
||||
Commit: Andrew Hughes <gnu.andrew@redhat.com>
|
||||
CommitDate: Thu Jan 16 22:50:24 2025 +0000
|
||||
|
||||
Search /usr/lib64 on architectures other than x86_64
|
||||
|
||||
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
|
||||
index 587b4c2657..5aeebe49a3 100644
|
||||
--- a/common/autoconf/generated-configure.sh
|
||||
+++ b/common/autoconf/generated-configure.sh
|
||||
@@ -4493,7 +4493,7 @@ VS_TOOLSET_SUPPORTED_2022=true
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
-DATE_WHEN_GENERATED=1737049912
|
||||
+DATE_WHEN_GENERATED=1737067804
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@@ -50590,9 +50590,11 @@ $as_echo_n "checking for libffi lib file location... " >&6; }
|
||||
as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
- # Fallback on the default /usr/lib dir
|
||||
+ # Fallback on the default /usr/lib and /usr/lib64 dirs
|
||||
if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
|
||||
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
|
||||
+ elif test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
|
||||
+ LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
|
||||
else
|
||||
as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
|
||||
fi
|
||||
diff --git a/common/autoconf/libraries.m4 b/common/autoconf/libraries.m4
|
||||
index 4ed8b4fdd6..6ab6dbc075 100644
|
||||
--- a/common/autoconf/libraries.m4
|
||||
+++ b/common/autoconf/libraries.m4
|
||||
@@ -1121,9 +1121,11 @@ AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
|
||||
AC_MSG_ERROR([Could not locate libffi.so.? for bundling])
|
||||
fi
|
||||
else
|
||||
- # Fallback on the default /usr/lib dir
|
||||
+ # Fallback on the default /usr/lib and /usr/lib64 dirs
|
||||
if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
|
||||
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
|
||||
+ elif test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
|
||||
+ LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
|
||||
else
|
||||
AC_MSG_ERROR([Could not locate libffi.so.? for bundling])
|
||||
fi
|
763
SOURCES/jdk8141590-bundle_libffi.patch
Normal file
763
SOURCES/jdk8141590-bundle_libffi.patch
Normal file
@ -0,0 +1,763 @@
|
||||
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
|
||||
index ad3f7f232e..587b4c2657 100644
|
||||
--- a/common/autoconf/generated-configure.sh
|
||||
+++ b/common/autoconf/generated-configure.sh
|
||||
@@ -649,6 +649,9 @@ LLVM_LIBS
|
||||
LLVM_LDFLAGS
|
||||
LLVM_CFLAGS
|
||||
LLVM_CONFIG
|
||||
+LIBFFI_LIB_FILE
|
||||
+LIBFFI_LIB_DIR
|
||||
+ENABLE_LIBFFI_BUNDLING
|
||||
LIBFFI_LIBS
|
||||
LIBFFI_CFLAGS
|
||||
STATIC_CXX_SETTING
|
||||
@@ -1117,6 +1120,10 @@ with_fontconfig_include
|
||||
with_giflib
|
||||
with_zlib
|
||||
with_stdc__lib
|
||||
+with_libffi
|
||||
+with_libffi_include
|
||||
+with_libffi_lib
|
||||
+enable_libffi_bundling
|
||||
with_msvcr_dll
|
||||
with_msvcp_dll
|
||||
with_vcruntime_1_dll
|
||||
@@ -1867,6 +1874,9 @@ Optional Features:
|
||||
disable bundling of the freetype library with the
|
||||
build result [enabled on Windows or when using
|
||||
--with-freetype, disabled otherwise]
|
||||
+ --enable-libffi-bundling
|
||||
+ enable bundling of libffi.so to make the built JDK
|
||||
+ runnable on more systems
|
||||
--enable-sjavac use sjavac to do fast incremental compiles
|
||||
[disabled]
|
||||
--disable-precompiled-headers
|
||||
@@ -1996,6 +2006,11 @@ Optional Packages:
|
||||
force linking of the C++ runtime on Linux to either
|
||||
static or dynamic, default is static with dynamic as
|
||||
fallback
|
||||
+ --with-libffi specify prefix directory for the libffi package
|
||||
+ (expecting the libraries under PATH/lib and the
|
||||
+ headers under PATH/include)
|
||||
+ --with-libffi-include specify directory for the libffi include files
|
||||
+ --with-libffi-lib specify directory for the libffi library
|
||||
--with-msvcr-dll path to microsoft C runtime dll (msvcr*.dll)
|
||||
(Windows only) [probed]
|
||||
--with-msvcp-dll path to microsoft C++ runtime dll (msvcp*.dll)
|
||||
@@ -2878,6 +2893,52 @@ $as_echo "$ac_res" >&6; }
|
||||
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
|
||||
} # ac_fn_c_check_header_compile
|
||||
+
|
||||
+# ac_fn_c_try_link LINENO
|
||||
+# -----------------------
|
||||
+# Try to link conftest.$ac_ext, and return whether this succeeded.
|
||||
+ac_fn_c_try_link ()
|
||||
+{
|
||||
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
|
||||
+ rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
+ if { { ac_try="$ac_link"
|
||||
+case "(($ac_try" in
|
||||
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
+ *) ac_try_echo=$ac_try;;
|
||||
+esac
|
||||
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
|
||||
+$as_echo "$ac_try_echo"; } >&5
|
||||
+ (eval "$ac_link") 2>conftest.err
|
||||
+ ac_status=$?
|
||||
+ if test -s conftest.err; then
|
||||
+ grep -v '^ *+' conftest.err >conftest.er1
|
||||
+ cat conftest.er1 >&5
|
||||
+ mv -f conftest.er1 conftest.err
|
||||
+ fi
|
||||
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
+ test $ac_status = 0; } && {
|
||||
+ test -z "$ac_c_werror_flag" ||
|
||||
+ test ! -s conftest.err
|
||||
+ } && test -s conftest$ac_exeext && {
|
||||
+ test "$cross_compiling" = yes ||
|
||||
+ test -x conftest$ac_exeext
|
||||
+ }; then :
|
||||
+ ac_retval=0
|
||||
+else
|
||||
+ $as_echo "$as_me: failed program was:" >&5
|
||||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||||
+
|
||||
+ ac_retval=1
|
||||
+fi
|
||||
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
|
||||
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
|
||||
+ # interfere with the next link command; also delete a directory that is
|
||||
+ # left behind by Apple's compiler. We do this before executing the actions.
|
||||
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
|
||||
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
|
||||
+ as_fn_set_status $ac_retval
|
||||
+
|
||||
+} # ac_fn_c_try_link
|
||||
cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
@@ -4432,7 +4493,7 @@ VS_TOOLSET_SUPPORTED_2022=true
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
-DATE_WHEN_GENERATED=1716396030
|
||||
+DATE_WHEN_GENERATED=1737049912
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@@ -50215,8 +50276,70 @@ $as_echo "static" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
+
|
||||
+# Check whether --with-libffi was given.
|
||||
+if test "${with_libffi+set}" = set; then :
|
||||
+ withval=$with_libffi;
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+# Check whether --with-libffi-include was given.
|
||||
+if test "${with_libffi_include+set}" = set; then :
|
||||
+ withval=$with_libffi_include;
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+# Check whether --with-libffi-lib was given.
|
||||
+if test "${with_libffi_lib+set}" = set; then :
|
||||
+ withval=$with_libffi_lib;
|
||||
+fi
|
||||
+
|
||||
+ # Check whether --enable-libffi-bundling was given.
|
||||
+if test "${enable_libffi_bundling+set}" = set; then :
|
||||
+ enableval=$enable_libffi_bundling;
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+ # Check if ffi is needed
|
||||
if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
|
||||
- # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
|
||||
+ NEEDS_LIB_FFI=true
|
||||
+ else
|
||||
+ NEEDS_LIB_FFI=false
|
||||
+ fi
|
||||
+
|
||||
+ if test "x$NEEDS_LIB_FFI" = xfalse; then
|
||||
+ if test "x${with_libffi}" != x || test "x${with_libffi_include}" != x || test "x${with_libffi_lib}" != x; then
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi is ignored" >&5
|
||||
+$as_echo "$as_me: WARNING: libffi not used, so --with-libffi is ignored" >&2;}
|
||||
+ fi
|
||||
+ LIBFFI_CFLAGS=
|
||||
+ LIBFFI_LIBS=
|
||||
+ else
|
||||
+ LIBFFI_FOUND=no
|
||||
+
|
||||
+ if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
|
||||
+ as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
|
||||
+ fi
|
||||
+
|
||||
+ if test "x${with_libffi}" != x; then
|
||||
+ LIBFFI_LIB_PATH="${with_libffi}/lib"
|
||||
+ LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
|
||||
+ LIBFFI_CFLAGS="-I${with_libffi}/include"
|
||||
+ LIBFFI_FOUND=yes
|
||||
+ fi
|
||||
+ if test "x${with_libffi_include}" != x; then
|
||||
+ LIBFFI_CFLAGS="-I${with_libffi_include}"
|
||||
+ LIBFFI_FOUND=yes
|
||||
+ fi
|
||||
+ if test "x${with_libffi_lib}" != x; then
|
||||
+ LIBFFI_LIB_PATH="${with_libffi_lib}"
|
||||
+ LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
|
||||
+ LIBFFI_FOUND=yes
|
||||
+ fi
|
||||
+ # Do not try pkg-config if we have a sysroot set.
|
||||
+ if test "x$SYSROOT" = x; then
|
||||
+ if test "x$LIBFFI_FOUND" = xno; then
|
||||
+ # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
|
||||
@@ -50272,40 +50395,224 @@ fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$LIBFFI_PKG_ERRORS" >&5
|
||||
|
||||
- as_fn_error $? "Package requirements (libffi) were not met:
|
||||
-
|
||||
-$LIBFFI_PKG_ERRORS
|
||||
-
|
||||
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
-installed software in a non-standard prefix.
|
||||
-
|
||||
-Alternatively, you may set the environment variables LIBFFI_CFLAGS
|
||||
-and LIBFFI_LIBS to avoid the need to call pkg-config.
|
||||
-See the pkg-config man page for more details.
|
||||
-" "$LINENO" 5
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
+$as_echo "no" >&6; }
|
||||
+ LIBFFI_FOUND=no
|
||||
elif test $pkg_failed = untried; then
|
||||
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
-as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
|
||||
-is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
-path to pkg-config.
|
||||
-
|
||||
-Alternatively, you may set the environment variables LIBFFI_CFLAGS
|
||||
-and LIBFFI_LIBS to avoid the need to call pkg-config.
|
||||
-See the pkg-config man page for more details.
|
||||
-
|
||||
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
|
||||
-See \`config.log' for more details" "$LINENO" 5; }
|
||||
+ LIBFFI_FOUND=no
|
||||
else
|
||||
LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
|
||||
LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
- :
|
||||
+ LIBFFI_FOUND=yes
|
||||
+fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ if test "x$LIBFFI_FOUND" = xno; then
|
||||
+ for ac_header in ffi.h
|
||||
+do :
|
||||
+ ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
|
||||
+if test "x$ac_cv_header_ffi_h" = xyes; then :
|
||||
+ cat >>confdefs.h <<_ACEOF
|
||||
+#define HAVE_FFI_H 1
|
||||
+_ACEOF
|
||||
+
|
||||
+ LIBFFI_FOUND=yes
|
||||
+ LIBFFI_CFLAGS=
|
||||
+ LIBFFI_LIBS=-lffi
|
||||
+
|
||||
+else
|
||||
+ LIBFFI_FOUND=no
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+done
|
||||
+
|
||||
+ fi
|
||||
+ if test "x$LIBFFI_FOUND" = xno; then
|
||||
+
|
||||
+ # Print a helpful message on how to acquire the necessary build dependency.
|
||||
+ # ffi is the help tag: freetype, cups, pulse, alsa etc
|
||||
+ MISSING_DEPENDENCY=ffi
|
||||
+
|
||||
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
+ cygwin_help $MISSING_DEPENDENCY
|
||||
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
+ msys_help $MISSING_DEPENDENCY
|
||||
+ else
|
||||
+ PKGHANDLER_COMMAND=
|
||||
+
|
||||
+ case $PKGHANDLER in
|
||||
+ apt-get)
|
||||
+ apt_help $MISSING_DEPENDENCY ;;
|
||||
+ yum)
|
||||
+ yum_help $MISSING_DEPENDENCY ;;
|
||||
+ port)
|
||||
+ port_help $MISSING_DEPENDENCY ;;
|
||||
+ pkgutil)
|
||||
+ pkgutil_help $MISSING_DEPENDENCY ;;
|
||||
+ pkgadd)
|
||||
+ pkgadd_help $MISSING_DEPENDENCY ;;
|
||||
+ esac
|
||||
+
|
||||
+ if test "x$PKGHANDLER_COMMAND" != x; then
|
||||
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
+ as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
|
||||
+ fi
|
||||
+
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
|
||||
+$as_echo_n "checking if libffi works... " >&6; }
|
||||
+ ac_ext=c
|
||||
+ac_cpp='$CPP $CPPFLAGS'
|
||||
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
+
|
||||
+ OLD_CFLAGS="$CFLAGS"
|
||||
+ CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
|
||||
+ OLD_LIBS="$LIBS"
|
||||
+ LIBS="$LIBS $LIBFFI_LIBS"
|
||||
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+#include <ffi.h>
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+
|
||||
+ ffi_call(NULL, NULL, NULL, NULL);
|
||||
+ return 0;
|
||||
+
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+if ac_fn_c_try_link "$LINENO"; then :
|
||||
+ LIBFFI_WORKS=yes
|
||||
+else
|
||||
+ LIBFFI_WORKS=no
|
||||
+
|
||||
fi
|
||||
+rm -f core conftest.err conftest.$ac_objext \
|
||||
+ conftest$ac_exeext conftest.$ac_ext
|
||||
+ CFLAGS="$OLD_CFLAGS"
|
||||
+ LIBS="$OLD_LIBS"
|
||||
+ ac_ext=cpp
|
||||
+ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
+
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
|
||||
+$as_echo "$LIBFFI_WORKS" >&6; }
|
||||
|
||||
+ if test "x$LIBFFI_WORKS" = xno; then
|
||||
+
|
||||
+ # Print a helpful message on how to acquire the necessary build dependency.
|
||||
+ # ffi is the help tag: freetype, cups, pulse, alsa etc
|
||||
+ MISSING_DEPENDENCY=ffi
|
||||
+
|
||||
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
+ cygwin_help $MISSING_DEPENDENCY
|
||||
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
+ msys_help $MISSING_DEPENDENCY
|
||||
+ else
|
||||
+ PKGHANDLER_COMMAND=
|
||||
+
|
||||
+ case $PKGHANDLER in
|
||||
+ apt-get)
|
||||
+ apt_help $MISSING_DEPENDENCY ;;
|
||||
+ yum)
|
||||
+ yum_help $MISSING_DEPENDENCY ;;
|
||||
+ port)
|
||||
+ port_help $MISSING_DEPENDENCY ;;
|
||||
+ pkgutil)
|
||||
+ pkgutil_help $MISSING_DEPENDENCY ;;
|
||||
+ pkgadd)
|
||||
+ pkgadd_help $MISSING_DEPENDENCY ;;
|
||||
+ esac
|
||||
+
|
||||
+ if test "x$PKGHANDLER_COMMAND" != x; then
|
||||
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
+ fi
|
||||
fi
|
||||
|
||||
+ as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
|
||||
+ fi
|
||||
+
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
|
||||
+$as_echo_n "checking if libffi should be bundled... " >&6; }
|
||||
+ if test "x$enable_libffi_bundling" = "x"; then
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
+$as_echo "no" >&6; }
|
||||
+ ENABLE_LIBFFI_BUNDLING=false
|
||||
+ elif test "x$enable_libffi_bundling" = "xno"; then
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
|
||||
+$as_echo "no, forced" >&6; }
|
||||
+ ENABLE_LIBFFI_BUNDLING=false
|
||||
+ elif test "x$enable_libffi_bundling" = "xyes"; then
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
|
||||
+$as_echo "yes, forced" >&6; }
|
||||
+ ENABLE_LIBFFI_BUNDLING=true
|
||||
+ else
|
||||
+ as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
|
||||
+ fi
|
||||
+
|
||||
+ # Find the libffi.so.X to bundle
|
||||
+ if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
|
||||
+$as_echo_n "checking for libffi lib file location... " >&6; }
|
||||
+ if test "x${LIBFFI_LIB_PATH}" != x; then
|
||||
+ if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
|
||||
+ LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
|
||||
+ else
|
||||
+ as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
|
||||
+ fi
|
||||
+ else
|
||||
+ # If we don't have an explicit path, look in a few obvious places
|
||||
+ if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
|
||||
+ if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
|
||||
+ LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
|
||||
+ elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
|
||||
+ LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
|
||||
+ else
|
||||
+ as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
|
||||
+ fi
|
||||
+ elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
|
||||
+ if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
|
||||
+ LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
|
||||
+ elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
|
||||
+ LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
|
||||
+ else
|
||||
+ as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
|
||||
+ fi
|
||||
+ else
|
||||
+ # Fallback on the default /usr/lib dir
|
||||
+ if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
|
||||
+ LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
|
||||
+ else
|
||||
+ as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ # Make sure the wildcard is evaluated
|
||||
+ LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
|
||||
+ LIBFFI_LIB_DIR="$(dirname ${LIBFFI_LIB_FILE})"
|
||||
+ LIBFFI_LIB_FILE="$(basename ${LIBFFI_LIB_FILE})"
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE} in ${LIBFFI_LIB_DIR}" >&5
|
||||
+$as_echo "${LIBFFI_LIB_FILE} in ${LIBFFI_LIB_DIR}" >&6; }
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
|
||||
# Extract the first word of "llvm-config", so it can be a program name with args.
|
||||
set dummy llvm-config; ac_word=$2
|
||||
diff --git a/common/autoconf/libraries.m4 b/common/autoconf/libraries.m4
|
||||
index 6efae578ea..4ed8b4fdd6 100644
|
||||
--- a/common/autoconf/libraries.m4
|
||||
+++ b/common/autoconf/libraries.m4
|
||||
@@ -988,12 +988,161 @@ AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
|
||||
fi
|
||||
AC_SUBST(STATIC_CXX_SETTING)
|
||||
|
||||
+ AC_ARG_WITH(libffi, [AS_HELP_STRING([--with-libffi],
|
||||
+ [specify prefix directory for the libffi package
|
||||
+ (expecting the libraries under PATH/lib and the headers under PATH/include)])])
|
||||
+ AC_ARG_WITH(libffi-include, [AS_HELP_STRING([--with-libffi-include],
|
||||
+ [specify directory for the libffi include files])])
|
||||
+ AC_ARG_WITH(libffi-lib, [AS_HELP_STRING([--with-libffi-lib],
|
||||
+ [specify directory for the libffi library])])
|
||||
+ AC_ARG_ENABLE(libffi-bundling, [AS_HELP_STRING([--enable-libffi-bundling],
|
||||
+ [enable bundling of libffi.so to make the built JDK runnable on more systems])])
|
||||
+
|
||||
+ # Check if ffi is needed
|
||||
if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
|
||||
- # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
|
||||
- PKG_CHECK_MODULES([LIBFFI], [libffi])
|
||||
+ NEEDS_LIB_FFI=true
|
||||
+ else
|
||||
+ NEEDS_LIB_FFI=false
|
||||
+ fi
|
||||
+
|
||||
+ if test "x$NEEDS_LIB_FFI" = xfalse; then
|
||||
+ if test "x${with_libffi}" != x || test "x${with_libffi_include}" != x || test "x${with_libffi_lib}" != x; then
|
||||
+ AC_MSG_WARN([libffi not used, so --with-libffi is ignored])
|
||||
+ fi
|
||||
+ LIBFFI_CFLAGS=
|
||||
+ LIBFFI_LIBS=
|
||||
+ else
|
||||
+ LIBFFI_FOUND=no
|
||||
|
||||
+ if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
|
||||
+ AC_MSG_ERROR([It is not possible to disable the use of libffi. Remove the --without-libffi option.])
|
||||
+ fi
|
||||
+
|
||||
+ if test "x${with_libffi}" != x; then
|
||||
+ LIBFFI_LIB_PATH="${with_libffi}/lib"
|
||||
+ LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
|
||||
+ LIBFFI_CFLAGS="-I${with_libffi}/include"
|
||||
+ LIBFFI_FOUND=yes
|
||||
+ fi
|
||||
+ if test "x${with_libffi_include}" != x; then
|
||||
+ LIBFFI_CFLAGS="-I${with_libffi_include}"
|
||||
+ LIBFFI_FOUND=yes
|
||||
+ fi
|
||||
+ if test "x${with_libffi_lib}" != x; then
|
||||
+ LIBFFI_LIB_PATH="${with_libffi_lib}"
|
||||
+ LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
|
||||
+ LIBFFI_FOUND=yes
|
||||
+ fi
|
||||
+ # Do not try pkg-config if we have a sysroot set.
|
||||
+ if test "x$SYSROOT" = x; then
|
||||
+ if test "x$LIBFFI_FOUND" = xno; then
|
||||
+ # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
|
||||
+ PKG_CHECK_MODULES([LIBFFI], [libffi], [LIBFFI_FOUND=yes], [LIBFFI_FOUND=no])
|
||||
+ fi
|
||||
+ fi
|
||||
+ if test "x$LIBFFI_FOUND" = xno; then
|
||||
+ AC_CHECK_HEADERS([ffi.h],
|
||||
+ [
|
||||
+ LIBFFI_FOUND=yes
|
||||
+ LIBFFI_CFLAGS=
|
||||
+ LIBFFI_LIBS=-lffi
|
||||
+ ],
|
||||
+ [LIBFFI_FOUND=no]
|
||||
+ )
|
||||
+ fi
|
||||
+ if test "x$LIBFFI_FOUND" = xno; then
|
||||
+ HELP_MSG_MISSING_DEPENDENCY([ffi])
|
||||
+ AC_MSG_ERROR([Could not find libffi! $HELP_MSG])
|
||||
+ fi
|
||||
+
|
||||
+ AC_MSG_CHECKING([if libffi works])
|
||||
+ AC_LANG_PUSH(C)
|
||||
+ OLD_CFLAGS="$CFLAGS"
|
||||
+ CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
|
||||
+ OLD_LIBS="$LIBS"
|
||||
+ LIBS="$LIBS $LIBFFI_LIBS"
|
||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <ffi.h>],
|
||||
+ [
|
||||
+ ffi_call(NULL, NULL, NULL, NULL);
|
||||
+ return 0;
|
||||
+ ])],
|
||||
+ [LIBFFI_WORKS=yes],
|
||||
+ [LIBFFI_WORKS=no]
|
||||
+ )
|
||||
+ CFLAGS="$OLD_CFLAGS"
|
||||
+ LIBS="$OLD_LIBS"
|
||||
+ AC_LANG_POP(C)
|
||||
+ AC_MSG_RESULT([$LIBFFI_WORKS])
|
||||
+
|
||||
+ if test "x$LIBFFI_WORKS" = xno; then
|
||||
+ HELP_MSG_MISSING_DEPENDENCY([ffi])
|
||||
+ AC_MSG_ERROR([Found libffi but could not link and compile with it. $HELP_MSG])
|
||||
+ fi
|
||||
+
|
||||
+ AC_MSG_CHECKING([if libffi should be bundled])
|
||||
+ if test "x$enable_libffi_bundling" = "x"; then
|
||||
+ AC_MSG_RESULT([no])
|
||||
+ ENABLE_LIBFFI_BUNDLING=false
|
||||
+ elif test "x$enable_libffi_bundling" = "xno"; then
|
||||
+ AC_MSG_RESULT([no, forced])
|
||||
+ ENABLE_LIBFFI_BUNDLING=false
|
||||
+ elif test "x$enable_libffi_bundling" = "xyes"; then
|
||||
+ AC_MSG_RESULT([yes, forced])
|
||||
+ ENABLE_LIBFFI_BUNDLING=true
|
||||
+ else
|
||||
+ AC_MSG_ERROR([Invalid value for --enable-libffi-bundling])
|
||||
+ fi
|
||||
+
|
||||
+ # Find the libffi.so.X to bundle
|
||||
+ if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
|
||||
+ AC_MSG_CHECKING([for libffi lib file location])
|
||||
+ if test "x${LIBFFI_LIB_PATH}" != x; then
|
||||
+ if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
|
||||
+ LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
|
||||
+ else
|
||||
+ AC_MSG_ERROR([Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}])
|
||||
+ fi
|
||||
+ else
|
||||
+ # If we don't have an explicit path, look in a few obvious places
|
||||
+ if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
|
||||
+ if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
|
||||
+ LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
|
||||
+ elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
|
||||
+ LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
|
||||
+ else
|
||||
+ AC_MSG_ERROR([Could not locate libffi.so.? for bundling])
|
||||
+ fi
|
||||
+ elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
|
||||
+ if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
|
||||
+ LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
|
||||
+ elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
|
||||
+ LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
|
||||
+ else
|
||||
+ AC_MSG_ERROR([Could not locate libffi.so.? for bundling])
|
||||
+ fi
|
||||
+ else
|
||||
+ # Fallback on the default /usr/lib dir
|
||||
+ if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
|
||||
+ LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
|
||||
+ else
|
||||
+ AC_MSG_ERROR([Could not locate libffi.so.? for bundling])
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ # Make sure the wildcard is evaluated
|
||||
+ LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
|
||||
+ LIBFFI_LIB_DIR="$(dirname ${LIBFFI_LIB_FILE})"
|
||||
+ LIBFFI_LIB_FILE="$(basename ${LIBFFI_LIB_FILE})"
|
||||
+ AC_MSG_RESULT([${LIBFFI_LIB_FILE} in ${LIBFFI_LIB_DIR}])
|
||||
+ fi
|
||||
fi
|
||||
|
||||
+ AC_SUBST(LIBFFI_CFLAGS)
|
||||
+ AC_SUBST(LIBFFI_LIBS)
|
||||
+ AC_SUBST(ENABLE_LIBFFI_BUNDLING)
|
||||
+ AC_SUBST(LIBFFI_LIB_DIR)
|
||||
+ AC_SUBST(LIBFFI_LIB_FILE)
|
||||
+
|
||||
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
|
||||
AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config])
|
||||
|
||||
diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in
|
||||
index 9573bb2cbd..8da3ac32a0 100644
|
||||
--- a/common/autoconf/spec.gmk.in
|
||||
+++ b/common/autoconf/spec.gmk.in
|
||||
@@ -311,6 +311,11 @@ FONTCONFIG_CFLAGS:=@FONTCONFIG_CFLAGS@
|
||||
CUPS_CFLAGS:=@CUPS_CFLAGS@
|
||||
ALSA_LIBS:=@ALSA_LIBS@
|
||||
ALSA_CFLAGS:=@ALSA_CFLAGS@
|
||||
+LIBFFI_LIBS:=@LIBFFI_LIBS@
|
||||
+LIBFFI_CFLAGS:=@LIBFFI_CFLAGS@
|
||||
+ENABLE_LIBFFI_BUNDLING:=@ENABLE_LIBFFI_BUNDLING@
|
||||
+LIBFFI_LIB_DIR:=@LIBFFI_LIB_DIR@
|
||||
+LIBFFI_LIB_FILE:=@LIBFFI_LIB_FILE@
|
||||
|
||||
PACKAGE_PATH=@PACKAGE_PATH@
|
||||
|
||||
diff --git a/hotspot/make/Makefile b/hotspot/make/Makefile
|
||||
index ad195763be..b9114cb99a 100644
|
||||
--- a/hotspot/make/Makefile
|
||||
+++ b/hotspot/make/Makefile
|
||||
@@ -476,6 +476,8 @@ $(EXPORT_INCLUDE_DIR)/%: $(ZERO_BUILD_DIR)/../generated/jvmtifiles/%
|
||||
# Unix
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
|
||||
$(install-file)
|
||||
+$(EXPORT_JRE_LIB_ARCH_DIR)/$(LIBFFI_LIB_FILE): $(LIBFFI_LIB_DIR)/$(LIBFFI_LIB_FILE)
|
||||
+ $(install-file)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(ZERO_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(ZERO_BUILD_DIR)/%.diz
|
||||
diff --git a/hotspot/make/aix/makefiles/defs.make b/hotspot/make/aix/makefiles/defs.make
|
||||
index b12c9c8df2..db10f6a68f 100644
|
||||
--- a/hotspot/make/aix/makefiles/defs.make
|
||||
+++ b/hotspot/make/aix/makefiles/defs.make
|
||||
@@ -220,4 +220,7 @@ ADD_SA_BINARIES/zero =
|
||||
|
||||
EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
|
||||
|
||||
+ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
|
||||
+ EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/$(LIBFFI_LIB_FILE)
|
||||
+endif
|
||||
|
||||
diff --git a/hotspot/make/bsd/makefiles/defs.make b/hotspot/make/bsd/makefiles/defs.make
|
||||
index 7cd21cc175..23436f12d8 100644
|
||||
--- a/hotspot/make/bsd/makefiles/defs.make
|
||||
+++ b/hotspot/make/bsd/makefiles/defs.make
|
||||
@@ -364,6 +364,10 @@ ADD_SA_BINARIES/zero =
|
||||
|
||||
EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
|
||||
|
||||
+ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
|
||||
+ EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/$(LIBFFI_LIB_FILE)
|
||||
+endif
|
||||
+
|
||||
# Universal build settings
|
||||
ifeq ($(OS_VENDOR), Darwin)
|
||||
# Build universal binaries by default on Mac OS X
|
||||
diff --git a/hotspot/make/linux/makefiles/defs.make b/hotspot/make/linux/makefiles/defs.make
|
||||
index ec414639d2..0baa4f068d 100644
|
||||
--- a/hotspot/make/linux/makefiles/defs.make
|
||||
+++ b/hotspot/make/linux/makefiles/defs.make
|
||||
@@ -333,4 +333,6 @@ ADD_SA_BINARIES/zero =
|
||||
|
||||
EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
|
||||
|
||||
-
|
||||
+ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
|
||||
+ EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/$(LIBFFI_LIB_FILE)
|
||||
+endif
|
||||
diff --git a/hotspot/make/solaris/makefiles/defs.make b/hotspot/make/solaris/makefiles/defs.make
|
||||
index c88351c82b..cb838e854d 100644
|
||||
--- a/hotspot/make/solaris/makefiles/defs.make
|
||||
+++ b/hotspot/make/solaris/makefiles/defs.make
|
||||
@@ -304,3 +304,7 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||
endif
|
||||
endif
|
||||
EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar
|
||||
+
|
||||
+ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
|
||||
+ EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/$(LIBFFI_LIB_FILE)
|
||||
+endif
|
||||
diff --git a/hotspot/make/windows/makefiles/defs.make b/hotspot/make/windows/makefiles/defs.make
|
||||
index 6b36f0e2bc..6f42c7ad37 100644
|
||||
--- a/hotspot/make/windows/makefiles/defs.make
|
||||
+++ b/hotspot/make/windows/makefiles/defs.make
|
||||
@@ -300,6 +300,10 @@ ifeq ($(BUILD_WIN_SA), 1)
|
||||
MAKE_ARGS += BUILD_WIN_SA=1
|
||||
endif
|
||||
|
||||
+ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
|
||||
+ EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/$(LIBFFI_LIB_FILE)
|
||||
+endif
|
||||
+
|
||||
# Propagate compiler and tools paths from configure to nmake.
|
||||
# Need to make sure they contain \\ and not /.
|
||||
ifneq ($(SPEC),)
|
||||
diff --git a/jdk/make/Images.gmk b/jdk/make/Images.gmk
|
||||
index 2e378c9134..0edefd7b5c 100644
|
||||
--- a/jdk/make/Images.gmk
|
||||
+++ b/jdk/make/Images.gmk
|
||||
@@ -249,7 +249,8 @@ endif
|
||||
|
||||
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),) # If Linux or Solaris
|
||||
JDK_LIB_FILES += $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \
|
||||
- $(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX)
|
||||
+ $(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX) \
|
||||
+ $(LIBFFI_LIB_FILE)
|
||||
endif
|
||||
|
||||
# Find all files to copy from $(JDK_OUTPUTDIR)/lib
|
||||
diff --git a/jdk/make/Import.gmk b/jdk/make/Import.gmk
|
||||
index b115fa7f86..29fa2662a6 100644
|
||||
--- a/jdk/make/Import.gmk
|
||||
+++ b/jdk/make/Import.gmk
|
||||
@@ -114,7 +114,7 @@ endef
|
||||
#
|
||||
# Import hotspot
|
||||
#
|
||||
-HOTSPOT_IMPORT_FILES := $(addprefix $(LIBRARY_PREFIX), jvm.* saproc.* jsig.* sawindbg.* jvm_db.* jvm_dtrace.*) \
|
||||
+HOTSPOT_IMPORT_FILES := $(addprefix $(LIBRARY_PREFIX), jvm.* saproc.* jsig.* sawindbg.* jvm_db.* jvm_dtrace.* ffi.*) \
|
||||
Xusage.txt sa-jdi.jar
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
diff --git a/make/devkit/Tools.gmk b/make/devkit/Tools.gmk
|
||||
index c2460105b7..cf2ef251ac 100644
|
||||
--- a/make/devkit/Tools.gmk
|
||||
+++ b/make/devkit/Tools.gmk
|
||||
@@ -82,8 +82,8 @@ RPM_LIST := \
|
||||
libXi libXi-devel \
|
||||
libXdmcp libXdmcp-devel \
|
||||
libXau libXau-devel \
|
||||
- libgcc
|
||||
-
|
||||
+ libgcc \
|
||||
+ libffi libffi-devel
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
RPM_DIR ?= $(RPM_DIR_x86_64)
|
||||
@@ -203,6 +203,18 @@ $(libs) : $(rpms)
|
||||
@mkdir -p $(SYSROOT)/usr/lib
|
||||
@touch $@
|
||||
|
||||
+##########################################################################################
|
||||
+# Create links for ffi header files so that they become visible by default when using the
|
||||
+# devkit.
|
||||
+
|
||||
+$(SYSROOT)/usr/include/ffi.h: $(rpms)
|
||||
+ cd $(@D) && rm $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
|
||||
+
|
||||
+$(SYSROOT)/usr/include/ffitarget.h: $(rpms)
|
||||
+ cd $(@D) && rm $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
|
||||
+
|
||||
+SYSROOT_LINKS += $(SYSROOT)/usr/include/ffi.h $(SYSROOT)/usr/include/ffitarget.h
|
||||
+
|
||||
##########################################################################################
|
||||
|
||||
# Define marker files for each source package to be compiled
|
||||
@@ -479,7 +491,7 @@ rpms : $(rpms)
|
||||
libs : $(libs)
|
||||
sysroot : rpms libs
|
||||
gcc : sysroot $(gcc) $(gccpatch)
|
||||
-all : binutils gcc bfdlib $(PREFIX)/devkit.info
|
||||
+all : binutils gcc bfdlib $(PREFIX)/devkit.info $(SYSROOT_LINKS)
|
||||
|
||||
# this is only built for host. so separate.
|
||||
ccache : $(ccache)
|
286
SOURCES/jdk8186464-rh1433262-zip64_failure.patch
Normal file
286
SOURCES/jdk8186464-rh1433262-zip64_failure.patch
Normal file
@ -0,0 +1,286 @@
|
||||
# HG changeset patch
|
||||
# User sherman
|
||||
# Date 1505950914 25200
|
||||
# Wed Sep 20 16:41:54 2017 -0700
|
||||
# Node ID 723486922bfe4c17e3f5c067ce5e97229842fbcd
|
||||
# Parent c8ac05bbe47771b3dafa2e7fc9a95d86d68d7c07
|
||||
8186464: ZipFile cannot read some InfoZip ZIP64 zip files
|
||||
Reviewed-by: martin
|
||||
|
||||
diff --git openjdk.orig/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java openjdk/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java
|
||||
index 26e2a5bf9e9..2630c118817 100644
|
||||
--- openjdk.orig/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java
|
||||
+++ openjdk/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java
|
||||
@@ -92,6 +92,7 @@ public class ZipFileSystem extends FileSystem {
|
||||
private final boolean createNew; // create a new zip if not exists
|
||||
private static final boolean isWindows =
|
||||
System.getProperty("os.name").startsWith("Windows");
|
||||
+ private final boolean forceEnd64;
|
||||
|
||||
// a threshold, in bytes, to decide whether to create a temp file
|
||||
// for outputstream of a zip entry
|
||||
@@ -112,12 +113,13 @@ public class ZipFileSystem extends FileSystem {
|
||||
if (this.defaultDir.charAt(0) != '/')
|
||||
throw new IllegalArgumentException("default dir should be absolute");
|
||||
|
||||
+ this.forceEnd64 = "true".equals(env.get("forceZIP64End"));
|
||||
this.provider = provider;
|
||||
this.zfpath = zfpath;
|
||||
if (Files.notExists(zfpath)) {
|
||||
if (createNew) {
|
||||
try (OutputStream os = Files.newOutputStream(zfpath, CREATE_NEW, WRITE)) {
|
||||
- new END().write(os, 0);
|
||||
+ new END().write(os, 0, forceEnd64);
|
||||
}
|
||||
} else {
|
||||
throw new FileSystemNotFoundException(zfpath.toString());
|
||||
@@ -1014,28 +1016,36 @@ public class ZipFileSystem extends FileSystem {
|
||||
end.cenoff = ENDOFF(buf);
|
||||
end.comlen = ENDCOM(buf);
|
||||
end.endpos = pos + i;
|
||||
- if (end.cenlen == ZIP64_MINVAL ||
|
||||
- end.cenoff == ZIP64_MINVAL ||
|
||||
- end.centot == ZIP64_MINVAL32)
|
||||
- {
|
||||
- // need to find the zip64 end;
|
||||
- byte[] loc64 = new byte[ZIP64_LOCHDR];
|
||||
- if (readFullyAt(loc64, 0, loc64.length, end.endpos - ZIP64_LOCHDR)
|
||||
- != loc64.length) {
|
||||
- return end;
|
||||
- }
|
||||
- long end64pos = ZIP64_LOCOFF(loc64);
|
||||
- byte[] end64buf = new byte[ZIP64_ENDHDR];
|
||||
- if (readFullyAt(end64buf, 0, end64buf.length, end64pos)
|
||||
- != end64buf.length) {
|
||||
- return end;
|
||||
- }
|
||||
- // end64 found, re-calcualte everything.
|
||||
- end.cenlen = ZIP64_ENDSIZ(end64buf);
|
||||
- end.cenoff = ZIP64_ENDOFF(end64buf);
|
||||
- end.centot = (int)ZIP64_ENDTOT(end64buf); // assume total < 2g
|
||||
- end.endpos = end64pos;
|
||||
+ // try if there is zip64 end;
|
||||
+ byte[] loc64 = new byte[ZIP64_LOCHDR];
|
||||
+ if (end.endpos < ZIP64_LOCHDR ||
|
||||
+ readFullyAt(loc64, 0, loc64.length, end.endpos - ZIP64_LOCHDR)
|
||||
+ != loc64.length ||
|
||||
+ !locator64SigAt(loc64, 0)) {
|
||||
+ return end;
|
||||
+ }
|
||||
+ long end64pos = ZIP64_LOCOFF(loc64);
|
||||
+ byte[] end64buf = new byte[ZIP64_ENDHDR];
|
||||
+ if (readFullyAt(end64buf, 0, end64buf.length, end64pos)
|
||||
+ != end64buf.length ||
|
||||
+ !end64SigAt(end64buf, 0)) {
|
||||
+ return end;
|
||||
+ }
|
||||
+ // end64 found,
|
||||
+ long cenlen64 = ZIP64_ENDSIZ(end64buf);
|
||||
+ long cenoff64 = ZIP64_ENDOFF(end64buf);
|
||||
+ long centot64 = ZIP64_ENDTOT(end64buf);
|
||||
+ // double-check
|
||||
+ if (cenlen64 != end.cenlen && end.cenlen != ZIP64_MINVAL ||
|
||||
+ cenoff64 != end.cenoff && end.cenoff != ZIP64_MINVAL ||
|
||||
+ centot64 != end.centot && end.centot != ZIP64_MINVAL32) {
|
||||
+ return end;
|
||||
}
|
||||
+ // to use the end64 values
|
||||
+ end.cenlen = cenlen64;
|
||||
+ end.cenoff = cenoff64;
|
||||
+ end.centot = (int)centot64; // assume total < 2g
|
||||
+ end.endpos = end64pos;
|
||||
return end;
|
||||
}
|
||||
}
|
||||
@@ -1201,7 +1211,7 @@ public class ZipFileSystem extends FileSystem {
|
||||
|
||||
// sync the zip file system, if there is any udpate
|
||||
private void sync() throws IOException {
|
||||
- //System.out.printf("->sync(%s) starting....!%n", toString());
|
||||
+ // System.out.printf("->sync(%s) starting....!%n", toString());
|
||||
// check ex-closer
|
||||
if (!exChClosers.isEmpty()) {
|
||||
for (ExChannelCloser ecc : exChClosers) {
|
||||
@@ -1292,7 +1302,7 @@ public class ZipFileSystem extends FileSystem {
|
||||
}
|
||||
end.centot = elist.size();
|
||||
end.cenlen = written - end.cenoff;
|
||||
- end.write(os, written);
|
||||
+ end.write(os, written, forceEnd64);
|
||||
}
|
||||
if (!streams.isEmpty()) {
|
||||
//
|
||||
@@ -1849,8 +1859,8 @@ public class ZipFileSystem extends FileSystem {
|
||||
long endpos;
|
||||
int disktot;
|
||||
|
||||
- void write(OutputStream os, long offset) throws IOException {
|
||||
- boolean hasZip64 = false;
|
||||
+ void write(OutputStream os, long offset, boolean forceEnd64) throws IOException {
|
||||
+ boolean hasZip64 = forceEnd64; // false;
|
||||
long xlen = cenlen;
|
||||
long xoff = cenoff;
|
||||
if (xlen >= ZIP64_MINVAL) {
|
||||
@@ -1875,8 +1885,8 @@ public class ZipFileSystem extends FileSystem {
|
||||
writeShort(os, 45); // version needed to extract
|
||||
writeInt(os, 0); // number of this disk
|
||||
writeInt(os, 0); // central directory start disk
|
||||
- writeLong(os, centot); // number of directory entires on disk
|
||||
- writeLong(os, centot); // number of directory entires
|
||||
+ writeLong(os, centot); // number of directory entries on disk
|
||||
+ writeLong(os, centot); // number of directory entries
|
||||
writeLong(os, cenlen); // length of central directory
|
||||
writeLong(os, cenoff); // offset of central directory
|
||||
|
||||
diff --git openjdk.orig/jdk/src/share/native/java/util/zip/zip_util.c openjdk/jdk/src/share/native/java/util/zip/zip_util.c
|
||||
index 5fd6fea049d..858e5814e92 100644
|
||||
--- openjdk.orig/jdk/src/share/native/java/util/zip/zip_util.c
|
||||
+++ openjdk/jdk/src/share/native/java/util/zip/zip_util.c
|
||||
@@ -385,6 +385,9 @@ findEND64(jzfile *zip, void *end64buf, jlong endpos)
|
||||
{
|
||||
char loc64[ZIP64_LOCHDR];
|
||||
jlong end64pos;
|
||||
+ if (endpos < ZIP64_LOCHDR) {
|
||||
+ return -1;
|
||||
+ }
|
||||
if (readFullyAt(zip->zfd, loc64, ZIP64_LOCHDR, endpos - ZIP64_LOCHDR) == -1) {
|
||||
return -1; // end64 locator not found
|
||||
}
|
||||
@@ -567,6 +570,7 @@ readCEN(jzfile *zip, jint knownTotal)
|
||||
{
|
||||
/* Following are unsigned 32-bit */
|
||||
jlong endpos, end64pos, cenpos, cenlen, cenoff;
|
||||
+ jlong cenlen64, cenoff64, centot64;
|
||||
/* Following are unsigned 16-bit */
|
||||
jint total, tablelen, i, j;
|
||||
unsigned char *cenbuf = NULL;
|
||||
@@ -594,13 +598,20 @@ readCEN(jzfile *zip, jint knownTotal)
|
||||
cenlen = ENDSIZ(endbuf);
|
||||
cenoff = ENDOFF(endbuf);
|
||||
total = ENDTOT(endbuf);
|
||||
- if (cenlen == ZIP64_MAGICVAL || cenoff == ZIP64_MAGICVAL ||
|
||||
- total == ZIP64_MAGICCOUNT) {
|
||||
- unsigned char end64buf[ZIP64_ENDHDR];
|
||||
- if ((end64pos = findEND64(zip, end64buf, endpos)) != -1) {
|
||||
- cenlen = ZIP64_ENDSIZ(end64buf);
|
||||
- cenoff = ZIP64_ENDOFF(end64buf);
|
||||
- total = (jint)ZIP64_ENDTOT(end64buf);
|
||||
+ unsigned char end64buf[ZIP64_ENDHDR];
|
||||
+ if ((end64pos = findEND64(zip, end64buf, endpos)) != -1) {
|
||||
+ // end64 candidate found,
|
||||
+ cenlen64 = ZIP64_ENDSIZ(end64buf);
|
||||
+ cenoff64 = ZIP64_ENDOFF(end64buf);
|
||||
+ centot64 = ZIP64_ENDTOT(end64buf);
|
||||
+ // double-check
|
||||
+ if ((cenlen64 == cenlen || cenlen == ZIP64_MAGICVAL) &&
|
||||
+ (cenoff64 == cenoff || cenoff == ZIP64_MAGICVAL) &&
|
||||
+ (centot64 == total || total == ZIP64_MAGICCOUNT)) {
|
||||
+ // to use the end64 values
|
||||
+ cenlen = cenlen64;
|
||||
+ cenoff = cenoff64;
|
||||
+ total = (jint)centot64;
|
||||
endpos = end64pos;
|
||||
endhdrlen = ZIP64_ENDHDR;
|
||||
}
|
||||
diff --git openjdk.orig/jdk/test/java/util/zip/ZipFile/ReadZip.java openjdk/jdk/test/java/util/zip/ZipFile/ReadZip.java
|
||||
index ffe8a8ed712..9b380003893 100644
|
||||
--- openjdk.orig/jdk/test/java/util/zip/ZipFile/ReadZip.java
|
||||
+++ openjdk/jdk/test/java/util/zip/ZipFile/ReadZip.java
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
/* @test
|
||||
- * @bug 4241361 4842702 4985614 6646605 5032358 6923692 6233323 8144977 8184993
|
||||
+ * @bug 4241361 4842702 4985614 6646605 5032358 6923692 6233323 8144977 8184993 8186464
|
||||
* @summary Make sure we can read a zip file.
|
||||
@key randomness
|
||||
* @run main/othervm ReadZip
|
||||
@@ -31,12 +31,24 @@
|
||||
*/
|
||||
|
||||
import java.io.*;
|
||||
+import java.net.URI;
|
||||
import java.nio.file.Files;
|
||||
+import java.nio.file.FileSystem;
|
||||
+import java.nio.file.FileSystems;
|
||||
+import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
+import java.util.Collections;
|
||||
+import java.util.HashMap;
|
||||
+import java.util.List;
|
||||
+import java.util.Map;
|
||||
import java.util.zip.*;
|
||||
|
||||
+import sun.misc.IOUtils;
|
||||
+
|
||||
+import static java.nio.charset.StandardCharsets.US_ASCII;
|
||||
+
|
||||
public class ReadZip {
|
||||
private static void unreached (Object o)
|
||||
throws Exception
|
||||
@@ -144,8 +156,6 @@ public class ReadZip {
|
||||
newZip.delete();
|
||||
}
|
||||
|
||||
-
|
||||
-
|
||||
// Throw a FNF exception when read a non-existing zip file
|
||||
try { unreached (new ZipFile(
|
||||
new File(System.getProperty("test.src", "."),
|
||||
@@ -153,5 +163,54 @@ public class ReadZip {
|
||||
+ String.valueOf(new java.util.Random().nextInt())
|
||||
+ ".zip")));
|
||||
} catch (FileNotFoundException fnfe) {}
|
||||
+
|
||||
+ // read a zip file with ZIP64 end
|
||||
+ Path path = Paths.get(System.getProperty("test.dir", ""), "end64.zip");
|
||||
+ try {
|
||||
+ URI uri = URI.create("jar:" + path.toUri());
|
||||
+ Map<String, Object> env = new HashMap<>();
|
||||
+ env.put("create", "true");
|
||||
+ env.put("forceZIP64End", "true");
|
||||
+ try (FileSystem fs = FileSystems.newFileSystem(uri, env)) {
|
||||
+ Files.write(fs.getPath("hello"), "hello".getBytes());
|
||||
+ }
|
||||
+ try (ZipFile zf = new ZipFile(path.toFile())) {
|
||||
+ if (!"hello".equals(new String(IOUtils.readAllBytes(zf.getInputStream(new ZipEntry("hello"))),
|
||||
+ US_ASCII)))
|
||||
+ throw new RuntimeException("zipfile: read entry failed");
|
||||
+ } catch (IOException x) {
|
||||
+ throw new RuntimeException("zipfile: zip64 end failed");
|
||||
+ }
|
||||
+ try (FileSystem fs = FileSystems.newFileSystem(uri, Collections.emptyMap())) {
|
||||
+ if (!"hello".equals(new String(Files.readAllBytes(fs.getPath("hello")))))
|
||||
+ throw new RuntimeException("zipfs: read entry failed");
|
||||
+ } catch (IOException x) {
|
||||
+ throw new RuntimeException("zipfile: zip64 end failed");
|
||||
+ }
|
||||
+ } finally {
|
||||
+ Files.deleteIfExists(path);
|
||||
+ }
|
||||
+
|
||||
+ // read a zip file created via "echo hello | zip dst.zip -", which uses
|
||||
+ // ZIP64 end record
|
||||
+ if (Files.notExists(Paths.get("/usr/bin/zip")))
|
||||
+ return;
|
||||
+ try {
|
||||
+ Process zip = new ProcessBuilder("zip", path.toString().toString(), "-").start();
|
||||
+ OutputStream os = zip.getOutputStream();
|
||||
+ os.write("hello".getBytes(US_ASCII));
|
||||
+ os.close();
|
||||
+ zip.waitFor();
|
||||
+ if (zip.exitValue() == 0 && Files.exists(path)) {
|
||||
+ try (ZipFile zf = new ZipFile(path.toFile())) {
|
||||
+ if (!"hello".equals(new String(IOUtils.readAllBytes(zf.getInputStream(new ZipEntry("-"))))))
|
||||
+ throw new RuntimeException("zipfile: read entry failed");
|
||||
+ } catch (IOException x) {
|
||||
+ throw new RuntimeException("zipfile: zip64 end failed");
|
||||
+ }
|
||||
+ }
|
||||
+ } finally {
|
||||
+ Files.deleteIfExists(path);
|
||||
+ }
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1526122977 -3600
|
||||
# Sat May 12 12:02:57 2018 +0100
|
||||
# Node ID 00ccc73498628a51a45301322e64ce2ad06e49be
|
||||
# Parent aecf9f48f7b5c6148b62713a6b746301435b57cc
|
||||
PR3533: HotSpot generates code with unaligned stack, crashes on SSE operations
|
||||
Summary: Enable -mstackrealign on x86 Linux as well as x86 Mac OS X
|
||||
|
||||
diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4
|
||||
index 113bf367e2..bed030e8d1 100644
|
||||
--- a/common/autoconf/flags.m4
|
||||
+++ b/common/autoconf/flags.m4
|
||||
@@ -451,6 +451,21 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
|
||||
AC_SUBST($2CXXSTD_CXXFLAG)
|
||||
fi
|
||||
|
||||
+ #
|
||||
+ # NOTE: check for -mstackrealign needs to be below potential addition of -m32
|
||||
+ #
|
||||
+ if test "x$OPENJDK_TARGET_CPU" = xx86 && test "x$OPENJDK_TARGET_OS" = xmacosx -o \
|
||||
+ "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
+ # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
|
||||
+ # While waiting for a better solution, the current workaround is to use -mstackrealign
|
||||
+ # This is also required on Linux systems which use libraries compiled with SSE instructions
|
||||
+ REALIGN_CFLAG="-mincoming-stack-boundary=2 -mpreferred-stack-boundary=4"
|
||||
+ FLAGS_COMPILER_CHECK_ARGUMENTS([$REALIGN_CFLAG -Werror], [],
|
||||
+ AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
|
||||
+ )
|
||||
+ AC_SUBST([REALIGN_CFLAG])
|
||||
+ fi
|
||||
+
|
||||
if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
|
||||
fi
|
||||
diff --git a/common/autoconf/hotspot-spec.gmk.in b/common/autoconf/hotspot-spec.gmk.in
|
||||
index 3f86751d2b..f8a271383f 100644
|
||||
--- a/common/autoconf/hotspot-spec.gmk.in
|
||||
+++ b/common/autoconf/hotspot-spec.gmk.in
|
||||
@@ -114,13 +114,14 @@ RC:=@HOTSPOT_RC@
|
||||
# Retain EXTRA_{CFLAGS,CXXFLAGS,LDFLAGS,ASFLAGS} for the target flags to
|
||||
# maintain compatibility with the existing Makefiles
|
||||
EXTRA_CFLAGS=@LEGACY_TARGET_CFLAGS@ $(NO_DELETE_NULL_POINTER_CHECKS_CFLAG) \
|
||||
- $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG)
|
||||
+ $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG) \
|
||||
+ $(REALIGN_CFLAG)
|
||||
EXTRA_CXXFLAGS=@LEGACY_TARGET_CXXFLAGS@
|
||||
EXTRA_LDFLAGS=@LEGACY_TARGET_LDFLAGS@
|
||||
EXTRA_ASFLAGS=@LEGACY_TARGET_ASFLAGS@
|
||||
# Define an equivalent set for the host flags (i.e. without sysroot options)
|
||||
HOST_CFLAGS=@LEGACY_HOST_CFLAGS@ $(NO_DELETE_NULL_POINTER_CHECKS_CFLAG) \
|
||||
- $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG)
|
||||
+ $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG)
|
||||
HOST_CXXFLAGS=@LEGACY_HOST_CXXFLAGS@
|
||||
HOST_LDFLAGS=@LEGACY_HOST_LDFLAGS@
|
||||
HOST_ASFLAGS=@LEGACY_HOST_ASFLAGS@
|
||||
diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in
|
||||
index 9573bb2cbd..fe7efc130c 100644
|
||||
--- a/common/autoconf/spec.gmk.in
|
||||
+++ b/common/autoconf/spec.gmk.in
|
||||
@@ -366,6 +366,7 @@ CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
|
||||
|
||||
NO_DELETE_NULL_POINTER_CHECKS_CFLAG=@NO_DELETE_NULL_POINTER_CHECKS_CFLAG@
|
||||
NO_LIFETIME_DSE_CFLAG=@NO_LIFETIME_DSE_CFLAG@
|
||||
+REALIGN_CFLAG=@REALIGN_CFLAG@
|
||||
CXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@
|
||||
|
||||
CXX:=@FIXPATH@ @CCACHE@ @CXX@
|
2596
SOURCES/jdk8328999-update_giflib_5.2.2.patch
Normal file
2596
SOURCES/jdk8328999-update_giflib_5.2.2.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,10 +7,11 @@
|
||||
8074839: Resolve disabled warnings for libunpack and the unpack200 binary
|
||||
Reviewed-by: dholmes, ksrini
|
||||
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h
|
||||
@@ -63,7 +63,7 @@
|
||||
diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h b/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h
|
||||
index bdaf95a2f6a..60c5b4f2a69 100644
|
||||
--- a/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h
|
||||
+++ b/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h
|
||||
@@ -63,7 +63,7 @@ struct bytes {
|
||||
bytes res;
|
||||
res.ptr = ptr + beg;
|
||||
res.len = end - beg;
|
||||
@ -19,10 +20,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/bytes.h openj
|
||||
return res;
|
||||
}
|
||||
// building C strings inside byte buffers:
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
|
||||
@@ -292,7 +292,7 @@
|
||||
diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
|
||||
index 5fbc7261fb3..4c002e779d8 100644
|
||||
--- a/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
|
||||
+++ b/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
|
||||
@@ -292,7 +292,7 @@ Java_com_sun_java_util_jar_pack_NativeUnpack_getUnusedInput(JNIEnv *env, jobject
|
||||
|
||||
if (uPtr->aborting()) {
|
||||
THROW_IOE(uPtr->get_abort_message());
|
||||
@ -31,16 +33,16 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp openj
|
||||
}
|
||||
|
||||
// We have fetched all the files.
|
||||
@@ -310,7 +310,7 @@
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_com_sun_java_util_jar_pack_NativeUnpack_finish(JNIEnv *env, jobject pObj) {
|
||||
unpacker* uPtr = get_unpacker(env, pObj, false);
|
||||
@@ -312,7 +312,7 @@ Java_com_sun_java_util_jar_pack_NativeUnpack_finish(JNIEnv *env, jobject pObj) {
|
||||
// There's no need to create a new unpacker here if we don't already have one
|
||||
// just to immediatly free it afterwards.
|
||||
unpacker* uPtr = get_unpacker(env, pObj, /* noCreate= */ true);
|
||||
- CHECK_EXCEPTION_RETURN_VALUE(uPtr, NULL);
|
||||
+ CHECK_EXCEPTION_RETURN_VALUE(uPtr, 0);
|
||||
size_t consumed = uPtr->input_consumed();
|
||||
// free_unpacker() will set the unpacker field on 'pObj' to null
|
||||
free_unpacker(env, pObj, uPtr);
|
||||
return consumed;
|
||||
@@ -320,6 +320,7 @@
|
||||
@@ -323,6 +323,7 @@ JNIEXPORT jboolean JNICALL
|
||||
Java_com_sun_java_util_jar_pack_NativeUnpack_setOption(JNIEnv *env, jobject pObj,
|
||||
jstring pProp, jstring pValue) {
|
||||
unpacker* uPtr = get_unpacker(env, pObj);
|
||||
@ -48,10 +50,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp openj
|
||||
const char* prop = env->GetStringUTFChars(pProp, JNI_FALSE);
|
||||
CHECK_EXCEPTION_RETURN_VALUE(prop, false);
|
||||
const char* value = env->GetStringUTFChars(pValue, JNI_FALSE);
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp
|
||||
@@ -142,31 +142,28 @@
|
||||
diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp
|
||||
index 6fbc43a18ae..722c8baaff0 100644
|
||||
--- a/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp
|
||||
+++ b/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp
|
||||
@@ -142,31 +142,28 @@ static const char* nbasename(const char* progname) {
|
||||
return progname;
|
||||
}
|
||||
|
||||
@ -101,10 +104,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp open
|
||||
}
|
||||
}
|
||||
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp
|
||||
@@ -222,9 +222,9 @@
|
||||
diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp
|
||||
index a585535c513..8df3fade499 100644
|
||||
--- a/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp
|
||||
+++ b/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp
|
||||
@@ -225,9 +225,9 @@ struct entry {
|
||||
}
|
||||
|
||||
#ifdef PRODUCT
|
||||
@ -116,7 +120,7 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp op
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -715,13 +715,13 @@
|
||||
@@ -719,13 +719,13 @@ void unpacker::read_file_header() {
|
||||
// Now we can size the whole archive.
|
||||
// Read everything else into a mega-buffer.
|
||||
rp = hdr.rp;
|
||||
@ -134,7 +138,7 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp op
|
||||
abort("EOF reading fixed input buffer");
|
||||
return;
|
||||
}
|
||||
@@ -735,7 +735,7 @@
|
||||
@@ -739,7 +739,7 @@ void unpacker::read_file_header() {
|
||||
return;
|
||||
}
|
||||
input.set(U_NEW(byte, add_size(header_size_0, archive_size, C_SLOP)),
|
||||
@ -143,7 +147,7 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp op
|
||||
CHECK;
|
||||
assert(input.limit()[0] == 0);
|
||||
// Move all the bytes we read initially into the real buffer.
|
||||
@@ -958,13 +958,13 @@
|
||||
@@ -962,13 +962,13 @@ void cpool::init(unpacker* u_, int counts[CONSTANT_Limit]) {
|
||||
nentries = next_entry;
|
||||
|
||||
// place a limit on future CP growth:
|
||||
@ -159,18 +163,7 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp op
|
||||
|
||||
// Note that this CP does not include "empty" entries
|
||||
// for longs and doubles. Those are introduced when
|
||||
@@ -982,8 +982,9 @@
|
||||
}
|
||||
|
||||
// Initialize *all* our entries once
|
||||
- for (int i = 0 ; i < maxentries ; i++)
|
||||
+ for (uint i = 0 ; i < maxentries ; i++) {
|
||||
entries[i].outputIndex = REQUESTED_NONE;
|
||||
+ }
|
||||
|
||||
initGroupIndexes();
|
||||
// Initialize hashTab to a generous power-of-two size.
|
||||
@@ -3677,21 +3678,22 @@
|
||||
@@ -3694,21 +3694,22 @@ void cpool::computeOutputIndexes() {
|
||||
|
||||
unpacker* debug_u;
|
||||
|
||||
@ -197,7 +190,7 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp op
|
||||
case CONSTANT_Signature:
|
||||
if (value.b.ptr == null)
|
||||
return ref(0)->string();
|
||||
@@ -3711,26 +3713,28 @@
|
||||
@@ -3728,26 +3729,28 @@ char* entry::string() {
|
||||
break;
|
||||
default:
|
||||
if (nrefs == 0) {
|
||||
@ -235,10 +228,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp op
|
||||
}
|
||||
|
||||
void print_cp_entries(int beg, int end) {
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h
|
||||
@@ -209,7 +209,7 @@
|
||||
diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h b/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h
|
||||
index 4ec595333c4..aad0c971ef2 100644
|
||||
--- a/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h
|
||||
+++ b/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h
|
||||
@@ -209,7 +209,7 @@ struct unpacker {
|
||||
byte* rp; // read pointer (< rplimit <= input.limit())
|
||||
byte* rplimit; // how much of the input block has been read?
|
||||
julong bytes_read;
|
||||
@ -247,10 +241,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.h open
|
||||
|
||||
// callback to read at least one byte, up to available input
|
||||
typedef jlong (*read_input_fn_t)(unpacker* self, void* buf, jlong minlen, jlong maxlen);
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp
|
||||
@@ -81,7 +81,7 @@
|
||||
diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp
|
||||
index da39a589545..1281d8b25c8 100644
|
||||
--- a/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp
|
||||
+++ b/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp
|
||||
@@ -81,7 +81,7 @@ void breakpoint() { } // hook for debugger
|
||||
int assert_failed(const char* p) {
|
||||
char message[1<<12];
|
||||
sprintf(message, "@assert failed: %s\n", p);
|
||||
@ -259,10 +254,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/utils.cpp ope
|
||||
breakpoint();
|
||||
unpack_abort(message);
|
||||
return 0;
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp
|
||||
@@ -84,7 +84,7 @@
|
||||
diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp
|
||||
index f58c94956c0..343da3e183b 100644
|
||||
--- a/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp
|
||||
+++ b/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp
|
||||
@@ -84,7 +84,7 @@ void jar::init(unpacker* u_) {
|
||||
}
|
||||
|
||||
// Write data to the ZIP output stream.
|
||||
@ -271,7 +267,7 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp openj
|
||||
while (len > 0) {
|
||||
int rc = (int)fwrite(buff, 1, len, jarfp);
|
||||
if (rc <= 0) {
|
||||
@@ -323,12 +323,12 @@
|
||||
@@ -323,12 +323,12 @@ void jar::write_central_directory() {
|
||||
// Total number of disks (int)
|
||||
header64[36] = (ushort)SWAP_BYTES(1);
|
||||
header64[37] = 0;
|
||||
@ -286,10 +282,11 @@ diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.cpp openj
|
||||
|
||||
PRINTCR((2, "writing zip comment\n"));
|
||||
// Write the comment.
|
||||
diff --git openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h
|
||||
--- openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h
|
||||
+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h
|
||||
@@ -68,8 +68,8 @@
|
||||
diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h b/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h
|
||||
index 14ffc9d65bd..9877f6f68ca 100644
|
||||
--- a/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h
|
||||
+++ b/jdk/src/share/native/com/sun/java/util/jar/pack/zip.h
|
||||
@@ -68,8 +68,8 @@ struct jar {
|
||||
}
|
||||
|
||||
// Private Methods
|
@ -0,0 +1,193 @@
|
||||
diff --git a/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java b/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java
|
||||
index e7b4763db53..0005e56f528 100644
|
||||
--- a/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java
|
||||
+++ b/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java
|
||||
@@ -31,6 +31,7 @@ import java.security.*;
|
||||
import java.security.cert.*;
|
||||
import java.util.*;
|
||||
import sun.security.action.*;
|
||||
+import sun.security.tools.KeyStoreUtil;
|
||||
import sun.security.validator.TrustStoreUtil;
|
||||
|
||||
/**
|
||||
@@ -68,7 +69,7 @@ final class TrustStoreManager {
|
||||
* The preference of the default trusted KeyStore is:
|
||||
* javax.net.ssl.trustStore
|
||||
* jssecacerts
|
||||
- * cacerts
|
||||
+ * cacerts (system and local)
|
||||
*/
|
||||
private static final class TrustStoreDescriptor {
|
||||
private static final String fileSep = File.separator;
|
||||
@@ -76,7 +77,8 @@ final class TrustStoreManager {
|
||||
GetPropertyAction.privilegedGetProperty("java.home") +
|
||||
fileSep + "lib" + fileSep + "security";
|
||||
private static final String defaultStore =
|
||||
- defaultStorePath + fileSep + "cacerts";
|
||||
+ AccessController.doPrivileged((PrivilegedAction<String>) () ->
|
||||
+ KeyStoreUtil.getCacertsKeyStorePath());
|
||||
private static final String jsseDefaultStore =
|
||||
defaultStorePath + fileSep + "jssecacerts";
|
||||
|
||||
@@ -139,6 +141,10 @@ final class TrustStoreManager {
|
||||
String storePropPassword = System.getProperty(
|
||||
"javax.net.ssl.trustStorePassword", "");
|
||||
|
||||
+ if (SSLLogger.isOn && SSLLogger.isOn("trustmanager")) {
|
||||
+ SSLLogger.fine("Default store: " + defaultStore);
|
||||
+ }
|
||||
+
|
||||
String temporaryName = "";
|
||||
File temporaryFile = null;
|
||||
long temporaryTime = 0L;
|
||||
@@ -160,7 +166,7 @@ final class TrustStoreManager {
|
||||
SSLLogger.isOn("trustmanager")) {
|
||||
SSLLogger.fine(
|
||||
"Inaccessible trust store: " +
|
||||
- storePropName);
|
||||
+ fileName);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
diff --git a/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java b/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java
|
||||
index fcc77786da1..3a4388964cc 100644
|
||||
--- a/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java
|
||||
+++ b/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java
|
||||
@@ -41,6 +41,8 @@ import java.text.Collator;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
+import sun.security.util.SecurityProperties;
|
||||
+
|
||||
/**
|
||||
* <p> This class provides several utilities to <code>KeyStore</code>.
|
||||
*
|
||||
@@ -54,6 +56,8 @@ public class KeyStoreUtil {
|
||||
|
||||
private static final String JKS = "jks";
|
||||
|
||||
+ private static final String SYSTEM_CA_CERTS_PROP = "security.systemCACerts";
|
||||
+
|
||||
/**
|
||||
* Returns true if the certificate is self-signed, false otherwise.
|
||||
*/
|
||||
@@ -96,16 +100,30 @@ public class KeyStoreUtil {
|
||||
}
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Returns the path to the cacerts DB
|
||||
+ */
|
||||
+ public static String getCacertsKeyStorePath()
|
||||
+ {
|
||||
+ // Check system DB first, preferring system property over security one
|
||||
+ String systemDB = SecurityProperties
|
||||
+ .privilegedGetOverridable(SYSTEM_CA_CERTS_PROP);
|
||||
+ if (systemDB != null && !"".equals(systemDB) &&
|
||||
+ (new File(systemDB)).isFile()) {
|
||||
+ return systemDB;
|
||||
+ }
|
||||
+ String sep = File.separator;
|
||||
+ return System.getProperty("java.home") + sep
|
||||
+ + "lib" + sep + "security" + sep + "cacerts";
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Returns the keystore with the configured CA certificates.
|
||||
*/
|
||||
public static KeyStore getCacertsKeyStore()
|
||||
throws Exception
|
||||
{
|
||||
- String sep = File.separator;
|
||||
- File file = new File(System.getProperty("java.home") + sep
|
||||
- + "lib" + sep + "security" + sep
|
||||
- + "cacerts");
|
||||
+ File file = new File(getCacertsKeyStorePath());
|
||||
if (!file.exists()) {
|
||||
return null;
|
||||
}
|
||||
diff --git a/jdk/src/share/lib/security/java.security-aix b/jdk/src/share/lib/security/java.security-aix
|
||||
index 681a24b905d..ecb8bc43a6c 100644
|
||||
--- a/jdk/src/share/lib/security/java.security-aix
|
||||
+++ b/jdk/src/share/lib/security/java.security-aix
|
||||
@@ -294,6 +294,12 @@ security.overridePropertiesFile=true
|
||||
#
|
||||
security.useSystemPropertiesFile=false
|
||||
|
||||
+#
|
||||
+# Specifies the system certificate store
|
||||
+# This property may be disabled using an empty value
|
||||
+#
|
||||
+security.systemCACerts=${java.home}/lib/security/cacerts
|
||||
+
|
||||
#
|
||||
# Determines the default key and trust manager factory algorithms for
|
||||
# the javax.net.ssl package.
|
||||
diff --git a/jdk/src/share/lib/security/java.security-linux b/jdk/src/share/lib/security/java.security-linux
|
||||
index 789c19a8cba..2546fdec9b2 100644
|
||||
--- a/jdk/src/share/lib/security/java.security-linux
|
||||
+++ b/jdk/src/share/lib/security/java.security-linux
|
||||
@@ -307,6 +307,12 @@ security.overridePropertiesFile=true
|
||||
#
|
||||
security.useSystemPropertiesFile=false
|
||||
|
||||
+#
|
||||
+# Specifies the system certificate store
|
||||
+# This property may be disabled using an empty value
|
||||
+#
|
||||
+security.systemCACerts=${java.home}/lib/security/cacerts
|
||||
+
|
||||
#
|
||||
# Determines the default key and trust manager factory algorithms for
|
||||
# the javax.net.ssl package.
|
||||
diff --git a/jdk/src/share/lib/security/java.security-macosx b/jdk/src/share/lib/security/java.security-macosx
|
||||
index d4da666af3b..1a20027c02b 100644
|
||||
--- a/jdk/src/share/lib/security/java.security-macosx
|
||||
+++ b/jdk/src/share/lib/security/java.security-macosx
|
||||
@@ -297,6 +297,12 @@ security.overridePropertiesFile=true
|
||||
#
|
||||
security.useSystemPropertiesFile=false
|
||||
|
||||
+#
|
||||
+# Specifies the system certificate store
|
||||
+# This property may be disabled using an empty value
|
||||
+#
|
||||
+security.systemCACerts=${java.home}/lib/security/cacerts
|
||||
+
|
||||
#
|
||||
# Determines the default key and trust manager factory algorithms for
|
||||
# the javax.net.ssl package.
|
||||
diff --git a/jdk/src/share/lib/security/java.security-solaris b/jdk/src/share/lib/security/java.security-solaris
|
||||
index 300132384a1..6299e0a3c7b 100644
|
||||
--- a/jdk/src/share/lib/security/java.security-solaris
|
||||
+++ b/jdk/src/share/lib/security/java.security-solaris
|
||||
@@ -295,6 +295,12 @@ security.overridePropertiesFile=true
|
||||
#
|
||||
security.useSystemPropertiesFile=false
|
||||
|
||||
+#
|
||||
+# Specifies the system certificate store
|
||||
+# This property may be disabled using an empty value
|
||||
+#
|
||||
+security.systemCACerts=${java.home}/lib/security/cacerts
|
||||
+
|
||||
#
|
||||
# Determines the default key and trust manager factory algorithms for
|
||||
# the javax.net.ssl package.
|
||||
diff --git a/jdk/src/share/lib/security/java.security-windows b/jdk/src/share/lib/security/java.security-windows
|
||||
index 64db5a5cd1e..823994f3466 100644
|
||||
--- a/jdk/src/share/lib/security/java.security-windows
|
||||
+++ b/jdk/src/share/lib/security/java.security-windows
|
||||
@@ -297,6 +297,12 @@ security.overridePropertiesFile=true
|
||||
#
|
||||
security.useSystemPropertiesFile=false
|
||||
|
||||
+#
|
||||
+# Specifies the system certificate store
|
||||
+# This property may be disabled using an empty value
|
||||
+#
|
||||
+security.systemCACerts=${java.home}/lib/security/cacerts
|
||||
+
|
||||
#
|
||||
# Determines the default key and trust manager factory algorithms for
|
||||
# the javax.net.ssl package.
|
131
SOURCES/remove-intree-libraries.sh
Normal file
131
SOURCES/remove-intree-libraries.sh
Normal file
@ -0,0 +1,131 @@
|
||||
#!/bin/sh
|
||||
|
||||
ZIP_SRC=openjdk/jdk/src/share/native/java/util/zip/zlib
|
||||
JPEG_SRC=openjdk/jdk/src/share/native/sun/awt/image/jpeg
|
||||
GIF_SRC=openjdk/jdk/src/share/native/sun/awt/giflib
|
||||
PNG_SRC=openjdk/jdk/src/share/native/sun/awt/libpng
|
||||
LCMS_SRC=openjdk/jdk/src/share/native/sun/java2d/cmm/lcms
|
||||
|
||||
echo "Removing built-in libs (they will be linked)"
|
||||
|
||||
echo "Removing zlib"
|
||||
if [ ! -d ${ZIP_SRC} ]; then
|
||||
echo "${ZIP_SRC} does not exist. Refusing to proceed."
|
||||
exit 1
|
||||
fi
|
||||
rm -rvf ${ZIP_SRC}
|
||||
|
||||
echo "Removing libjpeg"
|
||||
if [ ! -f ${JPEG_SRC}/jdhuff.c ]; then # some file that sound definitely exist
|
||||
echo "${JPEG_SRC} does not contain jpeg sources. Refusing to proceed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -vf ${JPEG_SRC}/jcomapi.c
|
||||
rm -vf ${JPEG_SRC}/jdapimin.c
|
||||
rm -vf ${JPEG_SRC}/jdapistd.c
|
||||
rm -vf ${JPEG_SRC}/jdcoefct.c
|
||||
rm -vf ${JPEG_SRC}/jdcolor.c
|
||||
rm -vf ${JPEG_SRC}/jdct.h
|
||||
rm -vf ${JPEG_SRC}/jddctmgr.c
|
||||
rm -vf ${JPEG_SRC}/jdhuff.c
|
||||
rm -vf ${JPEG_SRC}/jdhuff.h
|
||||
rm -vf ${JPEG_SRC}/jdinput.c
|
||||
rm -vf ${JPEG_SRC}/jdmainct.c
|
||||
rm -vf ${JPEG_SRC}/jdmarker.c
|
||||
rm -vf ${JPEG_SRC}/jdmaster.c
|
||||
rm -vf ${JPEG_SRC}/jdmerge.c
|
||||
rm -vf ${JPEG_SRC}/jdphuff.c
|
||||
rm -vf ${JPEG_SRC}/jdpostct.c
|
||||
rm -vf ${JPEG_SRC}/jdsample.c
|
||||
rm -vf ${JPEG_SRC}/jerror.c
|
||||
rm -vf ${JPEG_SRC}/jerror.h
|
||||
rm -vf ${JPEG_SRC}/jidctflt.c
|
||||
rm -vf ${JPEG_SRC}/jidctfst.c
|
||||
rm -vf ${JPEG_SRC}/jidctint.c
|
||||
rm -vf ${JPEG_SRC}/jidctred.c
|
||||
rm -vf ${JPEG_SRC}/jinclude.h
|
||||
rm -vf ${JPEG_SRC}/jmemmgr.c
|
||||
rm -vf ${JPEG_SRC}/jmemsys.h
|
||||
rm -vf ${JPEG_SRC}/jmemnobs.c
|
||||
rm -vf ${JPEG_SRC}/jmorecfg.h
|
||||
rm -vf ${JPEG_SRC}/jpegint.h
|
||||
rm -vf ${JPEG_SRC}/jpeglib.h
|
||||
rm -vf ${JPEG_SRC}/jquant1.c
|
||||
rm -vf ${JPEG_SRC}/jquant2.c
|
||||
rm -vf ${JPEG_SRC}/jutils.c
|
||||
rm -vf ${JPEG_SRC}/jcapimin.c
|
||||
rm -vf ${JPEG_SRC}/jcapistd.c
|
||||
rm -vf ${JPEG_SRC}/jccoefct.c
|
||||
rm -vf ${JPEG_SRC}/jccolor.c
|
||||
rm -vf ${JPEG_SRC}/jcdctmgr.c
|
||||
rm -vf ${JPEG_SRC}/jchuff.c
|
||||
rm -vf ${JPEG_SRC}/jchuff.h
|
||||
rm -vf ${JPEG_SRC}/jcinit.c
|
||||
rm -vf ${JPEG_SRC}/jconfig.h
|
||||
rm -vf ${JPEG_SRC}/jcmainct.c
|
||||
rm -vf ${JPEG_SRC}/jcmarker.c
|
||||
rm -vf ${JPEG_SRC}/jcmaster.c
|
||||
rm -vf ${JPEG_SRC}/jcparam.c
|
||||
rm -vf ${JPEG_SRC}/jcphuff.c
|
||||
rm -vf ${JPEG_SRC}/jcprepct.c
|
||||
rm -vf ${JPEG_SRC}/jcsample.c
|
||||
rm -vf ${JPEG_SRC}/jctrans.c
|
||||
rm -vf ${JPEG_SRC}/jdtrans.c
|
||||
rm -vf ${JPEG_SRC}/jfdctflt.c
|
||||
rm -vf ${JPEG_SRC}/jfdctfst.c
|
||||
rm -vf ${JPEG_SRC}/jfdctint.c
|
||||
rm -vf ${JPEG_SRC}/jversion.h
|
||||
rm -vf ${JPEG_SRC}/README
|
||||
|
||||
echo "Removing giflib"
|
||||
if [ ! -d ${GIF_SRC} ]; then
|
||||
echo "${GIF_SRC} does not exist. Refusing to proceed."
|
||||
exit 1
|
||||
fi
|
||||
rm -rvf ${GIF_SRC}
|
||||
|
||||
echo "Removing libpng"
|
||||
if [ ! -d ${PNG_SRC} ]; then
|
||||
echo "${PNG_SRC} does not exist. Refusing to proceed."
|
||||
exit 1
|
||||
fi
|
||||
rm -rvf ${PNG_SRC}
|
||||
|
||||
echo "Removing lcms"
|
||||
if [ ! -d ${LCMS_SRC} ]; then
|
||||
echo "${LCMS_SRC} does not exist. Refusing to proceed."
|
||||
exit 1
|
||||
fi
|
||||
# temporary change to move bundled LCMS
|
||||
if [ ! true ]; then
|
||||
rm -vf ${LCMS_SRC}/cmsalpha.c
|
||||
rm -vf ${LCMS_SRC}/cmscam02.c
|
||||
rm -vf ${LCMS_SRC}/cmscgats.c
|
||||
rm -vf ${LCMS_SRC}/cmscnvrt.c
|
||||
rm -vf ${LCMS_SRC}/cmserr.c
|
||||
rm -vf ${LCMS_SRC}/cmsgamma.c
|
||||
rm -vf ${LCMS_SRC}/cmsgmt.c
|
||||
rm -vf ${LCMS_SRC}/cmshalf.c
|
||||
rm -vf ${LCMS_SRC}/cmsintrp.c
|
||||
rm -vf ${LCMS_SRC}/cmsio0.c
|
||||
rm -vf ${LCMS_SRC}/cmsio1.c
|
||||
rm -vf ${LCMS_SRC}/cmslut.c
|
||||
rm -vf ${LCMS_SRC}/cmsmd5.c
|
||||
rm -vf ${LCMS_SRC}/cmsmtrx.c
|
||||
rm -vf ${LCMS_SRC}/cmsnamed.c
|
||||
rm -vf ${LCMS_SRC}/cmsopt.c
|
||||
rm -vf ${LCMS_SRC}/cmspack.c
|
||||
rm -vf ${LCMS_SRC}/cmspcs.c
|
||||
rm -vf ${LCMS_SRC}/cmsplugin.c
|
||||
rm -vf ${LCMS_SRC}/cmsps2.c
|
||||
rm -vf ${LCMS_SRC}/cmssamp.c
|
||||
rm -vf ${LCMS_SRC}/cmssm.c
|
||||
rm -vf ${LCMS_SRC}/cmstypes.c
|
||||
rm -vf ${LCMS_SRC}/cmsvirt.c
|
||||
rm -vf ${LCMS_SRC}/cmswtpnt.c
|
||||
rm -vf ${LCMS_SRC}/cmsxform.c
|
||||
rm -vf ${LCMS_SRC}/lcms2.h
|
||||
rm -vf ${LCMS_SRC}/lcms2_internal.h
|
||||
rm -vf ${LCMS_SRC}/lcms2_plugin.h
|
||||
fi
|
@ -17,7 +17,7 @@ fi
|
||||
d=`mktemp -d`
|
||||
NW=$d/$f
|
||||
pushd $d
|
||||
jar xf $ORIG
|
||||
unzip $ORIG
|
||||
cat $M
|
||||
# sed -i "s/Created-By.*/Created-By: 1.7.0/g" $M
|
||||
sed -i "s/Created-By.*/Created-By: $2/g" $M
|
@ -0,0 +1,16 @@
|
||||
diff -uNr openjdk-orig/jdk/src/share/classes/java/awt/Toolkit.java jdk8/jdk/src/share/classes/java/awt/Toolkit.java
|
||||
--- openjdk-orig/jdk/src/share/classes/java/awt/Toolkit.java 2009-01-23 11:59:47.000000000 -0500
|
||||
+++ jdk8/jdk/src/share/classes/java/awt/Toolkit.java 2009-01-23 12:05:20.000000000 -0500
|
||||
@@ -883,7 +883,11 @@
|
||||
return null;
|
||||
}
|
||||
});
|
||||
- loadAssistiveTechnologies();
|
||||
+ try {
|
||||
+ loadAssistiveTechnologies();
|
||||
+ } catch ( AWTError error) {
|
||||
+ // ignore silently
|
||||
+ }
|
||||
}
|
||||
return toolkit;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
--- openjdk/jdk/src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java 2013-03-01 10:48:12.038189968 +0100
|
||||
+++ openjdk/jdk/src/solaris/classes/sun/security/smartcardio/PlatformPCSC.java 2013-03-01 10:48:11.913188505 +0100
|
||||
@@ -48,8 +48,8 @@
|
||||
|
||||
private final static String PROP_NAME = "sun.security.smartcardio.library";
|
||||
|
||||
- private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so";
|
||||
- private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so";
|
||||
+ private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so.1";
|
||||
+ private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so.1";
|
||||
private final static String PCSC_FRAMEWORK = "/System/Library/Frameworks/PCSC.framework/Versions/Current/PCSC";
|
||||
|
||||
PlatformPCSC() {
|
@ -16,7 +16,7 @@ diff --git openjdk.orig/hotspot/src/share/vm/gc_implementation/shenandoah/shenan
|
||||
Atomic::add(val, &_sum);
|
||||
|
||||
- int mag = log2_intptr(val) + 1;
|
||||
+ int mag = log2_intptr((uintptr_t)val) + 1;
|
||||
+ int mag = log2_long(val) + 1;
|
||||
|
||||
// Defensively saturate for product bits:
|
||||
if (mag < 0) {
|
5519
SPECS/java-1.8.0-openjdk.spec
Normal file
5519
SPECS/java-1.8.0-openjdk.spec
Normal file
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
java-1.8.0-openjdk package is retired on branch c10s for BAKERY-412
|
@ -1,58 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1526122977 -3600
|
||||
# Sat May 12 12:02:57 2018 +0100
|
||||
# Node ID 00ccc73498628a51a45301322e64ce2ad06e49be
|
||||
# Parent aecf9f48f7b5c6148b62713a6b746301435b57cc
|
||||
PR3533: HotSpot generates code with unaligned stack, crashes on SSE operations
|
||||
Summary: Enable -mstackrealign on x86 Linux as well as x86 Mac OS X
|
||||
|
||||
diff --git openjdk.orig///common/autoconf/flags.m4 openjdk///common/autoconf/flags.m4
|
||||
--- openjdk.orig///common/autoconf/flags.m4
|
||||
+++ openjdk///common/autoconf/flags.m4
|
||||
@@ -402,6 +402,21 @@
|
||||
AC_SUBST($2CXXSTD_CXXFLAG)
|
||||
fi
|
||||
|
||||
+ #
|
||||
+ # NOTE: check for -mstackrealign needs to be below potential addition of -m32
|
||||
+ #
|
||||
+ if test "x$OPENJDK_TARGET_CPU" = xx86 && test "x$OPENJDK_TARGET_OS" = xmacosx -o \
|
||||
+ "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
+ # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
|
||||
+ # While waiting for a better solution, the current workaround is to use -mstackrealign
|
||||
+ # This is also required on Linux systems which use libraries compiled with SSE instructions
|
||||
+ REALIGN_CFLAG="-mincoming-stack-boundary=2 -mpreferred-stack-boundary=4"
|
||||
+ FLAGS_COMPILER_CHECK_ARGUMENTS([$REALIGN_CFLAG -Werror], [],
|
||||
+ AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
|
||||
+ )
|
||||
+ AC_SUBST([REALIGN_CFLAG])
|
||||
+ fi
|
||||
+
|
||||
if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
|
||||
fi
|
||||
diff --git openjdk.orig///common/autoconf/hotspot-spec.gmk.in openjdk///common/autoconf/hotspot-spec.gmk.in
|
||||
--- openjdk.orig///common/autoconf/hotspot-spec.gmk.in
|
||||
+++ openjdk///common/autoconf/hotspot-spec.gmk.in
|
||||
@@ -112,7 +112,8 @@
|
||||
RC:=@HOTSPOT_RC@
|
||||
|
||||
EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(NO_DELETE_NULL_POINTER_CHECKS_CFLAG) \
|
||||
- $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG)
|
||||
+ $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG) \
|
||||
+ $(REALIGN_CFLAG)
|
||||
EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@
|
||||
EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
|
||||
EXTRA_ASFLAGS=@LEGACY_EXTRA_ASFLAGS@
|
||||
diff --git openjdk.orig///common/autoconf/spec.gmk.in openjdk///common/autoconf/spec.gmk.in
|
||||
--- openjdk.orig///common/autoconf/spec.gmk.in
|
||||
+++ openjdk///common/autoconf/spec.gmk.in
|
||||
@@ -366,6 +366,7 @@
|
||||
|
||||
NO_DELETE_NULL_POINTER_CHECKS_CFLAG=@NO_DELETE_NULL_POINTER_CHECKS_CFLAG@
|
||||
NO_LIFETIME_DSE_CFLAG=@NO_LIFETIME_DSE_CFLAG@
|
||||
+REALIGN_CFLAG=@REALIGN_CFLAG@
|
||||
CXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@
|
||||
|
||||
CXX:=@FIXPATH@ @CCACHE@ @CXX@
|
@ -1,12 +0,0 @@
|
||||
diff --git openjdk.orig/hotspot/src/os/linux/vm/perfMemory_linux.cpp openjdk/hotspot/src/os/linux/vm/perfMemory_linux.cpp
|
||||
--- openjdk.orig/hotspot/src/os/linux/vm/perfMemory_linux.cpp
|
||||
+++ openjdk/hotspot/src/os/linux/vm/perfMemory_linux.cpp
|
||||
@@ -878,7 +878,7 @@
|
||||
|
||||
// open the file
|
||||
int result;
|
||||
- RESTARTABLE(::open(filename, oflags), result);
|
||||
+ RESTARTABLE(::open(filename, oflags, 0), result);
|
||||
if (result == OS_ERR) {
|
||||
if (errno == ENOENT) {
|
||||
THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(),
|
@ -1,67 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||
# Date 1620365804 -3600
|
||||
# Fri May 07 06:36:44 2021 +0100
|
||||
# Node ID 39b62f35eca823b4c9a98bc1dc0cb9acb87360f8
|
||||
# Parent 723b59ed1afe878c5cd35f080399c8ceec4f776b
|
||||
PR3836: Extra compiler flags not passed to adlc build
|
||||
|
||||
diff --git openjdk.orig/hotspot/make/aix/makefiles/adlc.make openjdk/hotspot/make/aix/makefiles/adlc.make
|
||||
--- openjdk.orig/hotspot/make/aix/makefiles/adlc.make
|
||||
+++ openjdk/hotspot/make/aix/makefiles/adlc.make
|
||||
@@ -69,6 +69,11 @@
|
||||
CFLAGS_WARN = -w
|
||||
CFLAGS += $(CFLAGS_WARN)
|
||||
|
||||
+# Extra flags from gnumake's invocation or environment
|
||||
+CFLAGS += $(EXTRA_CFLAGS)
|
||||
+LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)
|
||||
+ASFLAGS += $(EXTRA_ASFLAGS)
|
||||
+
|
||||
OBJECTNAMES = \
|
||||
adlparse.o \
|
||||
archDesc.o \
|
||||
diff --git openjdk.orig/hotspot/make/bsd/makefiles/adlc.make openjdk/hotspot/make/bsd/makefiles/adlc.make
|
||||
--- openjdk.orig/hotspot/make/bsd/makefiles/adlc.make
|
||||
+++ openjdk/hotspot/make/bsd/makefiles/adlc.make
|
||||
@@ -71,6 +71,11 @@
|
||||
endif
|
||||
CFLAGS += $(CFLAGS_WARN)
|
||||
|
||||
+# Extra flags from gnumake's invocation or environment
|
||||
+CFLAGS += $(EXTRA_CFLAGS)
|
||||
+LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)
|
||||
+ASFLAGS += $(EXTRA_ASFLAGS)
|
||||
+
|
||||
OBJECTNAMES = \
|
||||
adlparse.o \
|
||||
archDesc.o \
|
||||
diff --git openjdk.orig/hotspot/make/linux/makefiles/adlc.make openjdk/hotspot/make/linux/makefiles/adlc.make
|
||||
--- openjdk.orig/hotspot/make/linux/makefiles/adlc.make
|
||||
+++ openjdk/hotspot/make/linux/makefiles/adlc.make
|
||||
@@ -69,6 +69,11 @@
|
||||
CFLAGS_WARN = $(WARNINGS_ARE_ERRORS)
|
||||
CFLAGS += $(CFLAGS_WARN)
|
||||
|
||||
+# Extra flags from gnumake's invocation or environment
|
||||
+CFLAGS += $(EXTRA_CFLAGS)
|
||||
+LFLAGS += $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)
|
||||
+ASFLAGS += $(EXTRA_ASFLAGS)
|
||||
+
|
||||
OBJECTNAMES = \
|
||||
adlparse.o \
|
||||
archDesc.o \
|
||||
diff --git openjdk.orig/hotspot/make/solaris/makefiles/adlc.make openjdk/hotspot/make/solaris/makefiles/adlc.make
|
||||
--- openjdk.orig/hotspot/make/solaris/makefiles/adlc.make
|
||||
+++ openjdk/hotspot/make/solaris/makefiles/adlc.make
|
||||
@@ -85,6 +85,10 @@
|
||||
endif
|
||||
CFLAGS += $(CFLAGS_WARN)
|
||||
|
||||
+# Extra flags from gnumake's invocation or environment
|
||||
+CFLAGS += $(EXTRA_CFLAGS)
|
||||
+ASFLAGS += $(EXTRA_ASFLAGS)
|
||||
+
|
||||
ifeq ("${Platform_compiler}", "sparcWorks")
|
||||
# Enable the following CFLAGS addition if you need to compare the
|
||||
# built ELF objects.
|
@ -1,35 +0,0 @@
|
||||
diff --git openjdk.orig/hotspot/src/cpu/x86/vm/x86_32.ad openjdk/hotspot/src/cpu/x86/vm/x86_32.ad
|
||||
index c8f4ee1613..cc0f4eef14 100644
|
||||
--- openjdk.orig/hotspot/src/cpu/x86/vm/x86_32.ad
|
||||
+++ openjdk/hotspot/src/cpu/x86/vm/x86_32.ad
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
-// Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
+// Copyright (c) 1997, 2022, Oracle and/or its affiliates. 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
|
||||
@@ -7665,9 +7665,9 @@ instruct divI_eReg(eAXRegI rax, eDXRegI rdx, eCXRegI div, eFlagsReg cr) %{
|
||||
%}
|
||||
|
||||
// Divide Register Long
|
||||
-instruct divL_eReg( eADXRegL dst, eRegL src1, eRegL src2, eFlagsReg cr, eCXRegI cx, eBXRegI bx ) %{
|
||||
+instruct divL_eReg(eADXRegL dst, eRegL src1, eRegL src2) %{
|
||||
match(Set dst (DivL src1 src2));
|
||||
- effect( KILL cr, KILL cx, KILL bx );
|
||||
+ effect(CALL);
|
||||
ins_cost(10000);
|
||||
format %{ "PUSH $src1.hi\n\t"
|
||||
"PUSH $src1.lo\n\t"
|
||||
@@ -7713,9 +7713,9 @@ instruct modI_eReg(eDXRegI rdx, eAXRegI rax, eCXRegI div, eFlagsReg cr) %{
|
||||
%}
|
||||
|
||||
// Remainder Register Long
|
||||
-instruct modL_eReg( eADXRegL dst, eRegL src1, eRegL src2, eFlagsReg cr, eCXRegI cx, eBXRegI bx ) %{
|
||||
+instruct modL_eReg(eADXRegL dst, eRegL src1, eRegL src2) %{
|
||||
match(Set dst (ModL src1 src2));
|
||||
- effect( KILL cr, KILL cx, KILL bx );
|
||||
+ effect(CALL);
|
||||
ins_cost(10000);
|
||||
format %{ "PUSH $src1.hi\n\t"
|
||||
"PUSH $src1.lo\n\t"
|
@ -1,76 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2022 Red Hat, Inc.
|
||||
# Written by Andrew John Hughes <gnu.andrew@redhat.com>, 2012-2022
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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 Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
OLD_RELEASE=$1
|
||||
NEW_RELEASE=$2
|
||||
SUBDIR=$3
|
||||
REPO=$4
|
||||
SCRIPT_DIR=$(dirname ${0})
|
||||
|
||||
if test "x${SUBDIR}" = "x"; then
|
||||
echo "No subdirectory specified; using .";
|
||||
SUBDIR=".";
|
||||
fi
|
||||
|
||||
if test "x$REPO" = "x"; then
|
||||
echo "No repository specified; using ${PWD}"
|
||||
REPO=${PWD}
|
||||
fi
|
||||
|
||||
if test x${TMPDIR} = x; then
|
||||
TMPDIR=/tmp;
|
||||
fi
|
||||
|
||||
echo "Repository: ${REPO}"
|
||||
|
||||
if [ -e ${REPO}/.git ] ; then
|
||||
TYPE=git;
|
||||
elif [ -e ${REPO}/.hg ] ; then
|
||||
TYPE=hg;
|
||||
else
|
||||
echo "No Mercurial or Git repository detected.";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if test "x$OLD_RELEASE" = "x" || test "x$NEW_RELEASE" = "x"; then
|
||||
echo "ERROR: Need to specify old and new release";
|
||||
exit 2;
|
||||
fi
|
||||
|
||||
echo "Listing fixes between $OLD_RELEASE and $NEW_RELEASE in $REPO"
|
||||
rm -f ${TMPDIR}/fixes2 ${TMPDIR}/fixes3 ${TMPDIR}/fixes
|
||||
for repos in . $(${SCRIPT_DIR}/discover_trees.sh ${REPO});
|
||||
do
|
||||
if test "x$TYPE" = "xhg"; then
|
||||
hg log -r "tag('$NEW_RELEASE'):tag('$OLD_RELEASE') - tag('$OLD_RELEASE')" -R $REPO/$repos -G -M ${REPO}/${SUBDIR} | \
|
||||
egrep '^[o:| ]*summary'|grep -v 'Added tag'|sed -r 's#^[o:| ]*summary:\W*([0-9])# - JDK-\1#'| \
|
||||
sed 's#^[o:| ]*summary:\W*# - #' >> ${TMPDIR}/fixes2;
|
||||
hg log -v -r "tag('$NEW_RELEASE'):tag('$OLD_RELEASE') - tag('$OLD_RELEASE')" -R $REPO/$repos -G -M ${REPO}/${SUBDIR} | \
|
||||
egrep '^[o:| ]*[0-9]{7}'|sed -r 's#^[o:| ]*([0-9]{7})# - JDK-\1#' >> ${TMPDIR}/fixes3;
|
||||
else
|
||||
git -C ${REPO} log --no-merges --pretty=format:%B ${NEW_RELEASE}...${OLD_RELEASE} -- ${SUBDIR} |egrep '^[0-9]{7}' | \
|
||||
sed -r 's#^([0-9])# - JDK-\1#' >> ${TMPDIR}/fixes2;
|
||||
touch ${TMPDIR}/fixes3 ; # unused
|
||||
fi
|
||||
done
|
||||
|
||||
sort ${TMPDIR}/fixes2 ${TMPDIR}/fixes3 | uniq > ${TMPDIR}/fixes
|
||||
rm -f ${TMPDIR}/fixes2 ${TMPDIR}/fixes3
|
||||
|
||||
echo "In ${TMPDIR}/fixes:"
|
||||
cat ${TMPDIR}/fixes
|
@ -1,63 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User andrew
|
||||
# Date 1459487045 -3600
|
||||
# Fri Apr 01 06:04:05 2016 +0100
|
||||
# Node ID 3334efeacd8327a14b7d2f392f4546e3c29c594b
|
||||
# Parent 6b81fd2227d14226f2121f2d51b464536925686e
|
||||
PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts)
|
||||
PR3575: System cacerts database handling should not affect jssecacerts
|
||||
|
||||
diff --git openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java openjdk/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java
|
||||
--- openjdk.orig/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java
|
||||
@@ -72,7 +72,7 @@
|
||||
* The preference of the default trusted KeyStore is:
|
||||
* javax.net.ssl.trustStore
|
||||
* jssecacerts
|
||||
- * cacerts
|
||||
+ * cacerts (system and local)
|
||||
*/
|
||||
private static final class TrustStoreDescriptor {
|
||||
private static final String fileSep = File.separator;
|
||||
@@ -83,6 +83,10 @@
|
||||
defaultStorePath + fileSep + "cacerts";
|
||||
private static final String jsseDefaultStore =
|
||||
defaultStorePath + fileSep + "jssecacerts";
|
||||
+ /* Check system cacerts DB: /etc/pki/java/cacerts */
|
||||
+ private static final String systemStore =
|
||||
+ fileSep + "etc" + fileSep + "pki" +
|
||||
+ fileSep + "java" + fileSep + "cacerts";
|
||||
|
||||
// the trust store name
|
||||
private final String storeName;
|
||||
@@ -146,7 +150,8 @@
|
||||
long temporaryTime = 0L;
|
||||
if (!"NONE".equals(storePropName)) {
|
||||
String[] fileNames =
|
||||
- new String[] {storePropName, defaultStore};
|
||||
+ new String[] {storePropName,
|
||||
+ systemStore, defaultStore};
|
||||
for (String fileName : fileNames) {
|
||||
File f = new File(fileName);
|
||||
if (f.isFile() && f.canRead()) {
|
||||
diff --git openjdk.orig/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java openjdk/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java
|
||||
--- openjdk.orig/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java
|
||||
+++ openjdk/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java
|
||||
@@ -108,9 +108,14 @@
|
||||
throws Exception
|
||||
{
|
||||
String sep = File.separator;
|
||||
- File file = new File(System.getProperty("java.home") + sep
|
||||
- + "lib" + sep + "security" + sep
|
||||
- + "cacerts");
|
||||
+ /* Check system cacerts DB first; /etc/pki/java/cacerts */
|
||||
+ File file = new File(sep + "etc" + sep + "pki" + sep
|
||||
+ + "java" + sep + "cacerts");
|
||||
+ if (!file.exists()) {
|
||||
+ file = new File(System.getProperty("java.home") + sep
|
||||
+ + "lib" + sep + "security" + sep
|
||||
+ + "cacerts");
|
||||
+ }
|
||||
if (!file.exists()) {
|
||||
return null;
|
||||
}
|
2
sources
2
sources
@ -1,2 +0,0 @@
|
||||
SHA512 (tapsets-icedtea-3.15.0.tar.xz) = c752a197cb3d812d50c35e11e4722772be40096c81d2a57933e0d9b8a3c708b9c157b8108a4e33a06ca7bb81648170994408c75d6f69d5ff12785d0c31009671
|
||||
SHA512 (openjdk-shenandoah-jdk8u-shenandoah-jdk8u362-b09-4curve.tar.xz) = 2ed16c616189e7872ecf36c82e86b551b1e6efc4d11a93264db856f01191875a82ddaec3363b5f8296ea225a9a8edf4c0e1504ff27d8474088ba0b2f6fc061d5
|
@ -1,95 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
# Generates the 'source tarball' for JDK 8 projects and update spec infrastructure
|
||||
# By default, this script regenerate source as they are currently used.
|
||||
# so if the version of sources change, this file changes and is pushed
|
||||
#
|
||||
# In any case you have to set PROJECT_NAME REPO_NAME and VERSION. eg:
|
||||
# PROJECT_NAME=jdk8u OR aarch64-port
|
||||
# REPO_NAME=jdk8u60 OR jdk8u60
|
||||
# VERSION=jdk8u60-b27 OR aarch64-jdk8u65-b17 OR for head, keyword 'tip' should do the job there
|
||||
#
|
||||
# If you don't, default are used and so already uploaded tarball regenerated
|
||||
# They are used to create correct name and are used in construction of sources url (unless REPO_ROOT is set)
|
||||
#
|
||||
# For other useful variables see generate_source_tarball.sh
|
||||
#
|
||||
# the used values are then substituted to spec and sources
|
||||
|
||||
if [ ! "x$PR2126" = "x" ] ; then
|
||||
if [ ! -f "$PR2126" ] ; then
|
||||
echo "You have specified PR2126 as $PR2126 but it does not exists. exiting"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
if [ "x$PROJECT_NAME" = "x" ] ; then
|
||||
PROJECT_NAME="aarch64-port"
|
||||
fi
|
||||
if [ "x$REPO_NAME" = "x" ] ; then
|
||||
REPO_NAME="jdk8u-shenandoah"
|
||||
fi
|
||||
if [ "x$VERSION" = "x" ] ; then
|
||||
VERSION="aarch64-shenandoah-jdk8u181-b15"
|
||||
fi
|
||||
|
||||
if [ "x$COMPRESSION" = "x" ] ; then
|
||||
# rhel 5 needs tar.gz
|
||||
COMPRESSION=xz
|
||||
fi
|
||||
if [ "x$FILE_NAME_ROOT" = "x" ] ; then
|
||||
FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION}
|
||||
fi
|
||||
if [ "x$PKG" = "x" ] ; then
|
||||
URL=`cat .git/config | grep url`
|
||||
PKG=${URL##*/}
|
||||
fi
|
||||
if [ "x$SPEC" = "x" ] ; then
|
||||
SPEC=${PKG}.spec
|
||||
fi
|
||||
if [ "x$RELEASE" = "x" ] ; then
|
||||
RELEASE=1
|
||||
fi
|
||||
|
||||
FILENAME=${FILE_NAME_ROOT}.tar.${COMPRESSION}
|
||||
|
||||
if [ ! -f ${FILENAME} ] ; then
|
||||
echo "Generating ${FILENAME}"
|
||||
. ./generate_source_tarball.sh
|
||||
else
|
||||
echo "${FILENAME} already exists, using"
|
||||
fi
|
||||
|
||||
|
||||
echo "Touching spec: $SPEC"
|
||||
echo sed -i "s/^%global\s\+project.*/%global project ${PROJECT_NAME}/" $SPEC
|
||||
echo sed -i "s/^%global\s\+repo.*/%global repo ${REPO_NAME}/" $SPEC
|
||||
echo sed -i "s/^%global\s\+revision.*/%global revision ${VERSION}/" $SPEC
|
||||
# updated sources, resetting release
|
||||
echo sed -i "s/^Release:.*/Release: $RELEASE.%{buildver}%{?dist}/" $SPEC
|
||||
|
||||
echo "New sources"
|
||||
cat sources
|
||||
a_sources=`cat sources | sed "s/.*(//g" | sed "s/).*//g" | sed "s/.*\s\+//g"`
|
||||
echo " you can get inspired by following %changelog template:"
|
||||
user_name=`whoami`
|
||||
user_record=$(getent passwd $user_name)
|
||||
user_gecos_field=$(echo "$user_record" | cut -d ':' -f 5)
|
||||
user_full_name=$(echo "$user_gecos_field" | cut -d ',' -f 1)
|
||||
spec_date=`date +"%a %b %d %Y"`
|
||||
# See spec:
|
||||
revision_helper=`echo ${MAIN_VERSION%-*}`
|
||||
updatever=`echo ${revision_helper##*u}`
|
||||
buildver=`echo ${MAIN_VERSION##*-}`
|
||||
echo "* $spec_date $user_full_name <$user_name@redhat.com> - 1:1.8.0.$updatever-$RELEASE.$buildver"
|
||||
echo "- updated to $MAIN_VERSION (from $PROJECT_NAME/$MAIN_REPO_NAME)"
|
||||
echo "- updated to $VERSION (from $PROJECT_NAME/$REPO_NAME) of hotspot"
|
||||
echo "- used $FILENAME as new sources"
|
||||
echo "- used $FILENAME_SH as new sources for hotspot"
|
||||
|
||||
echo " execute:"
|
||||
echo "fedpkg/rhpkg new-sources "$a_sources
|
||||
echo " to upload sources"
|
||||
echo "you can verify by fedpkg/rhpkg prep --arch XXXX on all architectures: x86_64 i386 i586 i686 ppc ppc64 ppc64le s390 s390x aarch64 armv7hl"
|
||||
|
Loading…
Reference in New Issue
Block a user