After going through 17000+ lines of output, I come up with the following...
Ignore the missing malloc.h errors. I screwed up badly. I was undoing my alloca.h hack and removed the wrong file.
I updated my source tree and after putting malloc.h back things look a lot better. Still getting a large number of JIT-only failures. There is now only one assertion failure:
/home/cfe/x86/llvm-gcc/bin/g++ -I/usr/home/llvm/obj/projects/llvm-test/MultiSource/Benchmarks/Prolangs-C++/city -I/usr/home/llvm/obj/projects/llvm-test/../../../projects/llvm-test/MultiSource/Benchmarks/Prolangs-C++/city -I/usr/home/llvm/obj/include -I/usr/home/llvm/obj/projects/llvm-test/../../../projects/llvm-test/include -I../../../../include -I/usr/home/llvm/include -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -O2 -Wall -S /usr/home/llvm/obj/projects/llvm-test/../../../projects/llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/vehicle.cpp -o Output/vehicle.ll
/usr/home/llvm/obj/tools/Debug/gccas -disable-opt Output/vehicle.ll -o Output/vehicle.rbc
/usr/home/llvm/obj/tools/Debug/gccld -link-as-library -disable-opt Output/check_functions.rbc Output/direction.rbc Output/intersection.rbc Output/light.rbc Output/main.rbc Output/roadlet.rbc Output/vehicle.rbc -o Output/city.linked.rbc
/usr/home/llvm/obj/tools/Debug/llvm-dis Output/city.linked.rbc -o Output/city.linked.rll -f
/usr/home/llvm/obj/tools/Debug/gccas Output/city.linked.rll -o Output/city.linked.bc
/usr/home/llvm/obj/tools/Debug/gccld -L/usr/home/cfe/x86/llvm-gcc/bin/../lib/gcc/i386-unknown-freebsd5.3/3.4-llvm/ -L/home/cfe/x86/llvm-gcc/lib Output/city.linked.bc -lc -lm -lcrtend -o Output/city.llvm
Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/home/llvm/obj/../include/llvm/Support/Casting.h, line 197.
gmake[4]: *** [Output/city.llvm.bc] Abort trap (core dumped)
The only place trying to include alloca.h is:
/usr/home/llvm/obj/projects/llvm-test/../../../projects/llvm-test/SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c:4:20: alloca.h: No such file or directory
The errors below still occur (I removed the others).
I updated my source tree and after putting malloc.h back things look a lot better. Still getting a large number of JIT-only failures. There is now only one assertion failure:
/home/cfe/x86/llvm-gcc/bin/g++ -I/usr/home/llvm/obj/projects/llvm-test/MultiSource/Benchmarks/Prolangs-C++/city -I/usr/home/llvm/obj/projects/llvm-test/../../../projects/llvm-test/MultiSource/Benchmarks/Prolangs-C++/city -I/usr/home/llvm/obj/include -I/usr/home/llvm/obj/projects/llvm-test/../../../projects/llvm-test/include -I../../../../include -I/usr/home/llvm/include -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -O2 -Wall -S /usr/home/llvm/obj/projects/llvm-test/../../../projects/llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/vehicle.cpp -o Output/vehicle.ll
/usr/home/llvm/obj/tools/Debug/gccas -disable-opt Output/vehicle.ll -o Output/vehicle.rbc
/usr/home/llvm/obj/tools/Debug/gccld -link-as-library -disable-opt Output/check_functions.rbc Output/direction.rbc Output/intersection.rbc Output/light.rbc Output/main.rbc Output/roadlet.rbc Output/vehicle.rbc -o Output/city.linked.rbc
/usr/home/llvm/obj/tools/Debug/llvm-dis Output/city.linked.rbc -o Output/city.linked.rll -f
/usr/home/llvm/obj/tools/Debug/gccas Output/city.linked.rll -o Output/city.linked.bc
/usr/home/llvm/obj/tools/Debug/gccld -L/usr/home/cfe/x86/llvm-gcc/bin/../lib/gcc/i386-unknown-freebsd5.3/3.4-llvm/ -L/home/cfe/x86/llvm-gcc/lib Output/city.linked.bc -lc -lm -lcrtend -o Output/city.llvm
Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /usr/home/llvm/obj/../include/llvm/Support/Casting.h, line 197.
gmake[4]: *** [Output/city.llvm.bc] Abort trap (core dumped)
Sorry about that, I'm responsible for that bug, here's a patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041115/020847.html
This patch broke all programs with static ctors/dtors.
What do you mean that you are seeing JIT only failures? Can you give some
examples?
-Chris
The only place trying to include alloca.h is:
/usr/home/llvm/obj/projects/llvm-test/../../../projects/llvm-test/SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c:4:20:
alloca.h: No such file or directory
Ok, I don't know what the right way to do this is. If you want to ifdef
them for freebsd, go for it.
The errors below still occur (I removed the others).
Again, if you want to submit patches for these, we would welcome them
-Chris
Here are a bunch of JIT failures. test.out is the output from gmake. test.diffs has the diffs out the actual output diffed against the native compiler.
test.diffs (3.44 KB)
test.out (14 KB)