]> sourceware.org Git - systemtap.git/commitdiff
PR4186 cont'd: fix 32-bit i386 builds
authorFrank Ch. Eigler <fche@elastic.org>
Mon, 24 Aug 2009 16:54:42 +0000 (12:54 -0400)
committerFrank Ch. Eigler <fche@elastic.org>
Mon, 24 Aug 2009 16:57:21 +0000 (12:57 -0400)
* main.cxx (main): Initialize s.architecture to value as if
  from `uname -i`.  Specifically, squash i?86 -> i386.

main.cxx

index d62c2fac694bd444a064d04907223bf566d9e1d3..6c7dc31561dca6fdacfa1b0483c11e7cfd178b08 100644 (file)
--- a/main.cxx
+++ b/main.cxx
@@ -462,6 +462,11 @@ main (int argc, char * const argv [])
   s.kernel_release = string (buf.release);
   s.kernel_build_tree = "/lib/modules/" + s.kernel_release + "/build";
 
+  // Copy logic from coreutils uname (uname -i) to squash i?86 -> i386
+  if (strlen(buf.machine)==4 && buf.machine[0] == 'i' &&
+      buf.machine[2] == '8' && buf.machine[3] == '6')
+    buf.machine[1] = '3';
+
   s.architecture = string (buf.machine);
   for (unsigned i=0; i<5; i++) s.perpass_verbose[i]=0;
   s.timing = false;
This page took 0.031634 seconds and 5 git commands to generate.