diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-07-31 10:06:13 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-08-10 13:46:55 -0400 |
commit | 8602d97ca2cf3e06387251afddc281d1d1841f50 (patch) | |
tree | 68cd46bc9c4dfdee4d66777956eb331b7f1d28b8 | |
parent | 4e4bf9449b4f436419490a4a8cf4de17433cac15 (diff) | |
download | u-boot-8602d97ca2cf3e06387251afddc281d1d1841f50.zip u-boot-8602d97ca2cf3e06387251afddc281d1d1841f50.tar.gz u-boot-8602d97ca2cf3e06387251afddc281d1d1841f50.tar.bz2 |
Makefile: avoid false positive -Wmaybe-uninitialized
When compiling with -Og gcc reports false positive -Wmaybe-uninitialized as
reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394.
Silence these warnings when building with CONFIG_CC_OPTIMIZE_FOR_DEBUG.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -676,6 +676,9 @@ endif # $(dot-config) ifdef CONFIG_CC_OPTIMIZE_FOR_DEBUG KBUILD_HOSTCFLAGS := -Wall -Wstrict-prototypes -Og -g -fomit-frame-pointer \ $(HOST_LFS_CFLAGS) $(HOSTCFLAGS) +# Avoid false positives -Wmaybe-uninitialized +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394 +KBUILD_HOSTCFLAGS += -Wno-maybe-uninitialized KBUILD_HOSTCXXFLAGS := -Og -g $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS) endif @@ -696,7 +699,10 @@ KBUILD_CFLAGS += -O2 endif ifdef CONFIG_CC_OPTIMIZE_FOR_DEBUG -KBUILD_CFLAGS += -Og +KBUILD_CFLAGS += -Og -Wno-maybe-uninitialized +# Avoid false positives -Wmaybe-uninitialized +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394 +KBUILD_CFLAGS += -Wno-maybe-uninitialized endif LTO_CFLAGS := |