Opened 19 years ago
Closed 19 years ago
#87 closed defect (fixed)
Perl and -fPIC
| Reported by: | Joe Ciccone | Owned by: | |
|---|---|---|---|
| Priority: | critical | Milestone: | CLFS Standard 1.0.0 |
| Component: | BOOK | Version: | CLFS Standard 1.0.0 |
| Keywords: | perl fPIC DynaLoader | Cc: |
Description
Programs like xchat and gaim can't build their perl plugins (as shared libraries) because the DynaLoader.a library provided by perl is not linked with -fPIC.
This patch makes it so that the objects in DynaLoader.a are built with -fPIC. http://cross-lfs.org/~jciccone/perl-5.8.8-fPIC-1.patch
I'd like to see this go into the book before RC4.
Change History (5)
comment:1 by , 19 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:2 by , 19 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
From backscrolling through IRC, saw issues...
This fix was in the cross-lfs scripts for getting perl to build properly with -fPIC
# if not creating a shared libperl (ie useshrplib not true), still use pic
sed -i -e "s@pldlflags=''@pldlflags=\"\$cccdlflags\"@g" \
-e "s@static_target='static'@static_target='static_pic'@g" \
Makefile.SH
Should properly fix the issue (at least it did between perl 5.8.5, 5.8.6 ...)
comment:3 by , 19 years ago
Adding -Duseshrplib will do the same as you thought and build a libperl.so. I'd rather use -Duseshrplib instead of the sed.
comment:4 by , 19 years ago
sed works regardless of shared or static build, always. Note perl advisories concerning use of shared perl.

Added in r2368.