openSUSE:Release Engineering Tricks
Tips and Tricks used in openSUSE release engineering
Switching a GCC major version
gcc major versions are packaged in separate packages and are parallel installable. There are some system libraries, especially libgcc_s1 that need to be provided by one gcc version. In general the highest available gcc version in a distro needs to provide that library for programs compiled with that version to work. There are several macros that control the gcc packages:
- %gcc_version - determines the system compiler version
- %product_libs_gcc_ver - determines which gcc version creates libgcc_s1
- %product_libs_gcc_ver_lib* - determines which gcc package builds the library with the specified soname
In order to migrate system libs to the new compiler it is recommended to
- switch the rebuild mode of the project to 'local'. That avoids random packages starting to build
- adjust the %product_libs* macros for the new compiler
- check in/trigger the new compiler
- trigger the old compiler
- switch the project back to it's original rebuild mode
- potentially trigger full rebuild