Impact on upgrade gcc or binutils

情到浓时终转凉″ 提交于 2019-12-25 13:35:13

问题


I want to use Red Hat Enterprise Linux 5.8 to compile folly, and gcc is 4.1.2. But folly needs gcc >=4.6. So I need to upgrade gcc to 4.6, maybe binutils etc. If new toolchain generates binary files such as *.a *.so, would running them on old Red Hat Enterprise Linux 5.8 bring any problem or unstabitily?


回答1:


Probably no big trouble (because GCC 4.1 & soon released GCC 4.8 produces compatible code), at least for C code.

For C++ code I believe there is a incompatibility. Certainly the libstdc++ is tied to the compiler version. Sometimes it may be compatible in practice, sometimes not (but the C++ ABI slightly changed too). And this incompatibility may spread to every C++ library.

I believe you should try. If you recompile -with the same newest GCC- all the C++ dependencies, you'll probably be quite safe. So you could compile the newest GCC, then compile folly and all its dependencies with it.

BTW, I would suggest going to the latest GCC (today 4.7, in a few weeks 4.8).



来源:https://stackoverflow.com/questions/14271249/impact-on-upgrade-gcc-or-binutils

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