Преглед изворни кода

separate gdb/gdbserver package builds

try to get coldfire gdbserver to compile, but still not working.
An older version works, seems that newer versions are not tested
for uClinux case.
Waldemar Brodkorb пре 9 година
родитељ
комит
bf80fd6d0c

+ 3 - 6
package/gdb/Makefile

@@ -11,6 +11,8 @@ PKG_DEPENDS:=		libthread-db libncurses libexpat zlib
 PKG_BUILDDEP:=		ncurses readline expat zlib
 PKG_NOPARALLEL:=	1
 
+PKG_ARCH_DEPENDS:=	!m68k
+
 PKG_BUILDDEP_UCLIBC:=	libiconv-tiny
 PKG_BUILDDEP_UCLIBC_NG:=libiconv-tiny
 
@@ -18,16 +20,11 @@ include ${ADK_TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,GDB,gdb,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
-ifeq ($(ADK_TARGET_LIB_MUSL),y)
-CONFIGURE_ARGS+=	--disable-gdbserver
-else
-CONFIGURE_ARGS+=	--enable-gdbserver
-endif
-
 TARGET_CFLAGS+=		${TARGET_CPPFLAGS} -fPIC
 CONFIGURE_ARGS+=	--without-uiout \
 			--disable-tui \
 			--disable-gdbtk \
+			--disable-gdbserver \
 			--without-x \
 			--disable-sim \
 			--disable-werror \

+ 3 - 4
package/gdbserver/Makefile

@@ -4,14 +4,13 @@
 include ${ADK_TOPDIR}/rules.mk
 include ${ADK_TOPDIR}/toolchain/gdb/Makefile.inc
 
-PKG_NAME:=		gdb
+PKG_NAME:=		gdbserver
 PKG_DESCR:=		remote programm debugger utility
 PKG_SECTION:=		app/debug
-PKG_DEPENDS:=		libthread-db
-
 PKG_LIBC_DEPENDS:=	!musl
-PKG_SUBPKGS:=		GDBSERVER
 
+DISTFILES:=		gdb-${PKG_VERSION}.tar.xz
+WRKDIST=		${WRKDIR}/gdb-${PKG_VERSION}
 WRKSRC=                 ${WRKDIST}/gdb/gdbserver
 
 include ${ADK_TOPDIR}/mk/package.mk

+ 10 - 0
package/gdbserver/patches/patch-gdb_common_linux-ptrace_c

@@ -0,0 +1,10 @@
+--- gdb-7.8.orig/gdb/common/linux-ptrace.c	2014-07-29 14:37:42.000000000 +0200
++++ gdb-7.8/gdb/common/linux-ptrace.c	2014-09-05 00:52:41.353409084 +0200
+@@ -23,6 +23,7 @@
+ #include <string.h>
+ #endif
+ 
++#include <sched.h>
+ #include "linux-ptrace.h"
+ #include "linux-procfs.h"
+ #include "nat/linux-waitpid.h"

+ 22 - 0
package/gdbserver/patches/patch-gdb_gdbserver_linux-low_c

@@ -0,0 +1,22 @@
+--- gdb-7.8.orig/gdb/gdbserver/linux-low.c	2014-07-29 14:37:42.000000000 +0200
++++ gdb-7.8/gdb/gdbserver/linux-low.c	2014-09-05 00:47:25.427321525 +0200
+@@ -4933,15 +4933,15 @@ static int
+ linux_read_offsets (CORE_ADDR *text_p, CORE_ADDR *data_p)
+ {
+   unsigned long text, text_end, data;
+-  int pid = lwpid_of (get_thread_lwp (current_inferior));
++  int pid = lwpid_of (current_inferior);
+ 
+   errno = 0;
+ 
+-  text = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) PT_TEXT_ADDR,
++  text = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) (PT_TEXT_ADDR),
+ 		 (PTRACE_TYPE_ARG4) 0);
+-  text_end = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) PT_TEXT_END_ADDR,
++  text_end = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) (PT_TEXT_END_ADDR),
+ 		     (PTRACE_TYPE_ARG4) 0);
+-  data = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) PT_DATA_ADDR,
++  data = ptrace (PTRACE_PEEKUSER, pid, (PTRACE_TYPE_ARG3) (PT_DATA_ADDR),
+ 		 (PTRACE_TYPE_ARG4) 0);
+ 
+   if (errno == 0)