aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-09 14:54:22 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 04:35:36 -0400
commit3989cce82b272bd6312555fcc47c11715c157102 (patch)
tree6c49985859e25991268317b23cc4260ce459134a
parentc5131ad6c3cbe8f6674993e29a76cecf8deb4384 (diff)
ftrace: scripts/recordmcount.pl cross-build hack
hack around: ld: Relocatable linking with relocations from format elf32-i386 (init/.tmp_gl_calibrate.o) to format elf64-x86-64 (init/.tmp_mx_calibrate.o) i CC arch/x86/mm/extable.o objcopy: 'init/.tmp_mx_calibrate.o': No such file rm: cannot remove `init/.tmp_mx_calibrate.o': No such file or directory ld: Relocatable linking with relocations from format elf32-i386 (arch/x86/mm/extable.o) to format elf64-x86-64 (arch/x86/mm/.tmp_mx_extable.o) is not supported mv: cannot stat `arch/x86/mm/.tmp_mx_extable.o': No such file or directory ld: Relocatable linking with relocations from format elf32-i386 (arch/x86/mm/fault.o) to format elf64-x86-64 (arch/x86/mm/.tmp_mx_fault.o) is not supported Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rwxr-xr-xscripts/recordmcount.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 44b4b23e91b2..e4922a6c963b 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -108,6 +108,20 @@ if ($#ARGV < 6) {
108 108
109my ($arch, $objdump, $objcopy, $cc, $ld, $nm, $rm, $mv, $inputfile) = @ARGV; 109my ($arch, $objdump, $objcopy, $cc, $ld, $nm, $rm, $mv, $inputfile) = @ARGV;
110 110
111if ($arch eq "i386") {
112 $ld = "ld -m elf_i386";
113 $objdump = "objdump -M i386";
114 $objcopy = "objcopy -O elf32-i386";
115 $cc = "gcc -m32";
116}
117
118if ($arch eq "x86_64") {
119 $ld = "ld -m elf_x86_64";
120 $objdump = "objdump -M x86-64";
121 $objcopy = "objcopy -O elf64-x86-64";
122 $cc = "gcc -m64";
123}
124
111$objdump = "objdump" if ((length $objdump) == 0); 125$objdump = "objdump" if ((length $objdump) == 0);
112$objcopy = "objcopy" if ((length $objcopy) == 0); 126$objcopy = "objcopy" if ((length $objcopy) == 0);
113$cc = "gcc" if ((length $cc) == 0); 127$cc = "gcc" if ((length $cc) == 0);