|Bill Allombert on Sat, 05 Sep 2009 10:36:49 +0200|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: [PATCH] Dynamic Linking fixes for NetBSD/amd64|
On Sat, Sep 05, 2009 at 04:54:24AM +0200, Lorenz Minder wrote: > Hi Bill, > > BA: > > On Thu, Sep 03, 2009 at 08:16:17AM +0200, Lorenz Minder wrote: > > > Hi, > > > > > > I need the following patches to build and run PARI on NetBSD/amd64 with > > > dynamic libraries. The first one sets the -fPIC flag on compile, the > > > > Hello Lorenz, > > Your first part of your patch looks wrong somehow, as if you were working > > around some breakage of Configure. What does config/arch-osname report on > > this > > machine ? For example, -fPIC should be already set if arch-osname report > > this > > is a 64bit x86_64 machine. > > I think you're right. The problem is that on NetBSD that architecture is > reported as "amd64", not "x86_64". I have attached a modified patch. Actually the fix is to change arch-osname to report x86_64-netbsd. Please try SVN revision at least 11897. > > > second patch makes it possible to specify additional DLLDFLAGS on the > > > command line to ./Configure. This is useful because NetBSD's packages > > > are by default stored in /usr/pkg, and the dynamic linker does not know > > > about that location; so you want to supply an -rpath option to link > > > against GMP or readline (unless you compile those by hand as well). I also committed this part of the patch, though I am not sure it is necessary for your purpose: when you do 'make install', the Makefile automatically add a rpath to gp for libpari.so, thought of course it might be different from the path for readline and gmp. > Another minor problem on NetBSD is that some times reported by 'make > bench' are negative, see the attached bench_out file. Yes this is strange, but we are measuring very small time now. (A long time ago make bench could run for more than 15 minutes). Have a look at the file src/test/dotest if you want. Cheers, Bill.