Add gdb-multiarch

This commit is contained in:
Victor Timofei 2022-04-07 19:53:03 +03:00
commit 582c0c4057
Signed by: vtimofei
GPG Key ID: B790DCEBE281403A
3 changed files with 60 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
*/src/
*/pkg/
*.sig
gdb-multiarch/gdb-*.tar.xz

2
README.md Normal file
View File

@ -0,0 +1,2 @@
# VUR
Victor's User Repository

53
gdb-multiarch/PKGBUILD Normal file
View File

@ -0,0 +1,53 @@
# Maintainer: Victor Timofei <victor@vtimothy.com>
pkgname=gdb-multiarch
pkgver=11.2
pkgrel=1
pkgdesc='The GNU Debugger for all gdb supported architectures (i386/arm/mips...)'
arch=(i686 x86_64)
url='http://www.gnu.org/software/gdb/'
license=(GPL3)
depends=(xz ncurses expat python guile gdb-common=$pkgver)
options=(!emptydirs)
source=(https://ftp.gnu.org/gnu/gdb/gdb-11.2.tar.xz{,.sig})
sha256sums=('1497c36a71881b8671a9a84a0ee40faab788ca30d7ba19d8463c3cc787152e32'
'SKIP')
validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3') # Joel Brobecker <brobecker@adacore.com>
prepare() {
cd gdb-$pkgver
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
sed -i 's#{"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, fsqrt, arithmetic_inst },#{"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, microblaze_fsqrt, arithmetic_inst },#' opcodes/microblaze-opc.h
sed -i 's#fint, fsqrt,#fint, microblaze_fsqrt,#' opcodes/microblaze-opcm.h
}
build() {
cd gdb-$pkgver
mkdir -p build && cd build
../configure \
--enable-targets=all \
--prefix=/build \
--enable-languages=all \
--enable-multilib \
--enable-interwork \
--with-system-readline \
--disable-nls \
--with-python=/usr/bin/python \
--with-guile=guile-2.2 \
--with-system-gdbinit=/etc/gdb/gdbinit
make
}
package() {
cd gdb-$pkgver/build
make DESTDIR="$pkgdir" install
# Following files conflict with 'gdb' package
mkdir -p "$pkgdir"/usr/bin
mv "$pkgdir"/build/bin/gdb "$pkgdir"/usr/bin/gdb-multiarch
rm -r "$pkgdir"/build
}