Re: Compiling PL/Perl and Pl/Python on x86_64

From: Theo Schlossnagle <jesus(at)omniti(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: imacat <imacat(at)pristine(dot)com(dot)tw>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Compiling PL/Perl and Pl/Python on x86_64
Date: 2006-05-22 20:44:07
Message-ID: 44722297.30502@omniti.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-05-22 21:29:17 Re: autovacuum "connections" are hidden
Previous Message Bruce Momjian 2006-05-22 20:39:26 Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS