Difference between libgcc.a and libgcc_s.a?

无人久伴 提交于 2020-01-22 18:22:26

问题


We have installed GCC and libgcc on AIX 6.1 using the RPM files.

What I would like to know is why "libgcc_s.a" was not created under the following folder?

/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.2.0/

There is a libgcc.a in that folder but not libgcc_s.a and the linker seems to want that libgcc_s.a file there

Reason I ask is if I try create a simple "hello world" type shared lib on AIX 6.1 it complains and says someting like "cannot find libgcc_s.a".

I have run a command like:

find / -name '*libgcc*' -print 2>/dev/null

to try find libgcc_s.a on tha machine but there is nothing ;-(

Any idea how I can get libgcc_s.a onto the AIX machine?


回答1:


You might try to compile using the option -static-libgcc.




回答2:


Probably you may want to build gcc with --enable-shared option.



来源:https://stackoverflow.com/questions/7811962/difference-between-libgcc-a-and-libgcc-s-a

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!