[klibc] [PATCH] kbuild: add -ffreestanding to required flags

Bill Wendling morbo at google.com
Wed Jun 6 02:23:34 PDT 2018


New clang versions need the '-ffreestanding' flag because new changes
convert
system calls to their unlocked versions, which don't exist in the kernel
library.

Signed-off-by: Bill Wendling <morbo at google.com>

diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index f500d535..9cf4b2d9 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -67,7 +67,8 @@ include $(srctree)/scripts/Kbuild.include
 #
---------------------------------------------------------------------------

 KLIBCREQFLAGS     := $(call cc-option, -fno-stack-protector, ) \
-                     $(call cc-option, -fwrapv, )
+                     $(call cc-option, -fwrapv, ) \
+                     $(call cc-option, -ffreestanding, )
 KLIBCARCHREQFLAGS :=
 KLIBCOPTFLAGS     :=
 KLIBCWARNFLAGS    := -W -Wall -Wno-sign-compare -Wno-unused-parameter

-- 
Bill Wendling | SWE | wcw <morbo at google.com>@google.com <morbo at google.com> |
 408-921-0157
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.zytor.com/pipermail/klibc/attachments/20180606/cad606b3/attachment.html>


More information about the klibc mailing list