blob: 1b61cd05333c11774184f1277fad15f6b77e1d19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Maintainer: Orlando Arias <orlandoarias at gmail <dot> com>
_target=msp430-elf
pkgname="${_target}-gdb"
pkgver=8.1
pkgrel=2
pkgdesc="The GNU Debugger for the ${_target} target."
arch=('x86_64' 'x86')
url="https://www.gnu.org/software/gdb/download/"
license=('GPL')
groups=('devel')
depends=("python" "readline")
source=("http://ftp.gnu.org/gnu/gdb/gdb-${pkgver}.tar.xz")
sha256sums=('af61a0263858e69c5dce51eab26662ff3d2ad9aa68da9583e8143b5426be4b34')
prepare() {
cd "$srcdir/gdb-$pkgver"
[[ -d gdb-build ]] && rm -rf gdb-build
mkdir gdb-build
# fix libiberty
# sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
}
build() {
unset LDFLAGS
export CFLAGS="-O2 -pipe"
export CXXFLAGS="-O2 -pipe"
export CPPFLAGS="-O2 -pipe"
cd "$srcdir/gdb-$pkgver/gdb-build"
# build gdb
../configure \
--prefix=/usr \
--without-guile \
--target=${_target} \
--host=${CHOST} \
--build=${CHOST} \
--with-sysroot=/usr/${_target} \
--disable-nls \
--with-python=/usr/bin/python \
--with-system-readline \
--disable-werror \
--disable-tui
make
}
package() {
cd "$srcdir/gdb-$pkgver/gdb-build"
make DESTDIR="$pkgdir" install
# fix conflicts
# rm -f ${pkgdir}/usr/lib/libiberty.a
rm -r ${pkgdir}/usr/share/info
# rm -r ${pkgdir}/usr/{info,man}
rm -r ${pkgdir}/usr/share/man
rm -r ${pkgdir}/usr/share/gdb/
rm -r ${pkgdir}/usr/include/gdb
}
# vim:set ts=2 sw=2 et:
|