From 0cd2665ec298fb30765f7f2fae019d525fc5b272 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Mon, 24 Aug 2009 12:54:42 -0400 Subject: [PATCH] PR4186 cont'd: fix 32-bit i386 builds * main.cxx (main): Initialize s.architecture to value as if from `uname -i`. Specifically, squash i?86 -> i386. --- main.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.cxx b/main.cxx index d62c2fac6..6c7dc3156 100644 --- 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; -- 2.43.5