package/gcc: pass -Wno-error to debug builds
PATCH v3 1/1 package/gcc: pass -Wno-error to debug builds
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);
^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
---
Changes v2 -> v3:
- add more details to message
Changes v1 -> v2:
- add comment from Yocto recipes
--- package/gcc/gcc.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/gcc/gcc.mk +5 -0
@@ -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)"
Signature · 1 line
2.20.1
PATCH v3 1/1 package/gcc: pass -Wno-error to debug builds
James, All,
On 2020-04-07 13:26 -0600, James Hilliard spake thusly:
Quoted 4 lines
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); ^
Quoted 8 lines
Upstream has been unable to reproduce/fix properly, details:
https://gcc.gnu.org/legacy-ml/gcc-patches/2019-03/threads.html#00827Upstream recommends passing -Wno-error as a workaround, see:
https://gcc.gnu.org/pipermail/gcc-patches/2019-April/519867.htmlReviewed-by Romain Naour <[email protected]>Signed-off-by James Hilliard <[email protected]>
I added a reproducing defconfig, extended the commit log a little bit, and pushed to master, thanks.
Regards,
Yann E. MORIN.
Quoted 32 lines
---
Changes v2 -> v3:
- add more details to message
Changes v1 -> v2:
- add comment from Yocto recipes--- package/gcc/gcc.mk | 5 +++++ 1 file changed, 5 insertions(+)package/gcc/gcc.mk +5
-0@@ -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)"Signature · 6 lines
2.20.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v3 1/1 package/gcc: pass -Wno-error to debug builds
In reply to James HilliardQuoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"James" == James Hilliard <[email protected]> writes:
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); ^Upstream has been unable to reproduce/fix properly, details:
https://gcc.gnu.org/legacy-ml/gcc-patches/2019-03/threads.html#00827Upstream recommends passing -Wno-error as a workaround, see:
https://gcc.gnu.org/pipermail/gcc-patches/2019-April/519867.html
Quoted 7 lines
Reviewed-by Romain Naour <[email protected]>Signed-off-by James Hilliard <[email protected]>---
Changes v2 -> v3:
- add more details to message
Changes v1 -> v2:
- add comment from Yocto recipes
Committed to 2019.02.x, 2019.11.x and 2020.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard