I know that Al Stone has compiled llvm-gcc4 successfully and I can
report the same. The problem I consistently run into is that llvm-gcc
ends up producing native format output; it does not produce bytecode,
nor does it invoke gccas or gccld.
I'm using the latest svn, and my configure args are:
--prefix=/work/scottm/llvm-cfrontend/obj/../i686-pc-linux-gnu \
--enable-llvm=/work/scottm/llvm/obj/i686-pc-linux-gnu/ \
--program-prefix=llvm- \
--disable-threads --disable-nls --disable-shared
configure doesn't complain and the llvm object directory exists and is
sane according to configure. Any clue?
I don't think llvm-gcc4 uses gccas or gccld, but it can emit bytecode
if you give it the --emit-llvm option:
llvm-gcc --emit-llvm -c -o foo.bc foo.c
Ryan Brown wrote:
I don't think llvm-gcc4 uses gccas or gccld, but it can emit bytecode
if you give it the --emit-llvm option:
llvm-gcc --emit-llvm -c -o foo.bc foo.c
That's a bit asymmetric with the previous gcc3 version, isn't it? That
would mean that the "An Example Using the LLVM Tool Chain" section needs
to be updated for the gcc4 frontend.
OTOH, I could attempt to hack on the gcc4 frontend to use gccas and
gccld (not so hard). I have a patch that I'm testing that fixes llvmc,
which is out of sync with the "c" configuration file.
Scott,
Changes are coming to llvm-gcc to make use of the various optimization
passes directly. I don't know what the time line for those changes are
(ask Chris), but they should be out in the 1.9 time frame. Note that the
new LTO capability is a step in that direction to get link-time
optimization working in the Darwin linker. Chandler and I intend to
provide the same support in binutils (gnu ld). In the meantime, use of
gccas and gccld manually should work just fine. Yes, some llvm-gcc4
documentation on that would help but these tools are already fairly well
documented. Please see http://llvm.org/docs/CommandGuide/index.html
Reid.
Ryan Brown wrote:
I don't think llvm-gcc4 uses gccas or gccld, but it can emit bytecode
if you give it the --emit-llvm option:
llvm-gcc --emit-llvm -c -o foo.bc foo.c
That's a bit asymmetric with the previous gcc3 version, isn't it? That
Yes.
would mean that the "An Example Using the LLVM Tool Chain" section needs
to be updated for the gcc4 frontend.
It should be updated now:
http://llvm.org/docs/GettingStarted.html#tutorial
-Chris