Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] core: add option to force compiling C++ as C++11
Date: Thu, 26 Nov 2015 17:51:15 +0100	[thread overview]
Message-ID: <20151126175115.58c84720@free-electrons.com> (raw)
In-Reply-To: <1448549404-11670-1-git-send-email-agalakhov@gmail.com>

Dear Alexey Galakhov,

On Thu, 26 Nov 2015 15:50:04 +0100, Alexey Galakhov wrote:
> Many C++ libraries like boost and log4cplus use defines to be compatible with
> both C++03 and C++11 standards. This causes ABI incompatibilities between
> a library built with C++03 and an application built with C++11. To avoid this,
> one has to built libraries as C++11 as well.

I am not familiar with C++ issues, can you give some more details and
specific examples here ?

> +config BR2_ENABLE_CPP11
> +	bool "force C++11 when building libraries"
> +	default n
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
> +	help
> +	  Force building of C++ libraries in C++11 mode.
> +
> +	  Some C++ libraries (i.e. boost) behave differently if compiled with
> +	  and without --std=c++11 flag. They define classes differently. This
> +	  causes linker errors while trying to use such a library in a C++11
> +	  project.
> +
> +	  This option forces building of all such libraries in C++11 mode.
> +	  Enable it if you encounter C++11-related linker errors.

I don't think it is appropriate for Buildroot to have an option to be
enabled "if you encounter <foo> errors". If there is a problem, it
should be fixed properly, without having to rely on the user enabling
(or not enabling) a given option.

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

  reply	other threads:[~2015-11-26 16:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 14:50 [Buildroot] [PATCH 1/1] core: add option to force compiling C++ as C++11 Alexey Galakhov
2015-11-26 16:51 ` Thomas Petazzoni [this message]
2015-11-26 20:43   ` Alexey Galakhov
2015-11-28  0:24     ` Arnout Vandecappelle
2015-11-28 11:06       ` Alexey Galakhov
2015-11-28  0:33 ` Arnout Vandecappelle

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=20151126175115.58c84720@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox