0

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?

wande
  • 33
  • 1
  • 1
  • 4
  • Related question: http://stackoverflow.com/questions/1726042/recipe-for-compiling-binutils-gcc-together , and [a large compatibility table by osdev.org](http://wiki.osdev.org/Cross-Compiler_Successful_Builds) – Ciro Santilli OurBigBook.com May 15 '15 at 19:12

1 Answers1

0

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).

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547