Author: nextgens
Date: 2006-01-31 12:34:41 +0000 (Tue, 31 Jan 2006)
New Revision: 7968
Added:
trunk/contrib/NativeBigInteger/lib/net/i2p/util/libjbigi-linux-x86_64.so
Modified:
trunk/contrib/NativeBigInteger/build.sh
trunk/contrib/NativeBigInteger/build_jbigi.sh
trunk/contrib/jcpuid/build.sh
trunk/contrib/jcpuid/lib/freenet/support/CPUInformation/libjcpuid-x86-linux.so
Log:
Pre x86_64 support ; ATM there is at least one remaining issue : jcpuid
doesn\'t build staticly
Modified: trunk/contrib/NativeBigInteger/build.sh
===================================================================
--- trunk/contrib/NativeBigInteger/build.sh 2006-01-31 02:08:01 UTC (rev
7967)
+++ trunk/contrib/NativeBigInteger/build.sh 2006-01-31 12:34:41 UTC (rev
7968)
@@ -29,6 +29,13 @@
;;
esac
+# We need -fPIC on x86_64
+if [[ $(uname -m) == "x86_64" ]]
+then
+ export CFLAGS="-fPIC"
+fi
+
+
# Don't extract gmp if it's already been done
if [ ! -d gmp-${GMP_VERSION} ]
@@ -55,11 +62,8 @@
#
# "none" = a generic build with no specific CPU type indicated to the
# compiler
-#
-# TODO: add build for athlon64 (requires some conditional tests, as 64-bit
-# code cannot be built on 32-bit platforms, as well as some patches for gmp)
-for CPU in none pentium pentiummmx pentium2 pentium3 pentium4 k6 k62 k63 athlon
+for CPU in none pentium pentiummmx pentium2 pentium3 pentium4 k6 k62 k63
athlon x86_64
do
mkdir -p bin/${CPU}
cd bin/${CPU}
@@ -76,7 +80,7 @@
echo "Building statically linked jbigi library for ${CPU}..."
- ../../build_jbigi.sh static
+ sh ../../build_jbigi.sh static
# Copy library to its final location with CPU-specific name
Modified: trunk/contrib/NativeBigInteger/build_jbigi.sh
===================================================================
--- trunk/contrib/NativeBigInteger/build_jbigi.sh 2006-01-31 02:08:01 UTC
(rev 7967)
+++ trunk/contrib/NativeBigInteger/build_jbigi.sh 2006-01-31 12:34:41 UTC
(rev 7968)
@@ -27,7 +27,7 @@
#To link dynamically to GMP (use libgmp.so or gmp.lib), uncomment the first
line below
#To link statically to GMP, uncomment the second line below
-if test $1 = "dynamic"
+if [[ $1 == "dynamic" ]]
then
echo "Building jbigi lib that is dynamically linked to GMP"
LIBPATH="-L.libs"
Added: trunk/contrib/NativeBigInteger/lib/net/i2p/util/libjbigi-linux-x86_64.so
===================================================================
(Binary files differ)
Property changes on:
trunk/contrib/NativeBigInteger/lib/net/i2p/util/libjbigi-linux-x86_64.so
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/contrib/jcpuid/build.sh
===================================================================
--- trunk/contrib/jcpuid/build.sh 2006-01-31 02:08:01 UTC (rev 7967)
+++ trunk/contrib/jcpuid/build.sh 2006-01-31 12:34:41 UTC (rev 7968)
@@ -23,14 +23,14 @@
# platform-independent variables
SRC="src/jcpuid.cpp"
OBJDIR="lib/freenet/support/CPUInformation"
-CXXFLAGS="-shared -static -static-libgcc"
+CXXFLAGS="-shared -static-libgcc -fPIC"
# determine the operating system and machine type
OS="$(uname -s|tr "[A-Z]" "[a-z]")" # convert any uppercase to lowercase
ARCH=$(uname -m)
# amd64 machine type requires an additional compiler flag to build successfully
-[ "${ARCH}" = "amd64" ] && CXXFLAGS="${CXXFLAGS} -fPIC"
+[ "${ARCH}" = "x86_64" ] && CXXFLAGS="-shared -static-libgcc -fPIC"
# OK, now we can generate our object file's name and the proper include paths
OBJ="libjcpuid-x86-${OS}.so"
Modified:
trunk/contrib/jcpuid/lib/freenet/support/CPUInformation/libjcpuid-x86-linux.so
===================================================================
(Binary files differ)