[LLVMdev] The LLVMLinux Project
Duncan Sands
baldrick at free.fr
Fri Sep 7 03:41:35 PDT 2012
Hi Behan,
> However, there are some things in Clang/LLVM which also need to be addressed in
> order to make a Clang compiled Linux Kernel possible. Amongst other things these
> are:
>
> * The Linux kernel currently uses compiler flags which are unsupported in Clang:
> * -fdelete-null-pointer-checks
I think this may be easy to fix by exploiting the fact that LLVM only thinks
that dereferencing a null pointer *in the default address space* is wrong.
LLVM considers reading and writing to null pointers in non-default address
spaces to be perfectly fine. Thus when clang sees -fdelete-null-pointer-checks
it could put every pointer in some special address space and Bob's your uncle.
Best wishes, Duncan.
> * –fno-inline-functions-called-once
> * –Wno-unused-but-set-variable vs –Wno-unused-variable (GCC 4.6)
> * –mabi=aapcs-linux (Bug 11326)
More information about the llvm-dev
mailing list