Displaying 3 results from an estimated 3 matches for "ccvam4w2".
2006 Nov 20
4
[LLVMdev] libstdc++ as bytecode, and compiling C++ to C
...$
Oops, no go. Try a different way:
$ llvm-g++ -emit-llvm -c x.cpp
$ llvm-link -o=linked.o x.o std/*.o sup/*.o
$ lli linked.o
hello world
$
So far, so good! Compile to C:
$ llc -o=cbe.c -march=c linked.o
WARNING: this target does not support the llvm.stacksave intrinsic.
$ gcc cbe.c
/var/tmp//ccVAM4W2.o(.text+0x329a): In function `operator new(unsigned int)':
: undefined reference to `__cxa_throw'
[...and more errors]
$
But __cxa_throw is right there, in sup/eh_throw.o, and in linked.o, it
just isn't being emitted as C code. (at this point, I suspect the
problem might be that I don...
2006 Nov 20
0
[LLVMdev] libstdc++ as bytecode, and compiling C++ to C
...ust dealing with bytecode. BTW,
You could put all the std/*.o and sup/*.o files into a bc archive using
llvm-ar and then just link with that archive.
>
> $ llc -o=cbe.c -march=c linked.o
> WARNING: this target does not support the llvm.stacksave intrinsic.
> $ gcc cbe.c
> /var/tmp//ccVAM4W2.o(.text+0x329a): In function `operator new(unsigned int)':
> : undefined reference to `__cxa_throw'
> [...and more errors]
> $
>
> But __cxa_throw is right there, in sup/eh_throw.o, and in linked.o, it
> just isn't being emitted as C code. (at this point, I suspect t...
2006 Nov 20
1
[LLVMdev] libstdc++ as bytecode, and compiling C++ to C
...mylib.a std/*.o sup/*.o
llvm-ar: creating mylib.a
$ llvm-link -o=linked.o x.o mylib.a
llvm-link: error loading file 'mylib.a'
> > $ llc -o=cbe.c -march=c linked.o
> > WARNING: this target does not support the llvm.stacksave intrinsic.
> > $ gcc cbe.c
> > /var/tmp//ccVAM4W2.o(.text+0x329a): In function `operator new(unsigned int)':
> > : undefined reference to `__cxa_throw'
> > [...and more errors]
> > $
> >
> > But __cxa_throw is right there, in sup/eh_throw.o, and in linked.o, it
> > just isn't being emitted as C code...