All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [git commit] czmq: unbreak static linking
Date: Tue, 12 May 2015 21:00:11 +0200	[thread overview]
Message-ID: <20150512210011.4ed7af1d@free-electrons.com> (raw)
In-Reply-To: <20150512184711.BDF2381DA3@busybox.osuosl.org>

Dear Peter Korsgaard,

On Tue, 12 May 2015 20:43:12 +0200, Peter Korsgaard wrote:
> commit: http://git.buildroot.net/buildroot/commit/?id=aa5254f1a2bc0ea3181d51990c18681b3071b9db
> branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
> 
> Fixes:
> http://autobuild.buildroot.net/results/faf/faf0bb00fccb1350afaef55f6cf14c11a5f5dc3c/
> http://autobuild.buildroot.net/results/8d2/8d279baa4c8bffbb01f897119092c7b736942df4/
> http://autobuild.buildroot.net/results/4d3/4d3dea604da9a5a1e7fe20548813f8de474ae33f/
> http://autobuild.buildroot.net/results/fd6/fd602617839817352763e51754553960b7f795ac/
> 
> And many more.
> 
> Zeromq uses C++, but czmq forgets to explicitly link with libstdc++
> (or use g++ to link), breaking static linking.
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
>  package/czmq/czmq.mk |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/package/czmq/czmq.mk b/package/czmq/czmq.mk
> index d25bf01..789e700 100644
> --- a/package/czmq/czmq.mk
> +++ b/package/czmq/czmq.mk
> @@ -18,6 +18,12 @@ CZMQ_LICENSE_FILES = LICENSE
>  # host-python, so disable asciidoc entirely.
>  CZMQ_CONF_ENV = ac_cv_prog_czmq_have_asciidoc=no
>  
> +# zeromq uses C++, but czmq forgets to explicitly link with libstdc++
> +# (or use g++ to link), breaking static linking.
> +ifeq ($(BR2_STATIC_LIBS),y)
> +CZMQ_CONF_ENV += LIBS='-lstdc++'
> +endif

I continue to remain unhappy with such changes. There are two options
here:

 * Either using gcc to link with a C++ library is incorrect, and czmq
   should be fixed to use g++.

 * Or using gcc to link with a C++ library is correct, and in this
   case, libzmq.pc should be fixed to include -lstdc++ in Libs.private.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-05-12 19:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12 18:43 [Buildroot] [git commit] czmq: unbreak static linking Peter Korsgaard
2015-05-12 19:00 ` Thomas Petazzoni [this message]
2015-05-12 19:30   ` Peter Korsgaard
2015-05-12 20:34     ` Thomas Petazzoni
2015-05-12 22:02       ` Peter Korsgaard
2015-05-13  5:44         ` Lionel Orry
2015-05-13  7:19           ` Peter Korsgaard
2015-05-13  7:23             ` Thomas Petazzoni
2015-05-13  7:57               ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150512210011.4ed7af1d@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.