[LLVMdev] Using llvm-gcc with a simple program and the '-c' option
Wink Saville
wink at saville.com
Mon Feb 27 23:31:18 PST 2006
Reid Spencer wrote:
> On Mon, 2006-02-27 at 20:43 -0800, Wink Saville wrote:
>
>>> Try passing "-L/opt/llvm-1.6/llvm-gcc/lib/ -lcrtend" to llvm-ld.
>>>
>> This didn't work for me:
>> llvm-ld -o t1.app t1.bc t1.a -L/opt/llvm-1.6/llvm-gcc/lib/ -lcrtend.a
>>
>> I get two warning's about library 'crtend' missing
>>
>>
>
> You didn't get the instructions quite right. The option is -lcrtend not
> -lcrtend.a
>
> Reid.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
Actually, I didn't have the ".a" just -lcrtend.
In possibly related news I just checked out the latest llvm from cvs and
compiled it. Guess what, there were 6 warnings in the output and 3 of
them were "gccld: warning: Cannot find library 'crtend'". The last one
was just before the end:
llvm[4]: Linking Debug Object Library stkr_compiler.o
make[4]: Leaving directory
`/home/wink/prgs/llvm-cvs/llvm/projects/Stacker/lib/compiler'
make[4]: Entering directory
`/home/wink/prgs/llvm-cvs/llvm/projects/Stacker/lib/runtime'
llvm[4]: Compiling stacker_rt.c for Debug build (bytecode)
llvm[4]: Compiling stacker_rt.ll to stacker_rt.bc for Debug build (bytecode)
llvm[4]: Building Debug Bytecode Module stkr_runtime.bc
gccld: warning: Cannot find library 'crtend'
make[4]: Leaving directory
`/home/wink/prgs/llvm-cvs/llvm/projects/Stacker/lib/runtime'
make[3]: Leaving directory
`/home/wink/prgs/llvm-cvs/llvm/projects/Stacker/lib'
make[3]: Entering directory
`/home/wink/prgs/llvm-cvs/llvm/projects/Stacker/tools'
make[4]: Entering directory
`/home/wink/prgs/llvm-cvs/llvm/projects/Stacker/tools/stkrc'
llvm[4]: Compiling stkrc.cpp for Debug build
llvm[4]: Linking Debug executable stkrc
llvm[4]: ======= Finished Linking Debug Executable stkrc
make[4]: Leaving directory
`/home/wink/prgs/llvm-cvs/llvm/projects/Stacker/tools/stkrc'
make[3]: Leaving directory
`/home/wink/prgs/llvm-cvs/llvm/projects/Stacker/tools'
make[2]: Leaving directory `/home/wink/prgs/llvm-cvs/llvm/projects/Stacker'
make[1]: Leaving directory `/home/wink/prgs/llvm-cvs/llvm/projects'
I haven't tried seeing if anything works (getting past my bed time:),
but could this have something to do with my using X86-64 (Amd64)? Also,
I'm using gcc-4.0.2 and glibc appears to be 2.3.5 (symbolic link from
libc.so.6 is libc-2.3.5.so).
Note: I'm new to linux, in case it wasn't obvious.
Cheers,
Wink
More information about the llvm-dev
mailing list