чување d45a7e5943960ce1724db0630b568c43070c3f3f
родитељ 9f841f4ee15fd592ae938dcd093b5128b3323337
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Mon, 1 May 2023 18:11:42 +0200
Update GDB to 13.1
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 6, додавања: 23(+), брисања: 110(-)
diff --git a/TODO b/TODO
@@ -6,7 +6,7 @@ TODO
[x] docbook-xml
[x] docbook-xsl-nons
[x] galeb-howtos
- [ ] gdb
+ [x] gdb
[x] glib
[x] gmime
[x] isync
diff --git a/gdb/config.mk b/gdb/config.mk
@@ -1,5 +1,6 @@
PKGBASE= gdb
-PKGVER= 12.1
+PKGVER= 13.1
LEGALFILES= COPYING COPYING.LIB COPYING3 COPYING3.LIB
PREFIX= /sucks
SRCTARBALLS= https://ftp.gnu.org/gnu/gdb/gdb-$PKGVER.tar.xz
+SHA512SUMS= e65054ffbc0357eeed4b17e1edc5ef45aa73c9ddf3b1210651e3d859576e27c1d27b266800fe26328eda58857455ccd8632f4000cfc5f63f90854096290187ca
diff --git a/gdb/mkfile b/gdb/mkfile
@@ -8,8 +8,10 @@ BINDIR= $PREFIX/bin
MANDIR= $PREFIX/share/man
SYSCONFDIR= /etc
LOCALSTATEDIR= /var
-CFLAGS= -Os -pipe -fPIC
-LDFLAGS= -s -lterminfo
+CCOMMON= -Os -pipe -fPIC
+CFLAGS= $CCOMMON -Wno-discarded-qualifiers
+CXXFLAGS= $CCOMMON
+LDFLAGS=
$PKGBASE:QV:
for patch in $(find pat -type f | sort); do
@@ -27,7 +29,9 @@ $PKGBASE:QV:
printf " CD\tbuild\n"
cd build
printf " CONF\t%s\n" --prefix=$PREFIX
- CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS \
+ CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" \
+# --with-static-standard-libraries \
+# --disable-host-shared \
../configure --prefix=$PREFIX \
--with-system-readline \
--disable-nls \
@@ -41,8 +45,8 @@ $PKGBASE:QV:
install:QV: $PKGBASE install-legal
printf " CD\tbuild\n"
cd build
- printf " MAKE\t%s\n" "DESTDIR=$(realpath ../$DESTDIR) install"
- make DESTDIR=$(realpath ../$DESTDIR) install
+ printf " MAKE\t%s\n" "DESTDIR=$(realpath ../$DESTDIR) install-strip"
+ make DESTDIR=$(realpath ../$DESTDIR) install-strip
printf " CD\t-\n"
cd - >/dev/null
diff --git a/gdb/pat/basename.patch b/gdb/pat/basename.patch
@@ -0,0 +1,11 @@
+--- a/include/libiberty.h 2023-02-19 14:45:05.000000000 +0100
++++ b/include/libiberty.h 2023-05-01 17:41:29.431420244 +0200
+@@ -109,7 +109,7 @@
+ || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) \
+ || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) \
+ || defined (__DragonFly__) || defined (HAVE_DECL_BASENAME)
+-extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
++extern char *basename (char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
+ #else
+ /* Do not allow basename to be used if there is no prototype seen. We
+ either need to use the above prototype or have one from
diff --git a/gdb/pat/ppc-musl.patch b/gdb/pat/ppc-musl.patch
@@ -1,93 +0,0 @@
---- a/nat/ppc-linux.h
-+++ b/nat/ppc-linux.h
-@@ -18,7 +18,90 @@
- #ifndef PPC_LINUX_H
- #define PPC_LINUX_H 1
-
-+#if defined(__GLIBC__) || defined(__UCLIBC__)
- #include <asm/ptrace.h>
-+#else // Musl
-+// Do not include ptrace.h from Linux headers and since
-+// Musl does not define PT_*, define them:
-+
-+#define PT_R0 0
-+#define PT_R1 1
-+#define PT_R2 2
-+#define PT_R3 3
-+#define PT_R4 4
-+#define PT_R5 5
-+#define PT_R6 6
-+#define PT_R7 7
-+#define PT_R8 8
-+#define PT_R9 9
-+#define PT_R10 10
-+#define PT_R11 11
-+#define PT_R12 12
-+#define PT_R13 13
-+#define PT_R14 14
-+#define PT_R15 15
-+#define PT_R16 16
-+#define PT_R17 17
-+#define PT_R18 18
-+#define PT_R19 19
-+#define PT_R20 20
-+#define PT_R21 21
-+#define PT_R22 22
-+#define PT_R23 23
-+#define PT_R24 24
-+#define PT_R25 25
-+#define PT_R26 26
-+#define PT_R27 27
-+#define PT_R28 28
-+#define PT_R29 29
-+#define PT_R30 30
-+#define PT_R31 31
-+
-+#define PT_NIP 32
-+#define PT_MSR 33
-+#define PT_ORIG_R3 34
-+#define PT_CTR 35
-+#define PT_LNK 36
-+#define PT_XER 37
-+#define PT_CCR 38
-+#ifndef __powerpc64__
-+#define PT_MQ 39
-+#else
-+#define PT_SOFTE 39
-+#endif
-+#define PT_TRAP 40
-+#define PT_DAR 41
-+#define PT_DSISR 42
-+#define PT_RESULT 43
-+#define PT_DSCR 44
-+#define PT_REGS_COUNT 44
-+
-+#define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */
-+
-+#ifndef __powerpc64__
-+
-+#define PT_FPR31 (PT_FPR0 + 2*31)
-+#define PT_FPSCR (PT_FPR0 + 2*32 + 1)
-+
-+#else /* __powerpc64__ */
-+
-+#define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */
-+
-+
-+#define PT_VR0 82 /* each Vector reg occupies 2 slots in 64-bit */
-+#define PT_VSCR (PT_VR0 + 32*2 + 1)
-+#define PT_VRSAVE (PT_VR0 + 33*2)
-+
-+
-+/*
-+ * Only store first 32 VSRs here. The second 32 VSRs in VR0-31
-+ */
-+#define PT_VSR0 150 /* each VSR reg occupies 2 slots in 64-bit */
-+#define PT_VSR31 (PT_VSR0 + 2*31)
-+#endif /* __powerpc64__ */
-+
-+#endif // Libc
-+
- #include <asm/cputable.h>
-
- /* This sometimes isn't defined. */
diff --git a/gdb/pat/ppc-ptregs.patch b/gdb/pat/ppc-ptregs.patch
@@ -1,10 +0,0 @@
---- a/gdbserver/linux-ppc-low.cc
-+++ b/gdbserver/linux-ppc-low.cc
-@@ -21,7 +21,6 @@
- #include "linux-low.h"
-
- #include <elf.h>
--#include <asm/ptrace.h>
-
- #include "nat/ppc-linux.h"
- #include "linux-ppc-tdesc.h"