package/gcc: pass -Wno-error to debug builds
authorJames Hilliard <james.hilliard1@gmail.com>
Tue, 7 Apr 2020 19:26:22 +0000 (13:26 -0600)
committerYann E. MORIN <yann.morin.1998@free.fr>
Tue, 7 Apr 2020 20:24:59 +0000 (22:24 +0200)
commitdcaf6e75acb4d21c2c31c70b054dac8d18710fcb
tree97cd4a240b91e8b68c1fec821501b33e51df1a50
parent2016f6369447e4246391d405ca4ff41dab90dfce
package/gcc: pass -Wno-error to debug builds

gcc fails to build in debug build with debug optimisations:

BR2_x86_corei7=y
BR2_ENABLE_DEBUG=y
BR2_DEBUG_3=y
BR2_OPTIMIZE_G=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y

which fails with:
    ../../../../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);
                     ^
Upstream has been unable to reproduce/fix properly, details:
https://gcc.gnu.org/legacy-ml/gcc-patches/2019-03/threads.html#00827

Upstream recommends passing -Wno-error as a workaround, see:
https://gcc.gnu.org/pipermail/gcc-patches/2019-April/519867.html

Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
[yann.morin.1998@free.fr: add the reproducing defconfig]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/gcc/gcc.mk