diff options
author | Francois Perrad <fperrad@gmail.com> | 2014-07-13 15:03:22 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-07-14 13:08:40 +0200 |
commit | 200ac4862a882cfd3e4edfd1868652c2985215e7 (patch) | |
tree | f698069c0a699bc5ecb0a5621e83d80c99f82d37 /package/perl-net-ssleay/perl-net-ssleay-0000-fix-build-system.patch | |
parent | 734b34f520ab0a14a9c54341e32bd067058b7996 (diff) | |
download | buildroot-200ac4862a882cfd3e4edfd1868652c2985215e7.tar.gz buildroot-200ac4862a882cfd3e4edfd1868652c2985215e7.zip |
package/perl-net-ssleay: fix buildsystem for cross-compilation
The buildsystem for perl-net-ssleay is totally brain-damaged: it tries
to execute the openssl program. It uses that to check the openssl
version, detect the prefix to openssl, and set the include and library
search paths.
Of course, it does not handle the destdir idiom, so it ends up finding
the host system's openssl (not even ours!), so it sets search paths to
/usr/inlcude and /usr/lib and /lib.
Well, guess what? It does not work.
Fix that by:
- passing the prefix to openssl in the environment, so it does not go
hunting for the host-system openssl;
- not checking the version string, since we can't run, and Buildroot
has the correct version anyway;
- not setting any -I or -L paths since our compiler/linker already
know where to look for for includes and libs.
Fixes:
http://autobuild.buildroot.net/results/135/135867ef85535863e3647cc5fb82accb6f77612c/
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
[me: enhance commit log, add patch to avoid running openssl and setting
wrong include and library search paths]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/perl-net-ssleay/perl-net-ssleay-0000-fix-build-system.patch')
-rw-r--r-- | package/perl-net-ssleay/perl-net-ssleay-0000-fix-build-system.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/package/perl-net-ssleay/perl-net-ssleay-0000-fix-build-system.patch b/package/perl-net-ssleay/perl-net-ssleay-0000-fix-build-system.patch new file mode 100644 index 0000000000..a6cd0f9ceb --- /dev/null +++ b/package/perl-net-ssleay/perl-net-ssleay-0000-fix-build-system.patch @@ -0,0 +1,36 @@ +buildsystem: fix for cross-compilation + +Avoid running the openssl binary, since it would break for +cross-compilation. Buildroot has a supported version, anyway. + +Also, avoid adding hard-coded includes and libraries search +paths, since they are missing the destdir; Buildroot compilers +and linkers already know where to search, anyway. + +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> + +diff -durN perl-net-ssleay-1.64.orig/inc/Module/Install/PRIVATE/Net/SSLeay.pm perl-net-ssleay-1.64/inc/Module/Install/PRIVATE/Net/SSLeay.pm +--- perl-net-ssleay-1.64.orig/inc/Module/Install/PRIVATE/Net/SSLeay.pm 2014-04-01 08:08:37.000000000 +0200 ++++ perl-net-ssleay-1.64/inc/Module/Install/PRIVATE/Net/SSLeay.pm 2014-07-13 00:38:46.281380282 +0200 +@@ -37,14 +37,18 @@ + exit 0; # according http://wiki.cpantesters.org/wiki/CPANAuthorNotes this is best-practice when "missing library" + } + +- $self->check_openssl_version($prefix, $exec); ++# Does not work for cross-compilation. ++# In Buildroot, we do have a supported version. ++# $self->check_openssl_version($prefix, $exec); + my $opts = $self->ssleay_get_build_opts($prefix, $exec); + + $self->makemaker_args( + CCCDLFLAGS => $opts->{cccdlflags}, + OPTIMIZE => $opts->{optimize}, +- INC => join(' ', map {"-I$_"} @{$opts->{inc_paths}}), +- LIBS => join(' ', (map {"-L$_"} @{$opts->{lib_paths}}), (map {"-l$_"} @{$opts->{lib_links}})), ++# Buildroot already has the correct include and library search paths. ++# INC => join(' ', map {"-I$_"} @{$opts->{inc_paths}}), ++# LIBS => join(' ', (map {"-L$_"} @{$opts->{lib_paths}}), (map {"-l$_"} @{$opts->{lib_links}})), ++ LIBS => join(' ', (map {"-l$_"} @{$opts->{lib_links}})), + ); + + if ( $self->prompt( |