Where the default compiler is set?

For a compilation I want to use gcc and not clang but I did not find where to change the default compiler.

export CC=/usr/bin/gcc;export CXX=/usr/bin/g++;

doesn’t work as I want

Usually export CC=gcc;export CXX=g++ should do the trick – all the build related macros (%configure, %cmake, etc.) check for CC and CXX variables.

Note that %prep, %build and %install are run in separate scripts, so if you export CC=gcc in %prep, it’s NOT still set in %build.

Also, some makefiles are simply broken and hardcode “cc” or so as the name of the C compiler.
If this doesn’t help, please post some context so we can take a look.

Maybe a ping to @bero or @TPG (but I guess they’re quite busy)