Difference between libgcc.a and libgcc_s.a?

2019-04-06 01:43发布

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?

标签: c gcc aix
2条回答
疯言疯语
2楼-- · 2019-04-06 02:23

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

查看更多
萌系小妹纸
3楼-- · 2019-04-06 02:34

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

查看更多
登录 后发表回答