Nathan Chancellor 4e70da985c drm/amdgpu: Wrap -Wunused-but-set-variable in cc-option
-Wunused-but-set-variable was only supported in clang starting with
13.0.0, so earlier versions will emit a warning, which is turned into a
hard error for the kernel to mirror GCC:

  error: unknown warning option '-Wunused-but-set-variable'; did you mean '-Wunused-const-variable'? [-Werror,-Wunknown-warning-option]

The minimum supported version of clang for building the kernel is
11.0.0, so match the rest of the kernel and wrap
-Wunused-but-set-variable in a cc-option call, so that it is only used
when supported by the compiler.

Closes: https://github.com/ClangBuiltLinux/linux/issues/1869
Fixes: 1b320ad3f5a8 ("drm/amd/amdgpu: introduce DRM_AMDGPU_WERROR")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2023-06-09 12:49:06 -04:00
..
2022-11-24 11:05:43 +10:00
2022-04-07 12:53:54 +02:00
2022-04-25 11:17:45 +02:00
2021-05-19 23:50:27 -04:00
2023-01-24 17:36:29 +01:00
2023-01-24 17:36:29 +01:00
2023-01-24 17:36:29 +01:00
2023-01-24 17:36:29 +01:00
2023-02-03 15:37:31 -05:00
2023-06-09 12:32:21 -04:00
2023-06-09 12:32:21 -04:00
2022-05-04 09:53:12 -04:00
2022-05-04 10:43:54 -04:00
2022-05-10 17:53:11 -04:00
2023-03-15 18:45:26 -04:00
2023-03-15 18:45:26 -04:00
2023-03-31 11:18:42 -04:00
2021-10-20 11:43:57 -04:00
2022-03-22 10:53:39 -04:00
2021-05-19 23:50:27 -04:00
2023-06-09 12:41:11 -04:00