# This is not a package you install into a system.... this creates most of
# a system to run the cross-gdb (64-bit gdb for analyzing 32-bit crash dumps)
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=gdb-cross
_pkgname=gdb
pkgver=17.1
pkgrel=1
pkgdesc='The GNU Debugger'
arch=('aarch64')
url='https://www.gnu.org/software/gdb/'
license=(GPL3)
makedepends=(glibc texinfo python ncurses expat xz mpfr
source-highlight boost readline gcc-libs)
source=(https://ftp.gnu.org/gnu/gdb/${_pkgname}-${pkgver}.tar.xz{,.sig})
validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3') # Joel Brobecker
options=(!debug)
build() {
cd gdb-$pkgver
mkdir -p build && cd build
../configure \
--prefix=/usr \
--disable-nls \
--target=armv7l-unknown-linux-gnueabihf \
--enable-source-highlight \
--enable-tui \
--with-system-readline \
--without-guile \
--with-python=/usr/bin/python3
make
}
package() {
depends=()
cd gdb-$pkgver/build
make DESTDIR="$pkgdir" install
# This explains the empty depends ;) - the _point_ is to ship all the libs in this package, so
# we snatch them from the temporary build host here
( unset LD_PRELOAD
# It is nice to be able to _get a shell_ and _test python_ in the container, so including these binaries.
cp -vLp /usr/bin/{bash,python3} $pkgdir/usr/bin
LIBS=$(ldd $pkgdir/usr/bin/* | grep "/usr/lib/" | cut -d ' ' -f 1 | sort | uniq | grep -v 'ld-linux')
LIBS="$(echo $LIBS)"
echo $LIBS
mkdir -p $pkgdir/usr/lib/aarch64
ln -s usr/lib $pkgdir/lib
ln -s usr/bin $pkgdir/bin
cd /usr/lib
cp -vrp python3.* $pkgdir/usr/lib
cp -vLp $LIBS $pkgdir/usr/lib/aarch64/
cp -vLp /lib/ld-linux-aarch64.so.1 $pkgdir/usr/lib
)
}
sha256sums=('14996f5f74c9f68f5a543fdc45bca7800207f91f92aeea6c2e791822c7c6d876'
'SKIP')