Use $target_cpu instead of calling uname to know cpu type. Fix crosscompilation.