[llvmlinux] vexpress - not booting from HEAD and hope

Tinti viniciustinti at gmail.com
Sun Aug 18 18:30:21 UTC 2013


On Sun, Aug 18, 2013 at 10:56 AM, Renato Golin <renato.golin at linaro.org>wrote:

> On 18 August 2013 14:50, Jan-Simon Möller <dl9pf at gmx.de> wrote:
>
>> Now how can we solve that - in clang ? in the kernel ?
>> Bugreport for clang ?
>>
>
> Tim Northover found a bug in the LLVM codegen, and he's having a look at
> it.
>
> cheers,
> --renato
>
>
Tim has fixed the issue on r188643. Thank you all guys.

As important as the fact that I found the two bad files it how I get there.

Thus, just to be documented, that is what I did:

First I tried to use Jan-Simon's QEMU feature which lead me to suspect
of some timer issue. But I was not able too actually see what was the
exact problem.

Then I build Linux with both compilers, the GOOD one and the BAD one. I will
keep using this names from here.

Next I did a script that generated the assembly for all .o files (except
the built-in.o)
that were built with the GOOD and BAD one. This script also kept the same
directory structure as Linux does.

Next, I "meld"/"diff" the two directories and notice that only these files
were
different:

arch/arm/vfp/vfp.o
arch/arm/vfp/vfpdouble.o
arch/arm/vfp/vfpsingle.o
drivers/mtd/mtd.o
drivers/mtd/mtdchar.o
fs/readdir.o
fs/signalfd.o
kernel/sched/core.o
kernel/time/timekeeping.o
kernel/time.o
lib/div64.o

Then I substitute all BAD ones for the GOOD ones. And tried to build the
kernel.
It worked!!! Hence these files were the ones that were causing the trouble.
Then
I started to substitute only by groups (i.e. all files under "arch", all
under "arch" +
all under "drivers" and so one). Until I ended up with only:

kernel/time/timekeeping.o
kernel/time.o

Then I sent them to LLVM Commits maillist.

Regards,
Tinti

PS: base script

 for i in $(cat files | grep -v built-in.o); do mkdir -p
/tmp/test/working/$(dirname $i) ; mkdir -p /tmp/test/not-working/$(dirname
$i) ; arm-linux-gnueabi-objdump -d ../linux-working/$i | grep -v
linux-working > /tmp/test/working/${i%.o}.asm ; arm-linux-gnueabi-objdump
-d ../linux-not-working/$i | grep -v linux-not-working >
/tmp/test/not-working/${i%.o}.asm ; echo $i ; done

_______________________________________________
> LLVMLinux mailing list
> LLVMLinux at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
>



-- 
Simplicity is the ultimate sophistication
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20130818/2bdfb6ec/attachment.html>


More information about the LLVMLinux mailing list