| Bill Allombert on Tue, 27 Jan 2004 20:31:22 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Patch for shared libpari on GNU/Hurd |
Hello PARI-dev, Here a patch (well, two really: 1 for the stable release and one for the development release) that let PARI build a shared library under GNU/Hurd. You will note that the CVS patch is much smaller than the patch against stable, which is a good thing. Cheers, Bill.
diff -ru pari/config/arch-osname pari-new/config/arch-osname
--- pari/config/arch-osname 2003-10-15 14:34:29.000000000 +0200
+++ pari-new/config/arch-osname 2004-01-27 18:32:46.000000000 +0100
@@ -52,6 +52,8 @@
sun4u) arch=sparcv9;;
i*pc) arch=ix86;;
esac;;
+ gnu) arch=`uname -m`;
+ case $arch in i386-*) arch=i386;;esac;;
esac
fi
echo $arch-$osname
diff -ru pari/config/get_dlld pari-new/config/get_dlld
--- pari/config/get_dlld 2003-11-29 21:13:02.000000000 +0100
+++ pari-new/config/get_dlld 2004-01-27 18:34:36.000000000 +0100
@@ -9,7 +9,7 @@
soname=.$soname_num
do_dll=yes
case "$osname" in
- aix|osf1|solaris|linux|freebsd)
+ gnu|aix|osf1|solaris|linux|freebsd)
case $libpari_base in
pari) sodest=.$version.$patch;; # released version
*) sodest=.$patch.0.0;; # unstable version
Index: Configure
===================================================================
RCS file: /home/cvs/pari/Configure,v
retrieving revision 1.25.2.16
diff -u -r1.25.2.16 Configure
--- Configure 3 Apr 2003 13:33:08 -0000 1.25.2.16
+++ Configure 27 Jan 2004 19:22:06 -0000
@@ -326,7 +326,7 @@
# Modifications for pretty name and asm file
#
case "$osname" in
- nextstep|cygwin*|linux|freebsd|os2)
+ nextstep|cygwin*|linux|freebsd|os2|gnu)
pretty="$pretty running $osname";
if test "$arch" = m68k; then asmarch=none; fi ;;
esac
@@ -959,7 +959,7 @@
darwin) LIBS= ;;
esac
case "$osname-$arch" in
- linux-*|cygwin*)
+ linux-*|cygwin*|gnu-*)
LD=$CC; LDFLAGS="$cflags -Xlinker -export-dynamic"
runpathprefix='-Xlinker -rpath -Xlinker ';;
osf1-alpha)
@@ -1006,7 +1006,7 @@
# aix-*) DLSUFFIX=a ;; dynamic linking does not work!
sunos-*) sodest=$VersionMajor$VersionMinor.$patch
soname=$sodest;;
- *-alpha|solaris-*|linux-*|freebsd-*)
+ gnu-*|*-alpha|solaris-*|linux-*|freebsd-*)
case $libpari_base in
pari) sodest=$version.$patch;; # released versions
*) sodest=$patch.0.0;; # unstable versions
@@ -1042,7 +1042,7 @@
aix-*) DLLDFLAGS="-r" ;;
hpux-*) DLLDFLAGS="-b -E" ;;
freebsd-*) DLLDFLAGS="-Bshareable -x" ;;
- linux-*) DLLDFLAGS="-shared -soname \$(LIBPARI_SONAME)" ;;
+ gnu-*|linux-*) DLLDFLAGS="-shared -soname \$(LIBPARI_SONAME)" ;;
irix-*) DLLDFLAGS="-shared -elf -no_unresolved -all" ;;
*-alpha) DLLDFLAGS="-shared"; EXTRADLLDFLAGS='${LIBS}'
case "$optimization" in
Index: config/arch-osname
===================================================================
RCS file: /home/cvs/pari/config/arch-osname,v
retrieving revision 1.2.2.1
diff -u -r1.2.2.1 arch-osname
--- config/arch-osname 1 Apr 2001 22:10:23 -0000 1.2.2.1
+++ config/arch-osname 27 Jan 2004 19:22:06 -0000
@@ -45,6 +45,8 @@
i*pc) arch=ix86;;
*) case "$4" in sun) arch=m68k;; esac;;
esac;;
+ gnu) arch=`uname -m`;
+ case $arch in i386-*) arch=i386;;esac;;
esac
fi
echo $arch-$osname