Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2, 2/2] package/edid-decode: fix build with gcc <= 5
Date: Sat, 6 Jun 2020 21:44:48 +0200	[thread overview]
Message-ID: <20200606214449.39fc4e02@gmx.net> (raw)
In-Reply-To: <20200606122810.2745801-2-fontaine.fabrice@gmail.com>

Hello Fabrice,

On Sat,  6 Jun 2020 14:28:10 +0200, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Pass -std=c++11 to fix the following build failure with gcc <= 5:
>
> /tmp/instance-0/output-1/host/bin/mips64el-linux-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os       -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -g -DSHA="not available" -o edid-decode edid-decode.cpp parse-base-block.cpp parse-cta-block.cpp parse-displayid-block.cpp parse-ls-ext-block.cpp parse-di-ext-block.cpp parse-vtb-ext-block.cpp -lm
> edid-decode.cpp: In member function 'std::__cxx11::string edid_state::dtd_type()':
> edid-decode.cpp:192:17: error: 'to_string' is not a member of 'std'
>   unsigned len = std::to_string(preparse_total_dtds).length();
>                  ^
>
> Also add a dependency on gcc 4.7
>
> Fixes:
>  - http://autobuild.buildroot.org/results/71e4a50542c4551797f1d0404d27244612b427d7
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2 (after review of Peter Seiderer):
>  - Add dependency on gcc 4.7
>
>  package/edid-decode/Config.in      | 6 ++++--
>  package/edid-decode/edid-decode.mk | 2 +-
>  2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/package/edid-decode/Config.in b/package/edid-decode/Config.in
> index d2d21288de..ddf1942c68 100644
> --- a/package/edid-decode/Config.in
> +++ b/package/edid-decode/Config.in
> @@ -1,10 +1,12 @@
>  config BR2_PACKAGE_EDID_DECODE
>  	bool "edid-decode"
>  	depends on BR2_INSTALL_LIBSTDCPP
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11
>  	help
>  	  Decode EDID data in human-readable format.
>
>  	  https://git.linuxtv.org/edid-decode.git/
>
> -comment "edid-decode needs a toolchain w/ C++"
> -	depends on !!BR2_INSTALL_LIBSTDCPP
> +comment "edid-decode needs a toolchain w/ C++, gcc >= 4.7"
> +	depends on !!BR2_INSTALL_LIBSTDCPP || \
> +		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
> diff --git a/package/edid-decode/edid-decode.mk b/package/edid-decode/edid-decode.mk
> index c41a9f2a76..7e463c02b1 100644
> --- a/package/edid-decode/edid-decode.mk
> +++ b/package/edid-decode/edid-decode.mk
> @@ -11,7 +11,7 @@ EDID_DECODE_LICENSE_FILES = LICENSE
>
>  define EDID_DECODE_BUILD_CMDS
>  	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
> -		CFLAGS="$(TARGET_CXXFLAGS)"
> +		CFLAGS="$(TARGET_CXXFLAGS) -std=c++11"
>  endef
>
>  define EDID_DECODE_INSTALL_TARGET_CMDS

Reviewed-by: Peter Seiderer <ps.report@gmx.net>

Regards,
Peter

  reply	other threads:[~2020-06-06 19:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-06 12:28 [Buildroot] [PATCH v2, 1/2] package/edid-decode: use TARGET_CONFIGURE_OPTS Fabrice Fontaine
2020-06-06 12:28 ` [Buildroot] [PATCH v2, 2/2] package/edid-decode: fix build with gcc <= 5 Fabrice Fontaine
2020-06-06 19:44   ` Peter Seiderer [this message]
2020-06-06 19:41 ` [Buildroot] [PATCH v2, 1/2] package/edid-decode: use TARGET_CONFIGURE_OPTS Peter Seiderer

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=20200606214449.39fc4e02@gmx.net \
    --to=ps.report@gmx.net \
    --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