gpg-error includes at least locally-built programs mkheader, mkerrcodes, and mkw32errmap that need to be run on the machine while building.
It uses $(CC_FOR_BUILD) but does not pass through any arguments from the environment.
gpg-error should allow the environment to set flags specific to this build (we don't want to use standard CFLAGS etc because those could be quite different in the case of cross-compilation).
This is similar to T4641 (but for gpgrt instead of libassuan)