Skip to contentSkip to conversation

recordmcount.pl: x86: Derive arch from bits argument

PATCH In review Jan Kiszka 1 participant 2 messages Jan 11, 2010 – Jan 16, 2010

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 recordmcount.pl: x86: Derive arch from bits argument

Let the arch argument be overruled by bits. Otherwise, building of external modules against a i386 target on a x86-64 host (and likely vice versa as well) fails unless ARCH=i386 is explicitly passed to make.

---
 scripts/recordmcount.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/recordmcount.pl +1 -1
index 92f09fe..ea6f6e3 100755
@@ -194,7 +194,7 @@ sub check_objcopy
     }
 }
 
-if ($arch eq "x86") {
+if ($arch =~ /(x86(_64)?)|(i386)/) {
     if ($bits == 64) {
 	$arch = "x86_64";
     } else {
Signature · 1 line
1.6.0.2
#1 lore raw

[tip:tracing/urgent] tracing/x86: Derive arch from bits argument in recordmcount.pl

Commit-ID:  b82a4045f7962483a78a874343dc6e31b79c96c1
Gitweb:     http://git.kernel.org/tip/b82a4045f7962483a78a874343dc6e31b79c96c1
Author:     Jan Kiszka <[email protected]>
AuthorDate: Mon, 11 Jan 2010 11:31:44 +0100
Committer:  Steven Rostedt <[email protected]>
CommitDate: Mon, 11 Jan 2010 23:49:35 -0500

tracing/x86: Derive arch from bits argument in recordmcount.pl

Let the arch argument be overruled by bits. Otherwise, building of external modules against a i386 target on a x86-64 host (and likely vice versa as well) fails unless ARCH=i386 is explicitly passed to make.

LKML-Reference: <[email protected]>

---
 scripts/recordmcount.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/recordmcount.pl +1 -1
index 92f09fe..ea6f6e3 100755
@@ -194,7 +194,7 @@ sub check_objcopy
     }
 }
 
-if ($arch eq "x86") {
+if ($arch =~ /(x86(_64)?)|(i386)/) {
     if ($bits == 64) {
 	$arch = "x86_64";
     } else {