diff options
| author | 2018-06-03 20:24:15 +1000 | |
|---|---|---|
| committer | 2018-06-03 20:24:15 +1000 | |
| commit | b5240b14396dd9c781b5c759830560cdcf1b7a10 (patch) | |
| tree | d957cb1ac7546e8cf0c653549de2eb061fe55739 /scripts | |
| parent | Merge branch 'topic/ppc-kvm' into next (diff) | |
| parent | powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS (diff) | |
Merge branch 'topic/kbuild' into next
Merge in some commits we're sharing with the kbuild tree.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/recordmcount.pl | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index 191eb949d52c..fe06e77c15eb 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl @@ -266,13 +266,29 @@ if ($arch eq "x86_64") { $objcopy .= " -O elf32-sh-linux"; } elsif ($arch eq "powerpc") { + my $ldemulation; + $local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\.?\\S+)"; # See comment in the sparc64 section for why we use '\w'. $function_regex = "^([0-9a-fA-F]+)\\s+<(\\.?\\w*?)>:"; $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s\\.?_mcount\$"; + if ($endian eq "big") { + $cc .= " -mbig-endian "; + $ld .= " -EB "; + $ldemulation = "ppc" + } else { + $cc .= " -mlittle-endian "; + $ld .= " -EL "; + $ldemulation = "lppc" + } if ($bits == 64) { - $type = ".quad"; + $type = ".quad"; + $cc .= " -m64 "; + $ld .= " -m elf64".$ldemulation." "; + } else { + $cc .= " -m32 "; + $ld .= " -m elf32".$ldemulation." "; } } elsif ($arch eq "arm") { |
