Skip to content
Commit cfe17c9b authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

kbuild: move cc-option and cc-disable-warning after incl. arch Makefile



Geert reported commit ae6b289a ("kbuild: Set KBUILD_CFLAGS before
incl. arch Makefile") broke cross-compilation using a cross-compiler
that supports less compiler options than the host compiler.

For example,

  cc1: error: unrecognized command line option "-Wno-unused-but-set-variable"

This problem happens on architectures that setup CROSS_COMPILE in their
arch/*/Makefile.

Move the cc-option and cc-disable-warning back to the original position,
but keep the Clang target options untouched.

Fixes: ae6b289a ("kbuild: Set KBUILD_CFLAGS before incl. arch Makefile")
Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent ae64f9bd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment