]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Replace "cc-option -Wno-foo" with "cc-disable-warning foo"
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 30 Oct 2017 17:29:27 +0000 (17:29 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 30 Oct 2017 21:17:12 +0000 (21:17 +0000)
commitfcfd27addb8f80f21085e650e1506c0c4d621373
treedbd058c8a60d27ee16db09c05697a5ff717f9cc5
parent7f49bbcbbe05833a961071ef5515d91b6654b99c
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: f46addf9045a ("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>
drivers/gpu/drm/i915/Makefile