blob: 2891dbc4c394053693b6436511ef04b6b593c606 (
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
|
# Maintainer: Orlando Arias <orlandoarias at gmail <dot> com>
_target=msp430-elf
pkgname="${_target}-gdb"
pkgver=15.1
pkgrel=1
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" "ncurses" "gdb-common" "guile" "expat" "xz" "gmp")
source=("http://ftp.gnu.org/gnu/gdb/gdb-${pkgver}.tar.xz")
sha256sums=('38254eacd4572134bca9c5a5aa4d4ca564cbbd30c369d881f733fb6b903354f2')
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 \
--target=${_target} \
--host=${CHOST} \
--build=${CHOST} \
--with-sysroot=/usr/${_target} \
--disable-nls \
--with-python=/usr/bin/python \
--enable-multilib \
--with-system-readline \
--disable-werror \
--enable-tui \
--with-guile
make
}
package() {
cd "$srcdir/gdb-$pkgver/gdb-build"
make DESTDIR="$pkgdir" install
# handle conflicts
rm -r ${pkgdir}/usr/share/info
rm -r ${pkgdir}/usr/share/man
rm -r ${pkgdir}/usr/share/gdb/
rm -r ${pkgdir}/usr/include/gdb
rm -r ${pkgdir}/usr/include/sim
}
# vim:set ts=2 sw=2 et:
|