From f4d91e795be1aff3b1a02d60509b9fe7e4cbb323 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 29 Apr 2013 08:11:04 +0000 Subject: main/gdb: build fix - Seem slike we need to run configure in opcodes separately. - fix cpuid asm to not use ebx for our PIC --- main/gdb/cpuid-pic.patch | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 main/gdb/cpuid-pic.patch (limited to 'main/gdb/cpuid-pic.patch') 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) -- cgit v1.2.3