diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-09 20:54:22 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-14 10:35:36 +0200 |
commit | 3989cce82b272bd6312555fcc47c11715c157102 (patch) | |
tree | 6c49985859e25991268317b23cc4260ce459134a /scripts/recordmcount.pl | |
parent | c5131ad6c3cbe8f6674993e29a76cecf8deb4384 (diff) | |
download | op-kernel-dev-3989cce82b272bd6312555fcc47c11715c157102.zip op-kernel-dev-3989cce82b272bd6312555fcc47c11715c157102.tar.gz |
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>
Diffstat (limited to 'scripts/recordmcount.pl')
-rwxr-xr-x | scripts/recordmcount.pl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index 44b4b23..e4922a6 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl @@ -108,6 +108,20 @@ if ($#ARGV < 6) { my ($arch, $objdump, $objcopy, $cc, $ld, $nm, $rm, $mv, $inputfile) = @ARGV; +if ($arch eq "i386") { + $ld = "ld -m elf_i386"; + $objdump = "objdump -M i386"; + $objcopy = "objcopy -O elf32-i386"; + $cc = "gcc -m32"; +} + +if ($arch eq "x86_64") { + $ld = "ld -m elf_x86_64"; + $objdump = "objdump -M x86-64"; + $objcopy = "objcopy -O elf64-x86-64"; + $cc = "gcc -m64"; +} + $objdump = "objdump" if ((length $objdump) == 0); $objcopy = "objcopy" if ((length $objcopy) == 0); $cc = "gcc" if ((length $cc) == 0); |