Re: Building the 10.6.4 Kernel
Re: Building the 10.6.4 Kernel
- Subject: Re: Building the 10.6.4 Kernel
- From: Terry Lambert <email@hidden>
- Date: Mon, 13 Sep 2010 15:16:08 -0700
No, it's just a missing header file.
But I will absolutely guarantee that a kernel built from the released sources with llvm will fail to work.
llvm silently stops generating code when it encounters a pointer cast of a zero that then has pointer math done on it. If you are a language-lawyer, you can find two clauses in the standard which justify the behaviour for this type of thing being "undefined" (don't ask me why it isn't "undefined to work just like gcc").
There are 14 places in the kernel sources he is using where that happens.
The dtrace probes will also be problematic, since they use assembly-declared labels, and llvm's basic block replication means that some of those labels end up duplicated, resulting in duplicate label errors from the assembler.
Some of the other inline assembly is also problematic for llvm compilation.
You really want to use gcc-4.2. The set of links I posted the other day contain the necessary build tools which know how to build the kernel with the right compiler. Download them, use them.
-- Terry
On Sep 11, 2010, at 5:25 PM, James C wrote:
> Hi Alex,
>
> No actual *details* here, just a theory: it may be that llvm and gcc
> share a set of hidden files (which usually begin with a dot) for
> tracking the dependency of .c files on .h files, and the stored llvm
> dependencies are breaking the gcc build.
>
> The brutal solution would be to delete the build tree and start again
> from scratch. If I have the right problem and somebody has the
> details, they can probably suggest a much more sophisticated solution.
>
> Regards,
> James.
>
>> Date: Sat, 11 Sep 2010 02:13:27 +0200
>> From: Alexander von Below <email@hidden>
>> Subject: Re: Building the 10.6.4 Kernel
>> To: Terry Lambert <email@hidden>
>> Cc: "email@hidden Kernel"
>> <email@hidden>
>> Message-ID: <email@hidden>
>> Content-Type: text/plain; charset=us-ascii
>>
>> Thanks for your reply.
>>
>> However, I have no clue why the makefile thiks it should use llvm-c
>>
>> The error occurs even if I pass gcc-4.0 as the value for CC:
>>
>> % make CC=/usr/bin/gcc-4.0
>> =========== make all for libstuff =============
>> /usr/bin/gcc-4.0 -std=c99 -O -DLTO_SUPPORT -g -I../../include -Wall -fno-builtin-round -D_MACH_I386_THREAD_STATUS_FPSTATE_LEGACY_FIELD_NAMES_ -D_ARCHITECTURE_I386_FPU_FPSTATE_LEGACY_FIELD_NAMES_ -static -c \
>> -I/Developer/usr/local/include \
>> -MD -dependency-file ./lto.d \
>> -o ./lto.o ../lto.c
>> ../lto.c:8:24: error: llvm-c/lto.h: No such file or directory
>>
>> Could anyone shed light on this?
>>
>> xcode-select points to /Developer, containing the current stable release of Xcode (3.2.4)
>>
>> Thanks
>>
>> Alex
>>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-kernel mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden