OSDN Git Service

kbuild: Set KBUILD_CFLAGS before incl. arch Makefile
authorChris Fries <cfries@google.com>
Mon, 3 Dec 2018 19:56:19 +0000 (11:56 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Dec 2018 18:42:42 +0000 (19:42 +0100)
commit740f140b5dc4f7553a268d153fc816948cbc8cbd
treeb756d35d8d99e1ecdce75bd865016f8bf71ed29b
parent6d075d215b5b8875fba153670e19560a2ffcdd45
kbuild: Set KBUILD_CFLAGS before incl. arch Makefile

(commit ae6b289a37890909fea0e4a1666e19377fa0ed2c upstream)

Set the clang KBUILD_CFLAGS up before including arch/ Makefiles,
so that ld-options (etc.) can work correctly.

This fixes errors with clang such as ld-options trying to CC
against your host architecture, but LD trying to link against
your target architecture.

Signed-off-by: Chris Fries <cfries@google.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[ND: adjusted context due to upstream having removed code above where I
placed this block in this backport]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Makefile