diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-04-29 08:11:04 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-04-29 08:11:04 +0000 |
commit | f4d91e795be1aff3b1a02d60509b9fe7e4cbb323 (patch) | |
tree | 57daed7235fcb32425bfe0f5a812d4633afadebd /main/gdb/cpuid-pic.patch | |
parent | 17075bea5798ded3044229b8e4cc84dd845fc20d (diff) | |
download | aports-f4d91e795be1aff3b1a02d60509b9fe7e4cbb323.tar.bz2 aports-f4d91e795be1aff3b1a02d60509b9fe7e4cbb323.tar.xz |
main/gdb: build fix
- Seem slike we need to run configure in opcodes separately.
- fix cpuid asm to not use ebx for our PIC
Diffstat (limited to 'main/gdb/cpuid-pic.patch')
-rw-r--r-- | main/gdb/cpuid-pic.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/main/gdb/cpuid-pic.patch b/main/gdb/cpuid-pic.patch new file mode 100644 index 0000000000..e250a95098 --- /dev/null +++ b/main/gdb/cpuid-pic.patch @@ -0,0 +1,41 @@ +--- ./gdb/common/linux-btrace.c.orig 2013-04-29 07:44:49.320273451 +0000 ++++ ./gdb/common/linux-btrace.c 2013-04-29 08:05:02.111631215 +0000 +@@ -342,10 +342,12 @@ + #if defined __i386__ || defined __x86_64__ + unsigned int cpuid, model, family; + +- __asm__ __volatile__ ("movl $1, %%eax;" ++ __asm__ __volatile__ ("movl %%ebx, %%edi;" ++ "movl $1, %%eax;" + "cpuid;" ++ "movl %%edi, %%ebx;" + : "=a" (cpuid) +- :: "%ebx", "%ecx", "%edx"); ++ :: "%ecx", "%edx", "%edi"); + + family = (cpuid >> 8) & 0xf; + model = (cpuid >> 4) & 0xf; +@@ -392,7 +394,8 @@ + #if defined __i386__ || defined __x86_64__ + char vendor[13]; + +- __asm__ __volatile__ ("xorl %%ebx, %%ebx;" ++ __asm__ __volatile__ ("movl %%ebx, %%edi;" ++ "xorl %%ebx, %%ebx;" + "xorl %%ecx, %%ecx;" + "xorl %%edx, %%edx;" + "movl $0, %%eax;" +@@ -400,11 +403,12 @@ + "movl %%ebx, %0;" + "movl %%edx, %1;" + "movl %%ecx, %2;" ++ "movl %%edi, %%ebx;" + : "=m" (vendor[0]), + "=m" (vendor[4]), + "=m" (vendor[8]) + : +- : "%eax", "%ebx", "%ecx", "%edx"); ++ : "%eax", "%ecx", "%edx", "%edi"); + vendor[12] = '\0'; + + if (strcmp (vendor, "GenuineIntel") == 0) |