Phil Carmody on Sun, 26 Oct 2003 00:09:52 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Building on Alpha


--- Bill Allombert <allomber@math.u-bordeaux.fr> wrote:
> On Sat, Oct 25, 2003 at 09:05:07AM -0700, Phil Carmody wrote:
> > ld complains "gp-relative relocation against dynamic symbol" when trying to
> > build the .so. I believe this means that the library should have been
> compiled
> > with -fpic
> 
> Glibc 2.3 on alpha require dynamic libraries to be compiled with -fPIC.
> This was not the case for Glibc 2.2
> 
> > Does this mean config/get_cc should be changed?
> 
> Yes and in fact I believe -fPIC should be the default outside x86, since
> on other platform either 1) it breaks or 2) there is no slow down.
> 
> The problem is that libpari.a should not be compiled with -fPIC,
> unless we are in case 2) above where it is free.
> 
> There is very few arch/os which support non PIC libraries.


Merci Bill! 
I'm building fine now.
Pretty minimal patch submitted with the caveat that I don't really know what
I'm doing.

I simply added *-alpha to the list of $osname-$arch'es that need -fPIC:

paricvs@megaspaz:~/pari/config$ cvs diff
cvs server: Diffing .
Index: get_cc
===================================================================
RCS file: /home/megrez/cvsroot/pari/config/get_cc,v
retrieving revision 1.22
diff -c -r1.22 get_cc
*** get_cc      21 Oct 2003 16:41:54 -0000      1.22
--- get_cc      25 Oct 2003 21:38:33 -0000
***************
*** 119,125 ****
    DBGFLAGS=${DBGFLAGS:-"-g $warn"}
    # Some architectures need -fPIC for building dynamic lib
    case "$osname-$arch" in
!     hpux-*|*-ia64) DLCFLAGS=-fPIC ;;
      darwin-*) DLCFLAGS=-fno-common;;
    esac
    # Specific optimisations for some architectures
--- 119,125 ----
    DBGFLAGS=${DBGFLAGS:-"-g $warn"}
    # Some architectures need -fPIC for building dynamic lib
    case "$osname-$arch" in
!     hpux-*|*-ia64|*-alpha) DLCFLAGS=-fPIC ;;
      darwin-*) DLCFLAGS=-fno-common;;
    esac
    # Specific optimisations for some architectures



Phil

=====
When inserting a CD, hold down shift to stop the AutoRun feature
In the Device Manager, disable the SbcpHid device.
http://www.cs.princeton.edu/~jhalderm/cd3/

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com