[Buildroot] [git commit] perl-net-ssleay: fix configure

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Jul 15 17:12:03 UTC 2014

commit: http://git.buildroot.net/buildroot/commit/?id=95074ee8d2d8a901d7e5a3043659b4011a069c8e
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

When TARGET_LDFLAGS contains more than one option, the generated
Makefile contains this definition of LDDLFLAGS:
        LDDLFLAGS = '--option-1 --option-2'

Which when passed to gcc is interpreted as a single option, and gcc
(rightfully) barfs on it, like with:
        arm-linux-gnueabihf-gcc: error: unrecognized command line
        option ‘-shared -g’

This is because perl-net-ssleay's buildsystem is really completely
brain-damaged. Other perl extensions do not behave like that, and
instead are doing the only sane thing to do: not add single quotes
around the definition, and just use what they were provided for

So, just do the same for perl-net-ssleay. Since tweaking (yet once
more) their buildsystem is too complex, we just use a post-configure
hook to fix up the mess, by removing single quotes around the definition

Note: if only one option is specified, no single quotes are added,
but our hook is a no-op in this case.

See also:
and the previous message for even more entertainment. ;-)

Signed-off-by: Francois Perrad <francois.perrad at gadz.org>
[me: find the real cause of the issue, tweak the sed expression to not
 force -shared and instead just trim the single quotes, enhance commit
[Thomas: fix minor typos in the commit log, add comment above hook
Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
 package/perl-net-ssleay/perl-net-ssleay.mk |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/package/perl-net-ssleay/perl-net-ssleay.mk b/package/perl-net-ssleay/perl-net-ssleay.mk
index 4a362fb..6b21eb2 100644
--- a/package/perl-net-ssleay/perl-net-ssleay.mk
+++ b/package/perl-net-ssleay/perl-net-ssleay.mk
 # suffers from: don't search for openssl, they pick the host-system one.
+	$(SED) "s/^LDDLFLAGS = '\(.*\)'/LDDLFLAGS = \1/" $(@D)/Makefile
 $(eval $(perl-package))

More information about the buildroot mailing list