[1/1] package/gcc: pass -Wno-error to debug builds
diff mbox series

Message ID 20200324173653.74573-1-james.hilliard1@gmail.com
State New
Headers show
Series
  • [1/1] package/gcc: pass -Wno-error to debug builds
Related show

Commit Message

James Hilliard March 24, 2020, 5:36 p.m. UTC
Fixes:
../../../../libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: ‘st.st_mode’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   return S_ISLNK (st.st_mode);
                     ^

Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v1 -> v2:
  - add comment from Yocto recipes
---
 package/gcc/gcc.mk | 5 +++++
 1 file changed, 5 insertions(+)

Patch
diff mbox series

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 524ca83db0..fe7167b2f3 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -100,6 +100,11 @@  HOST_GCC_COMMON_CONF_ENV = \
 GCC_COMMON_TARGET_CFLAGS = $(TARGET_CFLAGS)
 GCC_COMMON_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS)
 
+# used to fix ../../../../libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: ‘st.st_mode’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
+ifeq ($(BR2_ENABLE_DEBUG),y)
+GCC_COMMON_TARGET_CFLAGS += -Wno-error
+endif
+
 # Propagate options used for target software building to GCC target libs
 HOST_GCC_COMMON_CONF_ENV += CFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CFLAGS)"
 HOST_GCC_COMMON_CONF_ENV += CXXFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CXXFLAGS)"