This is because redhat uses the following target x86_64-redhat-linux. Other than a change in OS target variant and the missing "gnu" suffix, there is (as far as I know) no difference between x86_64-redhat-linux and x86_64-unknown-linux-gnu.
Possible solutions include:
Adding the redhat target to the default list
Changing the target validation logic to conform to a regex instead of a concrete list of targets
Writing documentation warning users to add the redhat and other such targets to builds.
This is because redhat uses the following target
x86_64-redhat-linux
. Other than a change in OS target variant and the missing "gnu" suffix, there is (as far as I know) no difference betweenx86_64-redhat-linux
and x86_64-unknown-linux-gnu.Possible solutions include:
Personally I prefer the 2nd option.