openSUSE:Release Engineering Tricks

Jump to: navigation, search

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

  1. switch the rebuild mode of the project to 'local'. That avoids random packages starting to build
  2. adjust the %product_libs* macros for the new compiler
  3. check in/trigger the new compiler
  4. trigger the old compiler
  5. switch the project back to it's original rebuild mode
  6. potentially trigger full rebuild