Re: Compiling PL/Perl and Pl/Python on x86_64 - Mailing list pgsql-hackers

From Theo Schlossnagle
Subject Re: Compiling PL/Perl and Pl/Python on x86_64
Date
Msg-id 44722297.30502@omniti.com
Whole thread Raw
In response to Re: Compiling PL/Perl and Pl/Python on x86_64  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan wrote:

> imacat wrote:
>
>>     But, on my i386 machine, I can build PL/Perl with static library
>> (libperl.a).  But I can't do that on x86_64 anymore.  Can somebody tell
>> me why, or where should I referring to?
>>   
>
>
> Why do you want to do this? It works perfectly well with a shared lib, 
> and is probably more memory efficient and faster to load.

I assume this is for the performance gains that can be seen by loading 
non-PIC code over PIC code.  However, this is not an option on x86_64.  
Dynamically loaded code must be compiled with PIC on pretty much every 
platform except 32-bit intel.

The bigger puzzle is why you could link against non-PIC code in shared 
objects on 32-bit x86.  (I know the answer, but it has no real merit).  
If you want things dynamically loadable, they must be PIC.

-- 
// Theo Schlossnagle
// Principal Engineer -- http://www.omniti.com/~jesus/
// Ecelerity: Run with it. -- http://www.omniti.com/



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: error-free disabling of individual child partition
Next
From: Alvaro Herrera
Date:
Subject: Re: [GENERAL] autovacuum "connections" are hidden