Closed Quuxplusone closed 14 years ago
Forgot to mention:
the preprocessed source was generated with this command:
/usr/bin/ccache /usr/bin/llvm-gcc -I/home/mcuelenaere/rockbox/apps/plugins/rockboy/ -I/home/mcuelenaere/rockbox/apps/plugins -DPLUGIN -I/home/mcuelenaere/rockbox/build-llvm -I/home/mcuelenaere/rockbox/build-llvm/lang -I/home/mcuelenaere/rockbox/firmware/target/mips/ingenic_jz47xx/onda_vx747 -I/home/mcuelenaere/rockbox/firmware/target/mips/ingenic_jz47xx -I/home/mcuelenaere/rockbox/firmware/target/mips -I/home/mcuelenaere/rockbox/firmware -I/home/mcuelenaere/rockbox/firmware/include -I/home/mcuelenaere/rockbox/firmware/export -I/home/mcuelenaere/rockbox/firmware/common -I/home/mcuelenaere/rockbox/firmware/drivers -I/home/mcuelenaere/rockbox/build-llvm/bitmaps -I/home/mcuelenaere/rockbox/apps -I/home/mcuelenaere/rockbox/apps/recorder -I/home/mcuelenaere/rockbox/apps/gui -I/home/mcuelenaere/rockbox/uisimulator/sdl -I/home/mcuelenaere/rockbox/uisimulator/common -DROCKBOX -DMEMORYSIZE=16 -DMEM=16 -DONDA_VX747 -DTARGET_ID=44 -DTARGET_NAME=\"ondavx747\" -DAPPSVERSION=\"r21226M-090608\" -DYEAR=2009 -DMONTH=06 -DDAY=08 -DSIMULATOR -W -Wall -g -fno-builtin -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/home/mcuelenaere/rockbox/uisimulator/sdl -Wno-pointer-sign -fno-strict-aliasing -Wno-override-init -E /home/mcuelenaere/rockbox/apps/plugins/rockboy/save.c > save.i
Attached save.i
(145957 bytes, application/octet-stream): Preprocessed source
Attached x.c
(188 bytes, text/plain): reduced .c testcase
Same thing on Darwin.
Maurus, llvm-2.2 is quite old at this point, you should get a later version.
Not that it will be bug free (obviously) but will be better.
Dale,
I tried LLVM 2.5 but now I'm getting lots of undefined references to
`__compound_literal.*' in an other file.
Forgot mentioning the specific versions:
mcuelenaere@wim2160:~/rockbox/build-llvm$ llvm-gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../llvm-gcc-4.2-2.5/configure --host=i486-linux-gnu --
build=i486-linux-gnu --prefix=/usr/lib/llvm/gcc-4.2 --enable-languages=c,c++ --
program-prefix=llvm- --enable-llvm=/usr/lib/llvm --enable-threads --disable-nls
--disable-shared --disable-multilib
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5636) (LLVM build)
mcuelenaere@wim2160:~/rockbox/build-llvm$ llvmc --version
Low Level Virtual Machine (http://llvm.org/):
llvm version 2.5 (Debian 2.5-0ubuntu1)
Optimized build with assertions.
Built Mar 6 2009(17:11:47).
(In reply to comment #4)
> I tried LLVM 2.5 but now I'm getting lots of undefined references to
> `__compound_literal.*' in an other file.
That would be PR 3518. I thought that had been fixed but apparently not.
(In reply to comment #2)
> Created an attachment (id=3073) [details]
> reduced .c testcase
>
> With current LLVM, this causes a very different error:
>
> $ llvm-gcc x.c
> cc1: ../../src/gcc/llvm-convert.cpp:7318: static llvm::Constant*
> TreeConstantToLLVM::EmitLV(tree_node*): Assertion `((((enum tree_code)
> (((exp)->common.type))->common.code) == VOID_TYPE) || LV->getType() ==
> ConvertType(((exp)->common.type))->getPointerTo()) && "LValue of constant has
> wrong type!"' failed.
This is fixed:
http://llvm.org/viewvc/llvm-project?view=rev&revision=73205
http://llvm.org/viewvc/llvm-project?view=rev&revision=73206
I realize Rockbox doesn't compile yet, but I'd like to close this one and track
the other problem under its existing report, PR 3518.
PR 3518 has been fixed so Rockbox may work now, does it?
(In reply to comment #8)
> PR 3518 has been fixed so Rockbox may work now, does it?
>
I tried to compile the current LLVM SVN version, but failed and didn't really
look into it; I'll try again.
IIUC both bugs manifested in LLVM-GCC and so I only need to build that one,
right?
That's probably true. Of course other things have changed. It sometimes happens that you need to update llvm as well because the interface between llvm and llvm-gcc has changed; I don't know that that's happened recently, but if you get compile-time errors or something, that's probably why.
Hi,
Update on this:
I just tested LLVM 2.6 and this compiles the Rockbox simulator just fine!
Thanks,
Maurus Cuelenaere
save.i
(145957 bytes, application/octet-stream)x.c
(188 bytes, text/plain)