summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD13
-rw-r--r--gdb.patch34
2 files changed, 43 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d6fc77ddd6a6..84a07b278c1a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,23 +4,27 @@ _target="mips-harvard-os161"
pkgname=${_target}-gdb
_pkgver=7.8+os161-2.1
pkgver=${_pkgver/os161-/os161_}
-pkgrel=1
+pkgrel=2
pkgdesc="The GNU Debugger modified for ${_target} arquitecture. This is part of toolset for the course os161 from Harvard."
arch=(i686 x86_64)
url="http://os161.eecs.harvard.edu/"
license=('GPL' 'LGPL')
groups=('mips-harvard-os161-toolchain')
-depends=('mips-harvard-os161-binutils>=2.24' 'gmp' 'mpfr' 'libmpc')
+depends=('mips-harvard-os161-binutils>=2.24' 'gmp' 'mpfr' 'libmpc' 'guile2.0')
makedepends=('flex' 'bison')
options=(staticlibs !libtool !emptydirs !strip zipman docs)
-source=(http://os161.eecs.harvard.edu/download/gdb-${_pkgver}.tar.gz)
-md5sums=('26295f3f67090e534e3d488a3edce5ae')
+source=(http://os161.eecs.harvard.edu/download/gdb-${_pkgver}.tar.gz
+gdb.patch)
+md5sums=('26295f3f67090e534e3d488a3edce5ae'
+'SKIP')
prepare() {
cd gdb-${_pkgver}
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
+ patch -p1 -i ${srcdir}/gdb.patch
+
mkdir ${srcdir}/gdb-build
}
@@ -34,6 +38,7 @@ build() {
../gdb-${_pkgver}/configure --prefix=/usr \
--program-prefix=${_target}- \
--with-local-prefix=/usr/lib/${_target} \
+ --with-guile=guile-2.0 \
--target=${_target} --host=${CHOST} --build=${CHOST} \
--disable-nls --nfp \
--disable-shared --disable-threads \
diff --git a/gdb.patch b/gdb.patch
new file mode 100644
index 000000000000..10ac97d9f571
--- /dev/null
+++ b/gdb.patch
@@ -0,0 +1,34 @@
+diff -rup gdb-7.8+os161-2.1/sim/common/sim-arange.c gdb-7.8+os161-2.1-new/sim/common/sim-arange.c
+--- gdb-7.8+os161-2.1/sim/common/sim-arange.c 2017-07-29 07:10:29.906548572 +0000
++++ gdb-7.8+os161-2.1-new/sim/common/sim-arange.c 2017-07-29 07:11:59.793216829 +0000
+@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a
+ build_search_tree (ar);
+ }
+
+-#endif /* DEFINE_NON_INLINE_P */
+-
+-#if DEFINE_INLINE_P
+-
+-SIM_ARANGE_INLINE int
++int
+ sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr)
+ {
+ ADDR_RANGE_TREE *t = ar->range_tree;
+@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad
+ return 0;
+ }
+
+-#endif /* DEFINE_INLINE_P */
++#endif /* DEFINE_NON_INLINE_P */
+diff -rup gdb-7.8+os161-2.1/sim/common/sim-arange.h gdb-7.8+os161-2.1-new/sim/common/sim-arange.h
+--- gdb-7.8+os161-2.1/sim/common/sim-arange.h 2017-07-29 06:53:05.909863433 +0000
++++ gdb-7.8+os161-2.1-new/sim/common/sim-arange.h 2017-07-29 06:56:21.329866890 +0000
+@@ -62,7 +62,7 @@ extern void sim_addr_range_delete (ADDR_
+
+ /* Return non-zero if ADDR is in range AR, traversing the entire tree.
+ If no range is specified, that is defined to mean "everything". */
+-extern INLINE int
++extern int
+ sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/);
+ #define ADDR_RANGE_HIT_P(ar, addr) \
+ ((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr)))