Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1558205 > unrolled thread

cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"

Started bykbuild test robot <fengguang.wu@intel.com>
First post2017-01-13 11:50 +0100
Last post2017-01-13 16:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  cc1: error: unrecognized command line option  "-Wno-maybe-uninitialized" kbuild test robot <fengguang.wu@intel.com> - 2017-01-13 11:50 +0100
    [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized Arnd Bergmann <arnd@arndb.de> - 2017-01-13 16:50 +0100

#1558205 — cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"

Fromkbuild test robot <fengguang.wu@intel.com>
Date2017-01-13 11:50 +0100
Subjectcc1: error: unrecognized command line option "-Wno-maybe-uninitialized"
Message-ID<sZ7AK-8dm-21@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi Arnd,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   557ed56cc75e0a33c15ba438734a280bac23bd32
commit: a76bcf557ef408b368cf26f52a60865bfc27b632 Kbuild: enable -Wmaybe-uninitialized warning for "make W=1"
date:   9 weeks ago
config: x86_64-randconfig-s1-01131717 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
        git checkout a76bcf557ef408b368cf26f52a60865bfc27b632
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   cc1: warnings being treated as errors
   drivers/gpu/drm/i915/intel_ringbuffer.c: In function 'intel_ring_setup_status_page':
   drivers/gpu/drm/i915/intel_ringbuffer.c:438: error: 'mmio.reg' may be used uninitialized in this function
   At top level:
>> cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"
--
   cc1: warnings being treated as errors
   drivers/gpu/drm/i915/intel_csr.c: In function 'parse_csr_fw':
   drivers/gpu/drm/i915/intel_csr.c:194: error: 'si' may be used uninitialized in this function
   drivers/gpu/drm/i915/intel_csr.c:194: note: 'si' was declared here
   At top level:
>> cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"
--
   cc1: warnings being treated as errors
   drivers/gpu/drm/i915/intel_sprite.c: In function 'intel_check_sprite_plane':
   drivers/gpu/drm/i915/intel_sprite.c:763: error: 'src_x' may be used uninitialized in this function
   drivers/gpu/drm/i915/intel_sprite.c:763: error: 'src_y' may be used uninitialized in this function
   drivers/gpu/drm/i915/intel_sprite.c:763: error: 'src_w' may be used uninitialized in this function
   drivers/gpu/drm/i915/intel_sprite.c:763: error: 'src_h' may be used uninitialized in this function
   At top level:
>> cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"
--
   cc1: warnings being treated as errors
   drivers/gpu/drm/i915/intel_tv.c: In function 'intel_tv_detect':
   drivers/gpu/drm/i915/intel_tv.c:1315: error: 'type' may be used uninitialized in this function
   At top level:
>> cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"
--
   cc1: warnings being treated as errors
   drivers/gpu/drm/i915/i915_gem_gtt.c: In function 'gen8_ggtt_insert_entries':
   drivers/gpu/drm/i915/i915_gem_gtt.c:2341: error: 'gtt_entry' may be used uninitialized in this function
   drivers/gpu/drm/i915/i915_gem_gtt.c: In function 'gen6_ggtt_insert_entries':
   drivers/gpu/drm/i915/i915_gem_gtt.c:2438: error: 'gtt_entry' may be used uninitialized in this function
   At top level:
>> cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"
--
   cc1: warnings being treated as errors
   drivers/gpu/drm/i915/i915_gem.c: In function 'i915_gem_object_map':
   drivers/gpu/drm/i915/i915_gem.c:2382: error: 'pgprot.pgprot' may be used uninitialized in this function
   At top level:
>> cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [next] | [standalone]


#1558509 — [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized

FromArnd Bergmann <arnd@arndb.de>
Date2017-01-13 16:50 +0100
Subject[PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized
Message-ID<sZch3-2CA-5@gated-at.bofh.it>
In reply to#1558205
In commit a76bcf557ef4 ("Kbuild: enable -Wmaybe-uninitialized warning
for "make W=1""), I reverted another change that happened to fix a problem
with old compilers, and now we get this report again with old compilers
(prior to gcc-4.8) and GCOV enabled:

   cc1: warnings being treated as errors
   drivers/gpu/drm/i915/intel_ringbuffer.c: In function 'intel_ring_setup_status_page':
   drivers/gpu/drm/i915/intel_ringbuffer.c:438: error: 'mmio.reg' may be used uninitialized in this function
   At top level:
>> cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"

The problem is that we turn off the warning conditionally in a number
of places as we should, but one of them does it unconditionally.
Instead, change it to call cc-disable-warning as we do elsewhere.

The original patch that caused it was merged into linux-4.7, then
4.8 removed the change and 4.9 brought it back, so we probably want
a backport to 4.9 once this is merged.

Cc: stable@vger.kernel.org
Fixes: a76bcf557ef4 ("Kbuild: enable -Wmaybe-uninitialized warning for "make W=1"")
Fixes: e72e2dfe7c16 ("gcov: disable -Wmaybe-uninitialized warning")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 4fcc0f2dd93c..dbe9ce5d0e96 100644
--- a/Makefile
+++ b/Makefile
@@ -370,7 +370,7 @@ LDFLAGS_MODULE  =
 CFLAGS_KERNEL	=
 AFLAGS_KERNEL	=
 LDFLAGS_vmlinux =
-CFLAGS_GCOV	= -fprofile-arcs -ftest-coverage -fno-tree-loop-im -Wno-maybe-uninitialized
+CFLAGS_GCOV	= -fprofile-arcs -ftest-coverage -fno-tree-loop-im $(call cc-disable-warning,maybe-uninitialized,)
 CFLAGS_KCOV	:= $(call cc-option,-fsanitize-coverage=trace-pc,)
 
 
-- 
2.9.0

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web