Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] perl-net-ssleay: fix configure
@ 2014-07-14 23:48 Yann E. MORIN
  2014-07-15 17:13 ` Thomas Petazzoni
  2014-07-16  6:15 ` Arnout Vandecappelle
  0 siblings, 2 replies; 10+ messages in thread
From: Yann E. MORIN @ 2014-07-14 23:48 UTC (permalink / raw)
  To: buildroot

From: Francois Perrad <fperrad@gmail.com>

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 same thing to do: not add single quotes
around the definition, and just use what they were provided for
lddlflags.

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
of LDDLFLAGS.

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

See also:
    http://lists.busybox.net/pipermail/buildroot/2014-July/101782.html
and the previous message for even more entertainment. ;-)

Signed-off-by: Francois Perrad <francois.perrad@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
 log]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/perl-net-ssleay/perl-net-ssleay.mk | 5 +++++
 1 file changed, 5 insertions(+)

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
@@ -15,4 +15,9 @@ PERL_NET_SSLEAY_LICENSE_FILES = LICENSE
 # suffers from: don't search for openssl, they pick the host-system one.
 PERL_NET_SSLEAY_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr
 
+define PERL_NET_SSLEAY_FIX_MAKEFILE
+	$(SED) "s/^LDDLFLAGS = '\(.*\)'/LDDLFLAGS = \1/" $(@D)/Makefile
+endef
+PERL_NET_SSLEAY_POST_CONFIGURE_HOOKS += PERL_NET_SSLEAY_FIX_MAKEFILE
+
 $(eval $(perl-package))
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] perl-net-ssleay: fix configure
@ 2014-07-24 18:15 Francois Perrad
  2014-07-24 18:29 ` Yann E. MORIN
  2014-07-24 20:31 ` Thomas Petazzoni
  0 siblings, 2 replies; 10+ messages in thread
From: Francois Perrad @ 2014-07-24 18:15 UTC (permalink / raw)
  To: buildroot

CCFLAGS needs the same replacement as LDDLFAGS

see http://autobuild.buildroot.net/results/299/299d6fa6b2ccf97987ffd9c99130c25dd55ca9b4/

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/perl-net-ssleay/perl-net-ssleay.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/perl-net-ssleay/perl-net-ssleay.mk b/package/perl-net-ssleay/perl-net-ssleay.mk
index 7234d1e..fb9b385 100644
--- a/package/perl-net-ssleay/perl-net-ssleay.mk
+++ b/package/perl-net-ssleay/perl-net-ssleay.mk
@@ -15,9 +15,10 @@ PERL_NET_SSLEAY_LICENSE_FILES = LICENSE
 # suffers from: don't search for openssl, they pick the host-system one.
 PERL_NET_SSLEAY_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr
 
-# Remove problematic single quotes in LDDLFLAGS definition
+# Remove problematic single quotes in LDDLFLAGS & CCFLAGS definition
 define PERL_NET_SSLEAY_FIX_MAKEFILE
 	$(SED) "s/^LDDLFLAGS = '\(.*\)'/LDDLFLAGS = \1/" $(@D)/Makefile
+	$(SED) "s/^CCFLAGS = '\(.*\)'/CCFLAGS = \1/" $(@D)/Makefile
 endef
 PERL_NET_SSLEAY_POST_CONFIGURE_HOOKS += PERL_NET_SSLEAY_FIX_MAKEFILE
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-07-24 20:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-14 23:48 [Buildroot] [PATCH] perl-net-ssleay: fix configure Yann E. MORIN
2014-07-15 17:13 ` Thomas Petazzoni
2014-07-15 17:19   ` Yann E. MORIN
2014-07-16  6:15 ` Arnout Vandecappelle
2014-07-16 17:42   ` François Perrad
2014-07-16 20:07     ` Yann E. MORIN
2014-07-16 20:05   ` Yann E. MORIN
  -- strict thread matches above, loose matches on Subject: below --
2014-07-24 18:15 Francois Perrad
2014-07-24 18:29 ` Yann E. MORIN
2014-07-24 20:31 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox