From a6a2869a0f4f784bab36410722f6161eab0f4503 Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Fri, 18 Sep 2009 18:17:15 -0400 Subject: stap-start-server(->stap-serverd) now accept -r -R -I -B and -a options for cross compilation. Server correctly advertises itself wrt -r and -a. Fix bug in stap-server: fatal function was potentially recursive. --- stap-env | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'stap-env') diff --git a/stap-env b/stap-env index ceeca465..8a5491dd 100755 --- a/stap-env +++ b/stap-env @@ -40,3 +40,29 @@ fi stap_signing_db=$stap_sysconfdir/systemtap/staprun stap_certfile=stap.cert stap_old_certfile=stap-server.cert + +function get_arch { + # PR4186: Copy logic from coreutils uname (uname -i) to squash + # i?86->i386. Actually, copy logic from linux top-level Makefile + # to squash uname -m -> $(SUBARCH). + + local machine=`uname -m` + machine=`expr "$machine" : '\(...\).*'` + case $machine in + i48) machine="i386" ;; + i58) machine="i386" ;; + i68) machine="i386" ;; + sun) machine="sparc64" ;; + arm) machine="arm" ;; + sa1) machine="arm" ;; + s39) machine="s390" ;; + ppc) machine="powerpc" ;; + mip) machine="mips" ;; + sh2) machine="sh" ;; + sh3) machine="sh" ;; + sh4) machine="sh" ;; + *) machine="unknown" ;; + esac + + echo $machine +} -- cgit