# to squash uname -m -> $(SUBARCH).
#
# This logic needs to match the logic in the systemtap_session
- # constructor in session.cxx.
+ # constructor in util.cxx (normalize_machine)
local machine=`uname -m`
case $machine in
arm*) machine="arm" ;;
sa1*) machine="arm" ;;
s390*) machine="s390" ;;
+ aarch64) machine="arm64" ;;
ppc*) machine="powerpc" ;;
mips*) machine="mips" ;;
sh?) machine="sh" ;;
# the default is to just use the output of 'uname -m'
esac
-
+ # NB: see also util.cxx (normalize_machine)
+
echo $machine
}
// But: RHBZ669082 reminds us that this renaming post-dates some
// of the kernel versions we know and love. So in buildrun.cxx
// we undo this renaming for ancient powerpc.
-
+ //
+ // NB repeated: see also stap-env (stap_get_arch)
if (machine == "i486") return "i386";
else if (machine == "i586") return "i386";
else if (machine == "i686") return "i386";
else if (machine.substr(0,3) == "sh2") return "sh";
else if (machine.substr(0,3) == "sh3") return "sh";
else if (machine.substr(0,3) == "sh4") return "sh";
+ // NB repeated: see also stap-env (stap_get_arch)
return machine;
}