* [Buildroot] [PATCH 1/2] package/edid-decode: use TARGET_CONFIGURE_OPTS @ 2020-06-06 9:19 Fabrice Fontaine 2020-06-06 9:19 ` [Buildroot] [PATCH 2/2] package/edid-decode: fix build with gcc <= 5 Fabrice Fontaine 2020-06-06 11:20 ` [Buildroot] [PATCH 1/2] package/edid-decode: use TARGET_CONFIGURE_OPTS Peter Seiderer 0 siblings, 2 replies; 6+ messages in thread From: Fabrice Fontaine @ 2020-06-06 9:19 UTC (permalink / raw) To: buildroot Do not use CXX to save the "$(TARGET_CXX) $(TARGET_CXXFLAGS) $(TARGET_LDFLAGS)" tuple and instead use TARGET_CONFIGURE_OPTS to pass variables using the "standard" variables LDFLAGS is supported since https://git.linuxtv.org/edid-decode.git/commit/?id=0a454bcbba5e172c64236811ed98c161689372f1 CFLAGS is supported since https://git.linuxtv.org/edid-decode.git/commit/?id=b202b675e38578b33494fc45c2869917e66ba22d edid-decode did not switch CFLAGS to CXXFLAGS in https://git.linuxtv.org/edid-decode.git/commit/Makefile?id=e00579c128ced87a69df29a01caaaf0cd4a4c8cc so use CFLAGS to pass TARGET_CXXFLAGS Fixes: - http://autobuild.buildroot.org/results/71e4a50542c4551797f1d0404d27244612b427d7 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- package/edid-decode/edid-decode.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/edid-decode/edid-decode.mk b/package/edid-decode/edid-decode.mk index 8fe1e2712a..c41a9f2a76 100644 --- a/package/edid-decode/edid-decode.mk +++ b/package/edid-decode/edid-decode.mk @@ -10,12 +10,13 @@ EDID_DECODE_LICENSE = MIT EDID_DECODE_LICENSE_FILES = LICENSE define EDID_DECODE_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ - CXX="$(TARGET_CXX) $(TARGET_CXXFLAGS) $(TARGET_LDFLAGS)" + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + CFLAGS="$(TARGET_CXXFLAGS)" endef define EDID_DECODE_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + DESTDIR="$(TARGET_DIR)" install endef $(eval $(generic-package)) -- 2.26.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/edid-decode: fix build with gcc <= 5 2020-06-06 9:19 [Buildroot] [PATCH 1/2] package/edid-decode: use TARGET_CONFIGURE_OPTS Fabrice Fontaine @ 2020-06-06 9:19 ` Fabrice Fontaine 2020-06-06 11:56 ` Peter Seiderer 2020-06-06 11:20 ` [Buildroot] [PATCH 1/2] package/edid-decode: use TARGET_CONFIGURE_OPTS Peter Seiderer 1 sibling, 1 reply; 6+ messages in thread From: Fabrice Fontaine @ 2020-06-06 9:19 UTC (permalink / raw) To: buildroot 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(); ^ Fixes: - http://autobuild.buildroot.org/results/71e4a50542c4551797f1d0404d27244612b427d7 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- package/edid-decode/edid-decode.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.26.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/edid-decode: fix build with gcc <= 5 2020-06-06 9:19 ` [Buildroot] [PATCH 2/2] package/edid-decode: fix build with gcc <= 5 Fabrice Fontaine @ 2020-06-06 11:56 ` Peter Seiderer 2020-06-06 12:26 ` Yann E. MORIN 0 siblings, 1 reply; 6+ messages in thread From: Peter Seiderer @ 2020-06-06 11:56 UTC (permalink / raw) To: buildroot Hello Fabrice, On Sat, 6 Jun 2020 11:19:28 +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(); > ^ > > Fixes: > - http://autobuild.buildroot.org/results/71e4a50542c4551797f1d0404d27244612b427d7 > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > --- > package/edid-decode/edid-decode.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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 Thanks for taking care of the build failure, but with c++11 something like 'depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11' (or 4_7/4_8) missing? Regards, Peter > > define EDID_DECODE_INSTALL_TARGET_CMDS ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/edid-decode: fix build with gcc <= 5 2020-06-06 11:56 ` Peter Seiderer @ 2020-06-06 12:26 ` Yann E. MORIN 2020-06-06 19:48 ` Peter Seiderer 0 siblings, 1 reply; 6+ messages in thread From: Yann E. MORIN @ 2020-06-06 12:26 UTC (permalink / raw) To: buildroot Peter, All, On 2020-06-06 13:56 +0200, Peter Seiderer spake thusly: > On Sat, 6 Jun 2020 11:19:28 +0200, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > > Pass -std=c++11 to fix the following build failure with gcc <= 5: [--SNIP--] > > 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 > > Thanks for taking care of the build failure, but with c++11 something > like 'depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11' (or 4_7/4_8) missing? Parts of C++11 already landed as far back as gcc-4.3: https://gcc.gnu.org/projects/cxx-status.html#cxx11 So, to have full C++11 support, on eeds gcc-4.8 or later, but for some subsets of C++11, older versions may still be suitable. But the C++98 standard was the default one until gcc-6.1, which switched directly over to C++14 as the default. That's why the C++11 standard has to be explicitly requested. However, -std=c++11 is only recognised from gcc-4.7 onward; older versions only knew about -std=c++0x. So if this would also work for gcc <= 4.6, we 'd have to use =std=c++0x (which is still recognised up to gcc-9.x). Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/edid-decode: fix build with gcc <= 5 2020-06-06 12:26 ` Yann E. MORIN @ 2020-06-06 19:48 ` Peter Seiderer 0 siblings, 0 replies; 6+ messages in thread From: Peter Seiderer @ 2020-06-06 19:48 UTC (permalink / raw) To: buildroot Hello Yann, On Sat, 6 Jun 2020 14:26:34 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote: > Peter, All, > > On 2020-06-06 13:56 +0200, Peter Seiderer spake thusly: > > On Sat, 6 Jun 2020 11:19:28 +0200, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > > > Pass -std=c++11 to fix the following build failure with gcc <= 5: > [--SNIP--] > > > 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 > > > > Thanks for taking care of the build failure, but with c++11 something > > like 'depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11' (or 4_7/4_8) missing? > > Parts of C++11 already landed as far back as gcc-4.3: > https://gcc.gnu.org/projects/cxx-status.html#cxx11 > > So, to have full C++11 support, on eeds gcc-4.8 or later, but for some > subsets of C++11, older versions may still be suitable. > > But the C++98 standard was the default one until gcc-6.1, which switched > directly over to C++14 as the default. That's why the C++11 standard has > to be explicitly requested. > > However, -std=c++11 is only recognised from gcc-4.7 onward; older > versions only knew about -std=c++0x. So if this would also work for > gcc <= 4.6, we 'd have to use =std=c++0x (which is still recognised up > to gcc-9.x). Thanks for the detailed explanation! So for edid-decode the simplest solution is at-least-4.7 and std=c++11... Regards, Peter > > Regards, > Yann E. MORIN. > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] package/edid-decode: use TARGET_CONFIGURE_OPTS 2020-06-06 9:19 [Buildroot] [PATCH 1/2] package/edid-decode: use TARGET_CONFIGURE_OPTS Fabrice Fontaine 2020-06-06 9:19 ` [Buildroot] [PATCH 2/2] package/edid-decode: fix build with gcc <= 5 Fabrice Fontaine @ 2020-06-06 11:20 ` Peter Seiderer 1 sibling, 0 replies; 6+ messages in thread From: Peter Seiderer @ 2020-06-06 11:20 UTC (permalink / raw) To: buildroot Hello Fabrice, On Sat, 6 Jun 2020 11:19:27 +0200, Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote: > Do not use CXX to save the "$(TARGET_CXX) $(TARGET_CXXFLAGS) > $(TARGET_LDFLAGS)" tuple and instead use TARGET_CONFIGURE_OPTS to pass > variables using the "standard" variables > > LDFLAGS is supported since > https://git.linuxtv.org/edid-decode.git/commit/?id=0a454bcbba5e172c64236811ed98c161689372f1 > > CFLAGS is supported since > https://git.linuxtv.org/edid-decode.git/commit/?id=b202b675e38578b33494fc45c2869917e66ba22d > > edid-decode did not switch CFLAGS to CXXFLAGS in > https://git.linuxtv.org/edid-decode.git/commit/Makefile?id=e00579c128ced87a69df29a01caaaf0cd4a4c8cc > so use CFLAGS to pass TARGET_CXXFLAGS > > Fixes: > - http://autobuild.buildroot.org/results/71e4a50542c4551797f1d0404d27244612b427d7 > Just from code-review (did not yet test your patch), this patch does not change the resulting used compile/link flags and is only in preparation of the next patch? And as a standalone one does not fix the build failure? Regards, Peter > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > --- > package/edid-decode/edid-decode.mk | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/package/edid-decode/edid-decode.mk b/package/edid-decode/edid-decode.mk > index 8fe1e2712a..c41a9f2a76 100644 > --- a/package/edid-decode/edid-decode.mk > +++ b/package/edid-decode/edid-decode.mk > @@ -10,12 +10,13 @@ EDID_DECODE_LICENSE = MIT > EDID_DECODE_LICENSE_FILES = LICENSE > > define EDID_DECODE_BUILD_CMDS > - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ > - CXX="$(TARGET_CXX) $(TARGET_CXXFLAGS) $(TARGET_LDFLAGS)" > + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ > + CFLAGS="$(TARGET_CXXFLAGS)" > endef > > define EDID_DECODE_INSTALL_TARGET_CMDS > - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install > + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ > + DESTDIR="$(TARGET_DIR)" install > endef > > $(eval $(generic-package)) ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-06-06 19:48 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-06-06 9:19 [Buildroot] [PATCH 1/2] package/edid-decode: use TARGET_CONFIGURE_OPTS Fabrice Fontaine 2020-06-06 9:19 ` [Buildroot] [PATCH 2/2] package/edid-decode: fix build with gcc <= 5 Fabrice Fontaine 2020-06-06 11:56 ` Peter Seiderer 2020-06-06 12:26 ` Yann E. MORIN 2020-06-06 19:48 ` Peter Seiderer 2020-06-06 11:20 ` [Buildroot] [PATCH 1/2] package/edid-decode: use TARGET_CONFIGURE_OPTS Peter Seiderer
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.