workaround a bug in libtool (which Kaffe uses) that b0rks on native libraries that aren't named "typically" for the OS (libjbigi.so, etc)

(sun, however, works fine with randomly named libraries)
This commit is contained in:
jrandom
2004-09-01 06:53:00 +00:00
committed by zzz
parent ce2e7305d4
commit 7dffae4620
2 changed files with 8 additions and 2 deletions

View File

@@ -37,6 +37,8 @@ public class CPUID {
//.matches() is a java 1.4+ addition, using a simplified version for 1.3+
//private static final boolean isX86 = System.getProperty("os.arch").toLowerCase().matches("i?[x0-9]86(_64)?");
private static final boolean isX86 = (-1 != System.getProperty("os.arch").indexOf("86"));
private static final String libPrefix = (System.getProperty("os.name").startsWith("Win") ? "" : "lib");
private static final String libSuffix = (System.getProperty("os.name").startsWith("Win") ? ".dll" : ".so");
static
{
@@ -483,7 +485,7 @@ public class CPUID {
File outFile = null;
try {
InputStream libStream = resource.openStream();
outFile = File.createTempFile("jcpuid", "lib.tmp");
outFile = File.createTempFile(libPrefix + "jcpuid", "lib.tmp" + libSuffix);
FileOutputStream fos = new FileOutputStream(outFile);
byte buf[] = new byte[4096*1024];
while (true) {

View File

@@ -103,6 +103,10 @@ public class NativeBigInteger extends BigInteger {
private final static String JBIGI_OPTIMIZATION_PENTIUM3 = "pentium3";
private final static String JBIGI_OPTIMIZATION_PENTIUM4 = "pentium4";
/* libjbigi.so vs jbigi.dll */
private static final String _libPrefix = (System.getProperty("os.name").startsWith("Win") ? "" : "lib");
private static final String _libSuffix = (System.getProperty("os.name").startsWith("Win") ? ".dll" : ".so");
private final static String sCPUType; //The CPU Type to optimize for (one of the above strings)
static {
@@ -480,7 +484,7 @@ public class NativeBigInteger extends BigInteger {
File outFile = null;
try {
InputStream libStream = resource.openStream();
outFile = File.createTempFile("jbigi", "lib.tmp");
outFile = File.createTempFile(_libPrefix + "jbigi", "lib.tmp" + _libSuffix);
FileOutputStream fos = new FileOutputStream(outFile);
byte buf[] = new byte[4096*1024];
while (true) {