Bill Allombert on Wed, 12 Mar 2003 16:05:54 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: 2 recent changes - Mac OS X check |
On Tue, Mar 11, 2003 at 04:36:41PM -0800, Justin Walker wrote: > Now, if we could just build dynamic :-} Please find the port of the patch to the new pari tree attached. Some part are merged in the CVS. Darwin man pages are available at <http://www.freebsd.org/cgi/man.cgi> Choose 'Darwin 1.3 PPC' in the system menu. The current issues: 1) I do not know what is the equivalent of runpath. This is likely to make 'make bench' report BUG for the gp-dyn binary even if it performs correctly after make install. Maybe make bench will succeed after 'make install'. 2) Darwin use version.dylib instead of so.version. Unfortunately the current Makefile system have no support for such naming scheme. 3) It is not clear whether the options are for gcc or ld. I suspect my patch to do the wrong thing, but since I cannot test, I have not changed that. 4) I do not know what are the *correct* options to build a shared library. 5) It is not clear whether gp2c-run will work correctly. Cheers, Bill.
? config/a.out ? config/darwin-ppc-rlv28685 Index: config/get_dlld =================================================================== RCS file: /home/megrez/cvsroot/pari/config/get_dlld,v retrieving revision 1.23 diff -u -r1.23 get_dlld --- config/get_dlld 2003/03/11 23:12:33 1.23 +++ config/get_dlld 2003/03/12 15:04:58 @@ -14,6 +14,15 @@ pari) sodest=.$version.$patch;; # released version *) sodest=.$patch.0.0;; # unstable version esac ;; + darwin-*) + case $libpari_base in + pari) sodest=".$version.$patch.dylib";; # released versions + *) sodest=".$patch.0.0.dylib";; # unstable versions + esac ; + soname=".$soname_num.dylib"; + DLSUFFIX=''; + ;; + sunos-*) sodest=.$VersionMajor$VersionMinor.$patch soname=$sodest;; hpux-*) soname= ; sodest= ; DLSUFFIX=sl;; @@ -66,6 +75,11 @@ osf1) DLLDFLAGS='-shared' ;; sunos) DLLDFLAGS='-assert nodefinitions' ;; solaris) DLLDFLAGS="-G -h \$(LIBPARI_SONAME)" ;; + darwin) + case $libpari_base in + pari) DLLDFLAGS="-dynamiclib -install_name \$(LIBDIR)/\$(LIBPARI_SONAME) -compatibility_version $version -current_version $pari_release";; + *) DLLDFLAGS="-dynamiclib -install_name \$(LIBDIR)/\$(LIBPARI_SONAME) -compatibility_version $pari_release -current_version $pari_release";; + esac ;; os2) ;; # see below *) DLLD=;; esac Index: config/get_ld =================================================================== RCS file: /home/megrez/cvsroot/pari/config/get_ld,v retrieving revision 1.17 diff -u -r1.17 get_ld --- config/get_ld 2003/02/27 00:35:24 1.17 +++ config/get_ld 2003/03/12 15:04:58 @@ -52,6 +52,7 @@ case "$osname" in osf1|linux|cygwin*|freebsd) runpathprefix='-rpath ' ;; + darwin) runpathprefix='';; solaris) runpathprefix='-R ' ;; hpux) runpathprefix='+b ' ;; aix) runpathprefix='-blibpath:' ;;