Skip to content

Commit

Permalink
kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS
Browse files Browse the repository at this point in the history
The Linux Kernel relies on GCC's acceptance of inline assembly as an
opaque object which will not have any validation performed on the content.
The current behaviour in LLVM is to perform validation of the contents by
means of parsing the input if the MC layer can handle it.

Disable clangs integrated assembler and use the GNU assembler instead.

Wording-mostly-from: Saleem Abdulrasool <[email protected]>
Signed-off-by: Michael Davidson <[email protected]>
Signed-off-by: Matthias Kaehlcke <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
calcodion authored and masahir0y committed Apr 28, 2017
1 parent 433db3e commit a37c45c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,8 @@ KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
# See modpost pattern 2
KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
KBUILD_CFLAGS += $(call cc-option, -no-integrated-as)
KBUILD_AFLAGS += $(call cc-option, -no-integrated-as)
else

# These warnings generated too much noise in a regular build.
Expand Down

0 comments on commit a37c45c

Please sign in to comment.