[LLVMdev] comparing .o files from different build trees
Reed Kotler
rkotler at mips.com
Thu Apr 3 14:16:18 PDT 2014
I've realized that it's necessary to build the recursed compiler in the
same directory as it's previous generation (after moving the previous
somewhere else) before doing the diff since the names of various
generated files are embedded in the .o somtimes.
For example:
rkotler at mipsswbrd002:~/slave/recurse2be/build$ diff ../../tmp/1 ../../tmp/2
2c2
< ./tools/clang/lib/AST/Release+Asserts/ASTDumper.o: file format
elf32-tradbigmips
---
>
../../recurse3be/build/tools/clang/lib/AST/Release+Asserts/ASTDumper.o:
file format elf32-tradbigmips
11404c11404
< 2510 652f7265 63757273 65326265 2f627569 e/recurse2be/bui
---
> 2510 652f7265 63757273 65336265 2f627569 e/recurse3be/bui
12379c12379
< 6200 76652f72 65637572 73653262 652f6275 ve/recurse2be/bu
---
> 6200 76652f72 65637572 73653362 652f6275 ve/recurse3be/bu
rkotler at mipsswbrd002:~/slave/recurse2be/build$
On 04/03/2014 10:43 AM, reed kotler wrote:
> I'm trying to write a script for checking whether the compiler recursed
> properly.
>
> rkotler at mipsswbrd002:~/slave/recurse3be/build$ find . -name "*.o" -exec
> cmp '{}' ../../recurse2be/build/'{}' \; |& tee foo.txt
>
> Is anyone else doing this?
>
> There 2 compilers, recurse 2 and recurse3 that in principle should be
> identical.
>
> Obviously if there is date and time information, miscompares can occur.
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list