|
2 | 2 | # Makefile for the drm device driver. This driver provides support for the
|
3 | 3 | # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
|
4 | 4 |
|
5 |
| -subdir-ccflags-$(CONFIG_DRM_I915_WERROR) := -Werror |
| 5 | +# Add a set of useful warning flags and enable -Werror for CI to prevent |
| 6 | +# trivial mistakes from creeping in. We have to do this piecemeal as we reject |
| 7 | +# any patch that isn't warning clean, so turning on -Wall -Wextra (or W=1) we |
| 8 | +# need to filter out dubious warnings. Still it is our interest |
| 9 | +# to keep running locally with W=1 C=1 until we are completely clean. |
| 10 | +# |
| 11 | +# Note the danger in using -Wall -Wextra is that when CI updates gcc we |
| 12 | +# will most likely get a sudden build breakage... Hopefully we will fix |
| 13 | +# new warnings before CI updates! |
| 14 | +subdir-ccflags-y := -Wall -Wextra |
| 15 | +subdir-ccflags-y += $(call cc-option,-Wno-unused-parameter,) |
| 16 | +subdir-ccflags-y += $(call cc-option,-Wno-type-limits,) |
| 17 | +subdir-ccflags-y += $(call cc-option,-Wno-missing-field-initializers,) |
| 18 | +subdir-ccflags-y += $(call cc-option,-Wno-implicit-fallthrough,) |
| 19 | +subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror |
| 20 | + |
| 21 | +# Fine grained warnings disable |
| 22 | +CFLAGS_i915_pci.o = $(call cc-option,-Wno-override-init,) |
| 23 | +CFLAGS_intel_fbdev.o = $(call cc-option,-Wno-override-init,) |
| 24 | + |
6 | 25 | subdir-ccflags-y += \
|
7 | 26 | $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
|
8 | 27 |
|
|
0 commit comments