need to build static libs with -fPIC for making a shared object #11
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
miles/apple-libtapi#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This happens during osxcross build, but I assume it should be filed here:
I suppose there are two answers to this - add
-fPICto the building of libLLVMSupport.a (this I did), or disable the building of shared libtapi.so and make sure the rest works with a static libtapi.aWhat OS are you on and what compiler do you use?
That would be clang-9 on x86_64 linux . I have seen the "relocation R_X86_64_32S ... when making a shared object, recompile using -fPIC" in the past. PIC (position-independent code) for everything (including bits from a consistuting static object archive) that goes into a shared library seems quite reasonable?
Arch Linux I suppose? File a pull request please.
Fedora, actually. That Arch Linux patch is interesting - I came across those
// ...lines while looking for something else (or maybe this), but never looked any further as they look like c++ comments. I guess llvm/clang must be abusing the c++ comment system and put "functional" comments there.Anyway, I'll have a better look at that change, and if it is adaptable to fedora in a simple way, I'll make a pull.
Have you found a solution?
Sorry haven't revisited this, but apparently I "...add -fPIC to the building of libLLVMSupport.a (this I did).."