Building Image for multiple machines

Hello guys,
I want to build an image for 2 different machines i.e. rv64ima and rv64imafd with the help of Yocto but the recipes are common for both . Is there any way that I can change the input flags for respective machines in their machine configuration file. So that the only parameter I should pass is the name of machine.

Hi

SiFive Freedom-U SDK currently only supports RV64GC systems.