I now have a working patch that lets you select the preferred gcc version (and from that the libstdc++ version) at built time and lets you override the selection with parameter at run time. However, I am unsure if it is a good idea to set it during build. What worries me is that in Leap 42.3 the package transitively Required by clang is libstdc++48-devel. That is quite old version and does not support many modern C++ features that clang supports. There may be users that have libstdc++ 6 or 7 installed and use it with clang and it just works. If we change clang to select libstdc++ 4.8 by default, things may break. And the only way to make them work again would be by using the runtime option that nobody knows. I am currently leaning to add the patch, but to not set any default, so clang will keep selecting the newest gcc. In addition I will check if we could add some warning like "The selected gcc version (7) does not seem to have matching libstdc++ installed. You may need to install it or use --gcc-preferred-version parameter to select another version."