package/edid-decode: use TARGET_CONFIGURE_OPTS
PATCH v2 1/2 package/edid-decode: use TARGET_CONFIGURE_OPTS
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
---
Changes v1 -> v2 (after review of Peter Seiderer):
- Drop link on autobuilder failure
package/edid-decode/edid-decode.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
package/edid-decode/edid-decode.mk +4 -3
@@ -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))
Signature · 1 line
2.26.2
PATCH v2 2/2 package/edid-decode: fix build with gcc <= 5
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
---
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(-)
package/edid-decode/Config.in +4 -2
@@ -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
package/edid-decode/edid-decode.mk +1 -1
@@ -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
Signature · 1 line
2.26.2
PATCH v2 2/2 package/edid-decode: fix build with gcc <= 5
Hello Fabrice,
Quoted 46 lines · Fabrice Fontaine
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::stringedid_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/71e4a50542c4551797f1d0404d27244612b427d7Signed-off-by Fabrice Fontaine <[email protected]>---
Changes v1 -> v2 (after review of Peter Seiderer):
- Add dependency on gcc 4.7package/edid-decode/Config.in | 6 ++++-- package/edid-decode/edid-decode.mk | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-)package/edid-decode/Config.in +4
-2@@ -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_7package/edid-decode/edid-decode.mk +0
-0
package/edid-decode/edid-decode.mk EDID_DECODE_LICENSE_FILES = LICENSE · line 17
Quoted 8 lines
package/edid-decode/edid-decode.mk +1
-1@@ -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
Regards,
Peter
PATCH v2 1/2 package/edid-decode: use TARGET_CONFIGURE_OPTS
In reply to Fabrice FontaineHello Fabrice,
Quoted 30 lines · Fabrice Fontaine
Do not use CXX to save the "$(TARGET_CXX) $(TARGET_CXXFLAGS) $(TARGET_LDFLAGS)" tuple and instead use
TARGET_CONFIGURE_OPTSto pass variables using the "standard" variablesLDFLAGS is supported since
https://git.linuxtv.org/edid-decode.git/commit/?id=0a454bcbba5e172c64236811ed98c161689372f1CFLAGS is supported since
https://git.linuxtv.org/edid-decode.git/commit/?id=b202b675e38578b33494fc45c2869917e66ba22dedid-decode did not switch CFLAGS to CXXFLAGS in
https://git.linuxtv.org/edid-decode.git/commit/Makefile?id=e00579c128ced87a69df29a01caaaf0cd4a4c8cc
so use CFLAGS to passTARGET_CXXFLAGSSigned-off-by Fabrice Fontaine <[email protected]>---
Changes v1 -> v2 (after review of Peter Seiderer):
- Drop link on autobuilder failurepackage/edid-decode/edid-decode.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)package/edid-decode/edid-decode.mk +0
-0@@ -10,12 +10,13 @@ EDID_DECODE_LICENSE = MIT EDID_DECODE_LICENSE_FILES = LICENSE define EDID_DECODE_BUILD_CMDS
package/edid-decode/edid-decode.mk EDID_DECODE_LICENSE = MIT · line 19
Quoted 10 lines
package/edid-decode/edid-decode.mk +4
-3- $(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
No need for the 'TARGET_CONFIGURE_OPTS' here (as the install only uses DESTDIR)...
With this fixed and because the same effective compile options are used as without the patch you can add my:
Regards,
Peter
Quoted 3 lines
package/edid-decode/edid-decode.mk +0
-0endef $(eval $(generic-package))