diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-10-30 13:29:27 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-10-30 17:17:12 -0400 |
commit | 4ab09d0ec3c81aceaebf8967efe111ba69a406d8 (patch) | |
tree | dbd058c8a60d27ee16db09c05697a5ff717f9cc5 | |
parent | 35686a44e4b87f45ebd426a7e2b074a54486844f (diff) |
drm/i915: Replace "cc-option -Wno-foo" with "cc-disable-warning foo"
To quote kbuild/makefiles.txt:
cc-disable-warning checks if gcc supports a given warning and returns
the commandline switch to disable it. This special function is needed,
because gcc 4.4 and later accept any unknown -Wno-* option and only
warn about it if there is another warning in the source file.
This is exactly what we were trying to achieve with cc-option -Wno-foo and
failed miserably.
Reported-by: kbuild-all@01.org
Fixes: 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, set warnings to full")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171030172927.18158-1-chris@chris-wilson.co.uk
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
-rw-r--r-- | drivers/gpu/drm/i915/Makefile | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 7750be8e27a6..1bbc5440db40 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile | |||
@@ -12,15 +12,15 @@ | |||
12 | # will most likely get a sudden build breakage... Hopefully we will fix | 12 | # will most likely get a sudden build breakage... Hopefully we will fix |
13 | # new warnings before CI updates! | 13 | # new warnings before CI updates! |
14 | subdir-ccflags-y := -Wall -Wextra | 14 | subdir-ccflags-y := -Wall -Wextra |
15 | subdir-ccflags-y += $(call cc-option,-Wno-unused-parameter,) | 15 | subdir-ccflags-y += $(call cc-disable-warning, unused-parameter) |
16 | subdir-ccflags-y += $(call cc-option,-Wno-type-limits,) | 16 | subdir-ccflags-y += $(call cc-disable-warning, type-limits) |
17 | subdir-ccflags-y += $(call cc-option,-Wno-missing-field-initializers,) | 17 | subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers) |
18 | subdir-ccflags-y += $(call cc-option,-Wno-implicit-fallthrough,) | 18 | subdir-ccflags-y += $(call cc-disable-warning, implicit-fallthrough) |
19 | subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror | 19 | subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror |
20 | 20 | ||
21 | # Fine grained warnings disable | 21 | # Fine grained warnings disable |
22 | CFLAGS_i915_pci.o = $(call cc-option,-Wno-override-init,) | 22 | CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init) |
23 | CFLAGS_intel_fbdev.o = $(call cc-option,-Wno-override-init,) | 23 | CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init) |
24 | 24 | ||
25 | subdir-ccflags-y += \ | 25 | subdir-ccflags-y += \ |
26 | $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA) | 26 | $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA) |