FS#24767 - [perl] Honor our LDFLAGS everywhere.

Attached to Project: Arch Linux
Opened by Kristoffer Tidemann (ktide) - Saturday, 18 June 2011, 09:06 GMT
Last edited by Angel Velasquez (angvp) - Thursday, 23 June 2011, 21:55 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Francois Charette (Firmicus)
Angel Velasquez (angvp)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Add the following to ./Configure

-Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}"

This works well, all *.so in the perl package seem to follow this including the perl binary. To check if this will break perl packages I built perl-html-parser and perl-xml-parser
and they will use the proper flags too. perl will add everything it needs too anyway so this should be okay for a future rebuilt. You can check these values with perl -V


Some relevant output of ./Configure

What libraries to use?
[-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat] <- By perl
What optimizer/debugger flag should be used?
[-march=native -pipe -Wdisabled-optimization -O2 -D_FORTIFY_SOURCE=2] <- My CFLAGS for perl
Any additional cc flags?
[-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64] <- Added by perl automatically
Let me guess what the preprocessor flags are...
Any additional ld flags (NOT including libraries)?
[-Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common -Wl,-O1 -Wl,-z,relro -fstack-protector -L/usr/local/lib] <- Our -Dldflags, perl adds -fstack-protector and -L/usr/local/lib
Any special flags to pass to /usr/bin/gcc.nat to create a dynamically loaded library? (Note that I use -Dcc=)
[-shared -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common -Wl,-O1 -Wl,-z,relro -L/usr/local/lib -fstack-protector] <- This is -Dlddflags plus perl crap as seen above.
Any special flags to pass to /usr/bin/gcc.nat to use dynamic linking?
[-Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE] <- By perl
This task depends upon

Closed by  Angel Velasquez (angvp)
Thursday, 23 June 2011, 21:55 GMT
Reason for closing:  Implemented
Additional comments about closing:  Applied on perl 5.14.1
Comment by Kristoffer Tidemann (ktide) - Saturday, 18 June 2011, 09:07 GMT
-Dlddflags= should be -Dlddlflags=

Loading...