[LLVMdev] Q: missing -fPIC in llvmc?

Gordon Henriksen gordonhenriksen at mac.com
Mon Oct 22 13:10:03 PDT 2007


On Oct 22, 2007, at 15:48, Basile STARYNKEVITCH wrote:

> Chris Lattner wrote:
>> On Mon, 22 Oct 2007, Basile STARYNKEVITCH wrote:
>>> On a Debian/AMD64 host I am surprised that there is apparently no  
>>> way to
>>> generate position independent code in shared object (i.e. to output
>>> files which are easy dlopen-able without pain)?
>>>
>>> I probably missed something obvious, but what?
>>
>> You're missing the fact that llvmc is highly experimental, and is not
>> really usable yet.  Please use llvm-gcc directly, thanks!
>
> Yes, but I want to compile LLVM assembly language (to PIC shared  
> object
> file on AMD64/Linux/Debian), not C.
>
> Is llvm-gcc still needed in that case?

No, use llc in that case.

 From llc --help:

   -relocation-model            - Choose relocation model
     =default                   -   Target default relocation model
     =static                    -   Non-relocatable code
     =pic                       -   Fully relocatable, position  
independent code
     =dynamic-no-pic            -   Relocatable external references,  
non-relocatable code

— Gordon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20071022/c10a824c/attachment.html>


More information about the llvm-dev mailing list