Re: PL/Perl without shared libperl.a - Mailing list pgsql-general

From Ian Lance Taylor
Subject Re: PL/Perl without shared libperl.a
Date
Msg-id sin18jwzcf.fsf@daffy.airs.com
Whole thread Raw
In response to Re: PL/Perl without shared libperl.a  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PL/Perl without shared libperl.a  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> writes:

> > I'm happy enough to build a special libperl.a for postgresql's use, but
> > I don't want my general perl build to use it since perl's documentation
> > notes a significant performance hit when using a shared libperl.
>
> That advice is doubtless platform-specific, and I think it may well be
> horsepucky for Intel-based Linux.  Isn't *all* code built
> position-independent on that platform?

No.

> I believe you could actually use a non-shared libperl.a on Intel Linux;
> just dike out the test for shared-ness in plperl's Makefile.PL.
> The reason it's there is we couldn't think of a direct test for
> position-independent code, which is the real requirement...

I don't have context, so I'm not sure why that would be the real
requirement.  Position independent code is a mechanism to make shared
libraries more efficient.  Most ELF systems support creating shared
libraries with position dependent code.  It's just less efficient.

It's possible to test whether you can build a shared library with
position dependent code, if that is of interest.  The GNU binutils
linker testsuite has such a test.

Ian

pgsql-general by date:

Previous
From: fabrizio.ermini@sysdat.it
Date:
Subject: Re: Whait is the $PGDATA/data/pg_log file use for?
Next
From: Ed Loehr
Date:
Subject: name truncation problem in 7.0.0