buildsystem: Implement ARCH_HAS_XXX mechanism

Signed-off-by: Andrew 'Necromant' Andrianov <andrew@ncrmnt.org>