summaryrefslogtreecommitdiffstats
path: root/main/gdb
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-04-29 08:11:04 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-04-29 08:11:04 +0000
commitf4d91e795be1aff3b1a02d60509b9fe7e4cbb323 (patch)
tree57daed7235fcb32425bfe0f5a812d4633afadebd /main/gdb
parent17075bea5798ded3044229b8e4cc84dd845fc20d (diff)
downloadaports-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')
-rw-r--r--main/gdb/APKBUILD32
-rw-r--r--main/gdb/cpuid-pic.patch41
2 files changed, 61 insertions, 12 deletions
diff --git a/main/gdb/APKBUILD b/main/gdb/APKBUILD
index 27e13b262..3fd3eef8b 100644
--- a/main/gdb/APKBUILD
+++ b/main/gdb/APKBUILD
@@ -1,16 +1,18 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gdb
pkgver=7.6
-pkgrel=0
+pkgrel=1
pkgdesc="The GNU Debugger"
url="http://sources.redhat.com/gdb/"
arch="all"
license="GPL3"
depends=
-makedepends="ncurses-dev expat-dev texinfo readline-dev libiconv-dev python-dev"
+makedepends="ncurses-dev expat-dev texinfo readline-dev libiconv-dev python-dev
+ autoconf automake libtool"
subpackages="$pkgname-doc"
source="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.bz2
- 05_all_readline-headers.patch"
+ 05_all_readline-headers.patch
+ cpuid-pic.patch"
# patches were found here:
# http://distfiles.gentoo.org/distfiles/gdb-7.4-patches-1.tar.xz
_builddir="$srcdir"/$pkgname-$pkgver
@@ -28,12 +30,15 @@ prepare() {
build () {
cd "$_builddir"
- ./configure --prefix=/usr \
- --disable-nls \
- --with-system-readline \
- --disable-werror \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info
+ local _config="--prefix=/usr
+ --disable-nls
+ --with-system-readline
+ --disable-werror
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info"
+ ./configure $_config
+ cd opcodes && ./configure $_config || return 1
+ cd ..
make || return 1
}
@@ -47,8 +52,11 @@ package() {
}
md5sums="fda57170e4d11cdde74259ca575412a8 gdb-7.6.tar.bz2
-701b030be4c141eab6409d37f5afa11b 05_all_readline-headers.patch"
+701b030be4c141eab6409d37f5afa11b 05_all_readline-headers.patch
+a679796124dc56798cdebffa524f661c cpuid-pic.patch"
sha256sums="a410e8f35ee70cce83dbbf1da9e2a8373f271ac0e4b71db4336ae293fc7bdf1b gdb-7.6.tar.bz2
-390a88feac5f1d3980458057e1903a3fa104edb32daa6bb76396af1cb91cefc2 05_all_readline-headers.patch"
+390a88feac5f1d3980458057e1903a3fa104edb32daa6bb76396af1cb91cefc2 05_all_readline-headers.patch
+d22ce97b01c3bb25cc17831c60b984eebe2c1fe573b04a0d87e535794294e399 cpuid-pic.patch"
sha512sums="3b4f7f25ab8a8014a339966fd165dac6ac63df7d6403c338bbd38737bc0033d7e6461cdea2cd6dd095335a9d2a0ecd9d694e862b8d54d269dae577402e2b3ffe gdb-7.6.tar.bz2
-dfb7f7272305779599d3da51ce1158628473534a96f2721d7060930c94800a4efc061321bc5a9e455c72f670cfb77f0eb01cb696da55a4accf96f555377f551f 05_all_readline-headers.patch"
+dfb7f7272305779599d3da51ce1158628473534a96f2721d7060930c94800a4efc061321bc5a9e455c72f670cfb77f0eb01cb696da55a4accf96f555377f551f 05_all_readline-headers.patch
+10551a28767b270ff5107fde595ad8877f3f2d684edccc85c18d08e3a9a2c4afe48da804adf9f8e716b666817906b22565a614d22fbc91e4ee650e1ecdb8fb0e cpuid-pic.patch"
diff --git a/main/gdb/cpuid-pic.patch b/main/gdb/cpuid-pic.patch
new file mode 100644
index 000000000..e250a9509
--- /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)