From 56ef4cda82c95f136798c48d78bda5548df58557 Mon Sep 17 00:00:00 2001 From: kytv Date: Mon, 19 Nov 2012 23:47:55 +0000 Subject: [PATCH] Addi an exception for core2 & corei to NBI on 32-bit kFreeBSD, NetBSD, and OpenBSD These binaries are identical on 32-bit kFreeBSD, NetBSD, and OpenBSD systems. If a corei CPU is found on these systems we'll use the core2 jbigi binary. 194868,ad47c3d909d0fb85242566f3c7b4be5b,libjbigi-kfreebsd-core2.so 194868,ad47c3d909d0fb85242566f3c7b4be5b,libjbigi-kfreebsd-corei.so 202848,57aa013ca310f3aae990f5ee78c100bd,libjbigi-netbsd-core2.so 202848,57aa013ca310f3aae990f5ee78c100bd,libjbigi-netbsd-corei.so 207657,01483211b6e077057302e256f185f7e7,libjbigi-openbsd-core2.so 207657,01483211b6e077057302e256f185f7e7,libjbigi-openbsd-corei.so The I2P project does not currently ship these binaries, but they can be found in unofficial jbigi packages. --- core/java/src/net/i2p/util/NativeBigInteger.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/src/net/i2p/util/NativeBigInteger.java b/core/java/src/net/i2p/util/NativeBigInteger.java index abe2aac1d..af7a7eb84 100644 --- a/core/java/src/net/i2p/util/NativeBigInteger.java +++ b/core/java/src/net/i2p/util/NativeBigInteger.java @@ -754,6 +754,9 @@ public class NativeBigInteger extends BigInteger { if (sCPUType.equals(JBIGI_OPTIMIZATION_K6_3) && !_isWin) // k62 and k63 identical except on windows sAppend = JBIGI_OPTIMIZATION_K6_2; + else if (sCPUType.equals(JBIGI_OPTIMIZATION_COREI) && (!_is64) && ((_isKFreebsd) || (_isNetbsd) || (_isOpenbsd))) + // corei and core2 are identical on 32bit kfreebsd, openbsd, and netbsd + sAppend = JBIGI_OPTIMIZATION_CORE2; else if (sCPUType.equals(JBIGI_OPTIMIZATION_VIAC32)) // viac32 and pentium3 identical sAppend = JBIGI_OPTIMIZATION_PENTIUM3;