-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
patmos-clang always links libraries #1
Comments
Does this happen for other libraries as well? -lm is treated specially, There is a commandline flag (-nolibsyms) to disable adding those On 05/23/2013 02:51 PM, jeuneS2 wrote:
|
It only happens with libm. I understand the reasoning why libm is treated specially, but I am not completely convinced that the benefits outweigh the disadvantages. In particular, I was unable to get clang (for Patmos or x86) to produce bitcode with the intrinsics in question. I completely understand why functions from librt like muldi3 get linked in automatically, I just don't see the point for sqrt, sin, cos etc. |
We first started out with only adding functions that where actually There are several ways to avoid this problem, if you really do not want
It might be possible to do a pass that 'un-uses' pulled in bitcode Cheers, On 05/23/2013 04:51 PM, jeuneS2 wrote:
|
patmos-clang always includes whole libraries given on the command line, even if no function from that library is used. For example, when compiling the program "int main() { return 0; }" with "patmos-clang test.c -o test.elf -lm", the resulting file test.elf includes the whole libm, even though there is obviously no reason to pull in the library code.
The text was updated successfully, but these errors were encountered: