diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-10-05 17:27:43 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-10-05 17:27:43 +0200 |
commit | 641e2ba64a1d7cbbbe053e6e1f11142fb0774f45 (patch) | |
tree | f2482d7d706efd178f14a69a9d5e632b341d2339 /Porting | |
parent | 5541f5e3812b610fc46c8eb35644f773391a610e (diff) | |
download | perl-641e2ba64a1d7cbbbe053e6e1f11142fb0774f45.tar.gz |
bisect-runner.pl needs to add -L/usr/local/lib prior to 5.002 on FreeBSD.
This may well also be needed on some other platforms, but as it has to be
done in the middle of the Configure run, there isn't a clean cross-platform
way to do it.
With this, FreeBSD will build all extensions back to 5.001n, and miniperl
back to 5.000. I don't think that it's going to be possible to improve on
that (without cheating and using a config.sh imported from the "future").
Diffstat (limited to 'Porting')
-rwxr-xr-x | Porting/bisect-runner.pl | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl index 40a5639af5..5787706536 100755 --- a/Porting/bisect-runner.pl +++ b/Porting/bisect-runner.pl @@ -555,6 +555,49 @@ if ($^O eq 'freebsd') { # the default to cater for the current behaviour. (As strangely, future # versions inherit the current behaviour.) system 'git show blead:hints/freebsd.sh > hints/freebsd.sh' and die; + + if ($major < 2) { + # 5.002 Configure and later have code to + # + # : Try to guess additional flags to pick up local libraries. + # + # which will automatically add --L/usr/local/lib because libpth + # contains /usr/local/lib + # + # Without it, if Configure finds libraries in /usr/local/lib (eg + # libgdbm.so) and adds them to the compiler commandline (as -lgdbm), + # then the link will fail. We can't fix this up in config.sh because + # the link will *also* fail in the test compiles that Configure does + # (eg $inlibc) which makes Configure get all sorts of things + # wrong. :-( So bodge it here. + # + # Possibly other platforms will need something similar. (if they + # have "wanted" libraries in /usr/local/lib, but the compiler + # doesn't default to putting that directory in its link path) + apply_patch(<<'EOPATCH'); +--- perl2/hints/freebsd.sh.orig 2011-10-05 16:44:55.000000000 +0200 ++++ perl2/hints/freebsd.sh 2011-10-05 16:45:52.000000000 +0200 +@@ -125,7 +125,7 @@ + else + libpth="/usr/lib /usr/local/lib" + glibpth="/usr/lib /usr/local/lib" +- ldflags="-Wl,-E " ++ ldflags="-Wl,-E -L/usr/local/lib " + lddlflags="-shared " + fi + cccdlflags='-DPIC -fPIC' +@@ -133,7 +133,7 @@ + *) + libpth="/usr/lib /usr/local/lib" + glibpth="/usr/lib /usr/local/lib" +- ldflags="-Wl,-E " ++ ldflags="-Wl,-E -L/usr/local/lib " + lddlflags="-shared " + cccdlflags='-DPIC -fPIC' + ;; + +EOPATCH + } } # if Encode is not needed for the test, you can speed up the bisect by |