[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170425224735.131835-1-mka@chromium.org>
Date: Tue, 25 Apr 2017 15:47:35 -0700
From: Matthias Kaehlcke <mka@...omium.org>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <mmarek@...e.com>,
Michael Davidson <md@...gle.com>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
Grant Grundler <grundler@...omium.org>,
Greg Hackmann <ghackmann@...gle.com>,
Saleem Abdulrasool <compnerd@...pnerd.org>,
Matthias Kaehlcke <mka@...omium.org>
Subject: [PATCH v2] kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS
From: Michael Davidson <md@...gle.com>
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 <compnerd@...pnerd.org>
Signed-off-by: Michael Davidson <md@...gle.com>
Signed-off-by: Matthias Kaehlcke <mka@...omium.org>
---
Changes in v2:
- Added paragraph explaining why this change is needed
- Updated subject (was: Makefile, LLVM: add -no-integrated-as to KBUILD_[AC]FLAGS)
(agreed with Michael to update the patch)
Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
index 5039b9148d15..3832c8243334 100644
--- a/Makefile
+++ b/Makefile
@@ -710,6 +710,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.
--
2.13.0.rc0.306.g87b477812d-goog
Powered by blists - more mailing lists