g++\gcc forward ABI compatibility?

Hello there.

I'll be honest, I don't really understand how this works as much as I should. However, I have an application that's setup and built with GCC\G++ version 4.8. It uses a proprietary project generation system and I would really like to move at least some of it to use CMake and build it for whatever toolchain I want.

Say I can't rebuild some of the libraries with a newer version of GCC\G++, can I still link against them? They're built with version 4.8, but I would like to use a newer version installed on my system like 7.3 and use C++17 features and such.

Is that doable, does that work?
Can't you port your changes to a new ABI?
Some of it uses libraries that are closed source that I can't modify, hence why I'm asking if forward compatibility is a thing.
https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html

It looks like they try to maintain forward compatibiliity.
Goals

Extending existing, stable ABIs. Versioning gives subsequent releases of library binaries the ability to add new symbols and add functionality, all the while retaining compatibility with the previous releases in the series. Thus, program binaries linked with the initial release of a library binary will still run correctly if the library binary is replaced by carefully-managed subsequent library binaries. This is called forward compatibility.

The reverse (backwards compatibility) is not true. It is not possible to take program binaries linked with the latest version of a library binary in a release series (with additional symbols added), substitute in the initial release of the library binary, and remain link compatible.

Allows multiple, incompatible ABIs to coexist at the same time.
Topic archived. No new replies allowed.