summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-08-14 09:03:48 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2013-08-14 09:03:48 +0200
commit8d2f8e89c7b4ed479c72000e54bc23621e665699 (patch)
treea9f680f731f439723d161d305a7f4eb3042bedb3 /package
parent8c716c528bc7a91dc1b065269c23707f8c3cb82f (diff)
musl libc compat updates
Diffstat (limited to 'package')
-rw-r--r--package/busybox/Makefile4
-rw-r--r--package/busybox/patches/014-disable-static-libgcc.patch12
-rw-r--r--package/cfgfs/Makefile4
-rw-r--r--package/cfgfs/src/compress.c2
-rw-r--r--package/cfgfs/src/compress.h4
-rw-r--r--package/cfgfs/src/defs.h7
-rw-r--r--package/cfgfs/src/ft_creat.c2
-rw-r--r--package/cfgfs/src/fts.c34
-rw-r--r--package/cfgfs/src/fts_gnu.h4
-rw-r--r--package/cfgfs/src/fts_subs.c2
-rw-r--r--package/cfgfs/src/fts_subs.h2
-rw-r--r--package/cfgfs/src/minilzop.h2
-rw-r--r--package/cfgfs/src/pack.h2
-rw-r--r--package/cfgfs/src/sys_linux.c7
-rw-r--r--package/cfgfs/src/sysdeps.h2
-rw-r--r--package/cfgfs/src/tool.c2
-rw-r--r--package/cfgfs/src/unwraps.c6
-rw-r--r--package/cfgfs/src/wraps.c4
-rw-r--r--package/dropbear/Makefile5
-rw-r--r--package/dropbear/patches/patch-Makefile_in27
-rw-r--r--package/dropbear/patches/patch-cli-runopts_c10
-rw-r--r--package/dropbear/patches/patch-options_h4
-rw-r--r--package/gdb/Makefile3
-rw-r--r--package/gdb/patches/patch-gdb_common_gdb_thread_db_h35
-rw-r--r--package/gdb/patches/patch-gdb_common_linux-ptrace_h10
-rw-r--r--package/gdb/patches/patch-gdb_linux-nat_c26
-rw-r--r--package/libthread_db/Makefile5
-rw-r--r--package/musl/Config.in.manual1
28 files changed, 140 insertions, 88 deletions
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index 4a8e8ea68..e95c58045 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -38,8 +38,12 @@ BB_MAKE_FLAGS:= V=1 IPKG_ARCH="${CPU_ARCH}" ARCH="${ARCH}" GCC_HONOUR_COPTS=s \
HOSTCC="${CC_FOR_BUILD}" HOSTCFLAGS="$(CFLAGS_FOR_BUILD)" \
-C ${WRKBUILD}
ifneq (${ADK_NATIVE},y)
+ifeq ($(ADK_TARGET_LIB_STATIC_LIBGCC),)
BB_MAKE_FLAGS+= CROSS_COMPILE="$(TARGET_CROSS)" EXTRA_LDFLAGS='-static-libgcc'
else
+BB_MAKE_FLAGS+= CROSS_COMPILE="$(TARGET_CROSS)"
+endif
+else
BB_MAKE_FLAGS+= EXTRA_LDFLAGS="-static-libgcc"
endif
diff --git a/package/busybox/patches/014-disable-static-libgcc.patch b/package/busybox/patches/014-disable-static-libgcc.patch
new file mode 100644
index 000000000..79d6345a7
--- /dev/null
+++ b/package/busybox/patches/014-disable-static-libgcc.patch
@@ -0,0 +1,12 @@
+diff -Nur busybox-1.20.2.orig/Makefile.flags busybox-1.20.2/Makefile.flags
+--- busybox-1.20.2.orig/Makefile.flags 2012-06-26 15:35:45.000000000 +0200
++++ busybox-1.20.2/Makefile.flags 2013-08-13 14:25:53.000000000 +0200
+@@ -50,7 +50,7 @@
+ # -fno-guess-branch-probability: prohibit pseudo-random guessing
+ # of branch probabilities (hopefully makes bloatcheck more stable):
+ CFLAGS += $(call cc-option,-fno-guess-branch-probability,)
+-CFLAGS += $(call cc-option,-funsigned-char -static-libgcc,)
++CFLAGS += $(call cc-option,-funsigned-char,)
+ CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1,)
+
+ # FIXME: These warnings are at least partially to be concerned about and should
diff --git a/package/cfgfs/Makefile b/package/cfgfs/Makefile
index ddec3c779..3e53f845c 100644
--- a/package/cfgfs/Makefile
+++ b/package/cfgfs/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= cfgfs
PKG_VERSION:= 1.0.9
-PKG_RELEASE:= 5
+PKG_RELEASE:= 6
PKG_DESCR:= compressed config filesystem
PKG_SECTION:= base
PKG_URL:= http://openadk.org/
@@ -27,7 +27,9 @@ $(eval $(call PKG_template,CFGFS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG
CONFIG_STYLE:= manual
INSTALL_STYLE:= manual
+ifeq ($(ADK_TARGET_LIB_STATIC_LIBGCC),y)
TARGET_LDFLAGS+= -static-libgcc
+endif
do-install:
${INSTALL_DIR} ${IDIR_CFGFS}/sbin
diff --git a/package/cfgfs/src/compress.c b/package/cfgfs/src/compress.c
index b75959c4e..efec3ef8c 100644
--- a/package/cfgfs/src/compress.c
+++ b/package/cfgfs/src/compress.c
@@ -28,8 +28,6 @@
#include "defs.h"
#include "compress.h"
-__RCSID("$MirOS: contrib/hosted/fwcf/compress.c,v 1.7 2006/09/23 23:46:35 tg Exp $");
-
static void compress_initialise(void);
static fwcf_compressor *fwcf_compressors = NULL;
diff --git a/package/cfgfs/src/compress.h b/package/cfgfs/src/compress.h
index c421aca5c..c0f92380b 100644
--- a/package/cfgfs/src/compress.h
+++ b/package/cfgfs/src/compress.h
@@ -31,14 +31,11 @@ typedef struct FWCF_COMPRESSOR {
uint8_t code;
} fwcf_compressor;
-__BEGIN_DECLS
/* 0=success 1=EINVAL 2=slot already used */
int compress_register(fwcf_compressor *);
-__END_DECLS
/* END of plug-in API description, version 1.0 */
-__BEGIN_DECLS
/* low-level */
fwcf_compressor *compress_enumerate(void);
int compress_list(void);
@@ -47,6 +44,5 @@ int compress_list(void);
fwcf_compressor *compressor_get(uint8_t);
int compressor_getbyname(const char *);
int list_compressors(void);
-__END_DECLS
#endif
diff --git a/package/cfgfs/src/defs.h b/package/cfgfs/src/defs.h
index b19046a27..c099ffb5a 100644
--- a/package/cfgfs/src/defs.h
+++ b/package/cfgfs/src/defs.h
@@ -18,13 +18,6 @@
#define __RCSID(x) static const char __rcsid[] __attribute__((used)) = (x)
#endif
-#ifndef BSD
-#define uint8_t u_int8_t
-#define uint16_t u_int16_t
-#define uint32_t u_int32_t
-#define uint64_t u_int64_t
-#endif
-
#ifndef __dead
#define __dead __attribute__((noreturn))
#endif
diff --git a/package/cfgfs/src/ft_creat.c b/package/cfgfs/src/ft_creat.c
index 5838f8647..e9424e159 100644
--- a/package/cfgfs/src/ft_creat.c
+++ b/package/cfgfs/src/ft_creat.c
@@ -221,7 +221,7 @@ make_file(char *n, uint8_t *buf, size_t len)
}
if ((size_t)write(fd, buf, len) != len)
- warn("could not write %lu bytes", (u_long)len);
+ warn("could not write %lu bytes", (unsigned long)len);
if (close(fd))
warn("close");
diff --git a/package/cfgfs/src/fts.c b/package/cfgfs/src/fts.c
index e271ed538..02d4bfea8 100644
--- a/package/cfgfs/src/fts.c
+++ b/package/cfgfs/src/fts.c
@@ -52,8 +52,6 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#include "defs.h"
-__RCSID("$MirOS: contrib/hosted/fwcf/fts.c,v 1.3 2007/07/02 14:50:21 tg Exp $");
-
#define internal_function
/* Largest alignment size needed, minus one.
@@ -67,15 +65,15 @@ __RCSID("$MirOS: contrib/hosted/fwcf/fts.c,v 1.3 2007/07/02 14:50:21 tg Exp $");
#endif
-static FTSENT *fts_alloc __P((FTS *, const char *, int)) internal_function;
-static FTSENT *fts_build __P((FTS *, int)) internal_function;
-static void fts_lfree __P((FTSENT *)) internal_function;
-static void fts_load __P((FTS *, FTSENT *)) internal_function;
-static size_t fts_maxarglen __P((char * const *)) internal_function;
-static void fts_padjust __P((FTS *, FTSENT *)) internal_function;
-static int fts_palloc __P((FTS *, size_t)) internal_function;
-static FTSENT *fts_sort __P((FTS *, FTSENT *, int)) internal_function;
-static u_short fts_stat __P((FTS *, FTSENT *, int)) internal_function;
+static FTSENT *fts_alloc (FTS *, const char *, int) internal_function;
+static FTSENT *fts_build (FTS *, int) internal_function;
+static void fts_lfree (FTSENT *) internal_function;
+static void fts_load (FTS *, FTSENT *) internal_function;
+static size_t fts_maxarglen (char * const *) internal_function;
+static void fts_padjust (FTS *, FTSENT *) internal_function;
+static int fts_palloc (FTS *, size_t) internal_function;
+static FTSENT *fts_sort (FTS *, FTSENT *, int) internal_function;
+static u_short fts_stat (FTS *, FTSENT *, int) internal_function;
static int fts_safe_changedir(FTS *, FTSENT *, int, char *);
#ifndef MAX
@@ -101,7 +99,7 @@ FTS *
fts_open(argv, options, compar)
char * const *argv;
register int options;
- int (*compar) __P((const FTSENT **, const FTSENT **));
+ int (*compar) (const FTSENT **, const FTSENT **);
{
register FTS *sp;
register FTSENT *p, *root;
@@ -119,7 +117,7 @@ fts_open(argv, options, compar)
if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
return (NULL);
memset(sp, 0, sizeof(FTS));
- sp->fts_compar = (int (*) __P((const void *, const void *))) compar;
+ sp->fts_compar = (int (*) (const void *, const void *)) compar;
sp->fts_options = options;
/* Logical walks turn on NOCHDIR; symbolic links are too hard. */
@@ -694,11 +692,11 @@ fts_build(sp, type)
if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
continue;
- if ((p = fts_alloc(sp, dp->d_name, (int)_D_EXACT_NAMLEN (dp))) == NULL)
+ if ((p = fts_alloc(sp, dp->d_name, (int)strlen(dp->d_name))) == NULL)
goto mem1;
- if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */
+ if (strlen(dp->d_name) >= maxlen) {/* include space for NUL */
oldaddr = sp->fts_path;
- if (fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) {
+ if (fts_palloc(sp, strlen(dp->d_name) + len + 1)) {
/*
* No more memory for path or structures. Save
* errno, free up the current structure and the
@@ -723,7 +721,7 @@ mem1: saved_errno = errno;
maxlen = sp->fts_pathlen - len;
}
- if (len + _D_EXACT_NAMLEN (dp) >= USHRT_MAX) {
+ if (len + strlen(dp->d_name) >= USHRT_MAX) {
/*
* In an FTSENT, fts_pathlen is a u_short so it is
* possible to wraparound here. If we do, free up
@@ -740,7 +738,7 @@ mem1: saved_errno = errno;
}
p->fts_level = level;
p->fts_parent = sp->fts_cur;
- p->fts_pathlen = len + _D_EXACT_NAMLEN (dp);
+ p->fts_pathlen = len + strlen(dp->d_name);
#if defined FTS_WHITEOUT && 0
if (dp->d_type == DT_WHT)
diff --git a/package/cfgfs/src/fts_gnu.h b/package/cfgfs/src/fts_gnu.h
index 08d45a085..9cc6d4d38 100644
--- a/package/cfgfs/src/fts_gnu.h
+++ b/package/cfgfs/src/fts_gnu.h
@@ -123,15 +123,11 @@ typedef struct _ftsent {
char fts_name[1]; /* file name */
} FTSENT;
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
FTSENT *fts_children(FTS *, int);
int fts_close(FTS *);
FTS *fts_open(char * const *, int,
int (*)(const FTSENT **, const FTSENT **));
FTSENT *fts_read(FTS *);
int fts_set(FTS *, FTSENT *, int);
-__END_DECLS
#endif /* !_FTS_H_ */
diff --git a/package/cfgfs/src/fts_subs.c b/package/cfgfs/src/fts_subs.c
index ec40219f8..311048a26 100644
--- a/package/cfgfs/src/fts_subs.c
+++ b/package/cfgfs/src/fts_subs.c
@@ -37,8 +37,6 @@
#define FTSF_INTERNALS
#include "fts_subs.h"
-__RCSID("$MirOS: contrib/hosted/fwcf/fts_subs.c,v 1.8 2007/07/02 14:53:03 tg Exp $");
-
static FTS *handle;
char ftsf_prefix[PATH_MAX];
diff --git a/package/cfgfs/src/fts_subs.h b/package/cfgfs/src/fts_subs.h
index c7d2c10fc..b83616a87 100644
--- a/package/cfgfs/src/fts_subs.h
+++ b/package/cfgfs/src/fts_subs.h
@@ -27,11 +27,9 @@ typedef struct FTSF_ENTRY ftsf_entry;
extern const char ftsf_prefix[];
#endif
-__BEGIN_DECLS
void ftsf_start(const char *);
/* returns -1 on error, 0 on empty, 1 on okay */
int ftsf_next(ftsf_entry *);
void ftsf_debugent(ftsf_entry *);
-__END_DECLS
#endif
diff --git a/package/cfgfs/src/minilzop.h b/package/cfgfs/src/minilzop.h
index 8c23c674e..9d0c37735 100644
--- a/package/cfgfs/src/minilzop.h
+++ b/package/cfgfs/src/minilzop.h
@@ -9,11 +9,9 @@
#ifndef MINILZOP_H
#define MINILZOP_H
-__BEGIN_DECLS
int minilzop(int ifd, int ofd, int compr_alg, int decompress);
/* TODO: use the two below for the “outer filesystem” as well */
void read_aszdata(int, char **, size_t *);
void write_aszdata(int, const char *, size_t);
-__END_DECLS
#endif
diff --git a/package/cfgfs/src/pack.h b/package/cfgfs/src/pack.h
index 9dfb8233f..3b6e518fd 100644
--- a/package/cfgfs/src/pack.h
+++ b/package/cfgfs/src/pack.h
@@ -77,7 +77,6 @@ typedef struct FTSF_ENTRY ftsf_entry;
res; \
})
-__BEGIN_DECLS
char *ft_pack(ftsf_entry *);
char *ft_packm(void);
@@ -90,6 +89,5 @@ void ft_creatm(char *, const char *);
char *fwcf_unpack(int, size_t *);
char *fwcf_pack(char *, size_t, int, size_t *);
char *fwcf_packm(const char *, int, size_t *);
-__END_DECLS
#endif
diff --git a/package/cfgfs/src/sys_linux.c b/package/cfgfs/src/sys_linux.c
index 38283a44d..af730dd42 100644
--- a/package/cfgfs/src/sys_linux.c
+++ b/package/cfgfs/src/sys_linux.c
@@ -23,6 +23,7 @@
#include <err.h>
#include <fcntl.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -30,8 +31,6 @@
#include "defs.h"
#include "sysdeps.h"
-__RCSID("$MirOS: contrib/hosted/fwcf/sys_linux.c,v 1.3 2006/09/26 10:25:03 tg Exp $");
-
void
pull_rndata(uint8_t *buf, size_t n)
{
@@ -42,7 +41,7 @@ pull_rndata(uint8_t *buf, size_t n)
return;
}
if ((size_t)read(fd, buf, n) != n)
- warn("Cannot read %lu bytes from /dev/urandom", (u_long)n);
+ warn("Cannot read %lu bytes from /dev/urandom", (unsigned long)n);
close(fd);
}
@@ -56,6 +55,6 @@ push_rndata(uint8_t *buf, size_t n)
return;
}
if ((size_t)write(fd, buf, n) != n)
- warn("Cannot write %lu bytes to /dev/urandom", (u_long)n);
+ warn("Cannot write %lu bytes to /dev/urandom", (unsigned long)n);
close(fd);
}
diff --git a/package/cfgfs/src/sysdeps.h b/package/cfgfs/src/sysdeps.h
index 34313f58c..8c248139f 100644
--- a/package/cfgfs/src/sysdeps.h
+++ b/package/cfgfs/src/sysdeps.h
@@ -9,9 +9,7 @@
#ifndef SYSDEPS_H
#define SYSDEPS_H
-__BEGIN_DECLS
void pull_rndata(uint8_t *, size_t);
void push_rndata(uint8_t *, size_t);
-__END_DECLS
#endif
diff --git a/package/cfgfs/src/tool.c b/package/cfgfs/src/tool.c
index 3daf141cd..a9e475c4a 100644
--- a/package/cfgfs/src/tool.c
+++ b/package/cfgfs/src/tool.c
@@ -32,8 +32,6 @@
#include "minilzop.h"
#include "pack.h"
-__RCSID("$MirOS: contrib/hosted/fwcf/tool.c,v 1.7 2007/03/09 22:35:13 tg Exp $");
-
static __dead void usage(void);
static int mkfwcf(int, const char *, int);
static int unfwcf(int, const char *);
diff --git a/package/cfgfs/src/unwraps.c b/package/cfgfs/src/unwraps.c
index d03f297e3..37117d6e6 100644
--- a/package/cfgfs/src/unwraps.c
+++ b/package/cfgfs/src/unwraps.c
@@ -83,13 +83,13 @@ fwcf_unpack(int fd, size_t *inner)
if ((x = compressor_get(c)->decompress(udata, *inner, cdata + 12,
outer - 16)) != *inner)
- errx(1, "size mismatch: decompressed %lu, want %lu", (u_long)x,
- (u_long)*inner);
+ errx(1, "size mismatch: decompressed %lu, want %lu", (unsigned long)x,
+ (unsigned long)*inner);
push_rndata((uint8_t *)cdata + outer, maxln - outer);
free(cdata);
#ifdef DEBUG
fprintf(stderr, "fwcf_unpack: decompressed outer %lu inner %lu\n",
- (u_long)outer, (u_long)*inner);
+ (unsigned long)outer, (unsigned long)*inner);
#endif
return (udata);
}
diff --git a/package/cfgfs/src/wraps.c b/package/cfgfs/src/wraps.c
index 7923b76be..923aecbd8 100644
--- a/package/cfgfs/src/wraps.c
+++ b/package/cfgfs/src/wraps.c
@@ -67,9 +67,9 @@ fwcf_pack(char *odata, size_t i, int algo, size_t *dstsz)
char *data, *cdata;
if (i > 0xFFFFFF)
- errx(1, "inner size of %lu too large", (u_long)i);
+ errx(1, "inner size of %lu too large", (unsigned long)i);
#ifdef DEBUG
- fprintf(stderr, "fwcf_pack: algo %02X packing %lu\n", algo, (u_long)i);
+ fprintf(stderr, "fwcf_pack: algo %02X packing %lu\n", algo, (unsigned long)i);
#endif
if ((j = compressor_get(algo)->compress(&cdata, odata, i)) == -1)
diff --git a/package/dropbear/Makefile b/package/dropbear/Makefile
index a16c69965..65fe397e4 100644
--- a/package/dropbear/Makefile
+++ b/package/dropbear/Makefile
@@ -26,7 +26,10 @@ include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,DROPBEAR,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,DBCONVERT,dropbearconvert,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_DBCONVERT},${PKG_SECTION}))
-TARGET_LDFLAGS+= $(ADK_TARGET_ABI_CFLAGS)
+TARGET_LDFLAGS+= $(ADK_TARGET_ABI_CFLAGS) -static
+ifeq ($(ADK_TARGET_LIB_STATIC_LIBGCC),y)
+TARGET_LDFLAGS+= -static-libgcc
+endif
BUILD_STYLE:= manual
INSTALL_STYLE:= manual
CONFIGURE_ARGS+= --disable-pam \
diff --git a/package/dropbear/patches/patch-Makefile_in b/package/dropbear/patches/patch-Makefile_in
index 3e6783b64..890900ee5 100644
--- a/package/dropbear/patches/patch-Makefile_in
+++ b/package/dropbear/patches/patch-Makefile_in
@@ -1,5 +1,5 @@
---- dropbear-2012.55.orig/Makefile.in 2012-02-23 14:47:05.000000000 +0100
-+++ dropbear-2012.55/Makefile.in 2012-10-05 17:24:16.000000000 +0200
+--- dropbear-2013.58.orig/Makefile.in 2013-04-18 16:58:14.000000000 +0200
++++ dropbear-2013.58/Makefile.in 2013-08-13 14:33:37.000000000 +0200
@@ -56,7 +56,7 @@ HEADERS=options.h dbutil.h session.h pac
loginrec.h atomicio.h x11fwd.h agentfwd.h tcpfwd.h compat.h \
listener.h fake-rfc2553.h
@@ -9,28 +9,21 @@
dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS)
dropbearkeyobjs=$(COMMONOBJS) $(KEYOBJS)
dropbearconvertobjs=$(COMMONOBJS) $(CONVERTOBJS)
-@@ -75,9 +75,8 @@ AR=@AR@
+@@ -75,10 +75,9 @@ AR=@AR@
RANLIB=@RANLIB@
STRIP=@STRIP@
INSTALL=@INSTALL@
-CPPFLAGS=@CPPFLAGS@
-CFLAGS+=-I. -I$(srcdir) $(CPPFLAGS) @CFLAGS@
-LIBS+=@LIBS@
+-LDFLAGS=@LDFLAGS@
+CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir)
+LIBS+=@LIBS@ @CRYPTLIB@
- LDFLAGS=@LDFLAGS@
++LDFLAGS+=@LDFLAGS@
EXEEXT=@EXEEXT@
-@@ -159,7 +158,7 @@ dropbearkey: $(dropbearkeyobjs)
- dropbearconvert: $(dropbearconvertobjs)
- dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LIBTOM_DEPS) Makefile
-- $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBS)
-+ $(CC) $(LDFLAGS) -static-libgcc -o $@$(EXEEXT) $($@objs) $(LIBS)
-
- # scp doesn't use the libs so is special.
- scp: $(SCPOBJS) $(HEADERS) Makefile
-@@ -169,14 +168,14 @@ scp: $(SCPOBJS) $(HEADERS) Makefile
+@@ -169,7 +168,7 @@ scp: $(SCPOBJS) $(HEADERS) Makefile
# multi-binary compilation.
MULTIOBJS=
ifeq ($(MULTI),1)
@@ -39,11 +32,3 @@
CFLAGS+=$(addprefix -DDBMULTI_, $(PROGRAMS)) -DDROPBEAR_MULTI
endif
- dropbearmulti: multilink
-
- multibinary: $(HEADERS) $(MULTIOBJS) $(LIBTOM_DEPS) Makefile
-- $(CC) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS)
-+ $(CC) $(LDFLAGS) -static-libgcc -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS)
-
- multilink: multibinary $(addprefix link, $(PROGRAMS))
-
diff --git a/package/dropbear/patches/patch-cli-runopts_c b/package/dropbear/patches/patch-cli-runopts_c
index b2f98da81..5a8297b87 100644
--- a/package/dropbear/patches/patch-cli-runopts_c
+++ b/package/dropbear/patches/patch-cli-runopts_c
@@ -1,7 +1,7 @@
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- dropbear-0.53.1.orig/cli-runopts.c 2011-03-02 14:23:35.000000000 +0100
-+++ dropbear-0.53.1/cli-runopts.c 2011-08-02 20:03:12.000000000 +0200
-@@ -287,6 +287,10 @@ void cli_getopts(int argc, char ** argv)
+--- dropbear-2013.58.orig/cli-runopts.c 2013-04-18 16:58:14.000000000 +0200
++++ dropbear-2013.58/cli-runopts.c 2013-08-13 14:29:15.000000000 +0200
+@@ -309,6 +309,10 @@ void cli_getopts(int argc, char ** argv)
debug_trace = 1;
break;
#endif
@@ -11,8 +11,8 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+ break;
case 'F':
case 'e':
- case 'c':
-@@ -298,7 +302,6 @@ void cli_getopts(int argc, char ** argv)
+ #ifndef ENABLE_USER_ALGO_LIST
+@@ -322,7 +326,6 @@ void cli_getopts(int argc, char ** argv)
#ifndef ENABLE_CLI_LOCALTCPFWD
case 'L':
#endif
diff --git a/package/dropbear/patches/patch-options_h b/package/dropbear/patches/patch-options_h
index 68a8b2a1b..88a081624 100644
--- a/package/dropbear/patches/patch-options_h
+++ b/package/dropbear/patches/patch-options_h
@@ -1,7 +1,7 @@
diff -Nur dropbear-2013.58.orig/options.h dropbear-2013.58/options.h
--- dropbear-2013.58.orig/options.h 2013-04-18 16:58:14.000000000 +0200
-+++ dropbear-2013.58/options.h 2013-04-29 14:28:47.000000000 +0200
-@@ -247,7 +247,7 @@
++++ dropbear-2013.58/options.h 2013-08-13 14:29:15.000000000 +0200
+@@ -247,7 +247,7 @@ much traffic. */
/* The command to invoke for xauth when using X11 forwarding.
* "-q" for quiet */
#ifndef XAUTH_COMMAND
diff --git a/package/gdb/Makefile b/package/gdb/Makefile
index 5bc8d6de2..3b9b3f149 100644
--- a/package/gdb/Makefile
+++ b/package/gdb/Makefile
@@ -25,7 +25,8 @@ TARGET_CFLAGS+= ${TARGET_CPPFLAGS} -fPIC
CONFIGURE_ARGS+= --without-uiout --enable-gdbmi \
--disable-tui --disable-gdbtk --without-x \
--without-included-gettext --disable-sim \
- --enable-threads --with-curses --disable-werror \
+ --with-curses --disable-werror \
+ --disable-gdbserver \
--enable-static --without-python
XAKE_FLAGS+= LDFLAGS='${TARGET_LDFLAGS}'
# disable honour cflags stuff
diff --git a/package/gdb/patches/patch-gdb_common_gdb_thread_db_h b/package/gdb/patches/patch-gdb_common_gdb_thread_db_h
new file mode 100644
index 000000000..12ab8ebaf
--- /dev/null
+++ b/package/gdb/patches/patch-gdb_common_gdb_thread_db_h
@@ -0,0 +1,35 @@
+--- gdb-7.6.orig/gdb/common/gdb_thread_db.h 2013-01-01 07:32:54.000000000 +0100
++++ gdb-7.6/gdb/common/gdb_thread_db.h 2013-08-13 16:37:40.000000000 +0200
+@@ -1,17 +1,6 @@
+ #ifdef HAVE_THREAD_DB_H
+ #include <thread_db.h>
+
+-#ifndef LIBTHREAD_DB_SO
+-#define LIBTHREAD_DB_SO "libthread_db.so.1"
+-#endif
+-
+-#ifndef LIBTHREAD_DB_SEARCH_PATH
+-/* $sdir appears before $pdir for some minimal security protection:
+- we trust the system libthread_db.so a bit more than some random
+- libthread_db associated with whatever libpthread the app is using. */
+-#define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir"
+-#endif
+-
+ #else
+
+ /* Copyright (C) 1999-2013 Free Software Foundation, Inc.
+@@ -453,3 +442,14 @@ extern td_err_e td_thr_dbresume (const t
+ #endif /* thread_db.h */
+
+ #endif /* HAVE_THREAD_DB_H */
++
++#ifndef LIBTHREAD_DB_SO
++#define LIBTHREAD_DB_SO "libthread_db.so.1"
++#endif
++
++#ifndef LIBTHREAD_DB_SEARCH_PATH
++/* $sdir appears before $pdir for some minimal security protection:
++ we trust the system libthread_db.so a bit more than some random
++ libthread_db associated with whatever libpthread the app is using. */
++#define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir"
++#endif
diff --git a/package/gdb/patches/patch-gdb_common_linux-ptrace_h b/package/gdb/patches/patch-gdb_common_linux-ptrace_h
new file mode 100644
index 000000000..cc6556d0a
--- /dev/null
+++ b/package/gdb/patches/patch-gdb_common_linux-ptrace_h
@@ -0,0 +1,10 @@
+--- gdb-7.6.orig/gdb/common/linux-ptrace.h 2013-01-01 07:32:54.000000000 +0100
++++ gdb-7.6/gdb/common/linux-ptrace.h 2013-08-13 17:10:13.000000000 +0200
+@@ -20,6 +20,7 @@
+
+ struct buffer;
+
++#include <unistd.h>
+ #include <sys/ptrace.h>
+
+ #ifndef PTRACE_GETSIGINFO
diff --git a/package/gdb/patches/patch-gdb_linux-nat_c b/package/gdb/patches/patch-gdb_linux-nat_c
new file mode 100644
index 000000000..50ba9bf6c
--- /dev/null
+++ b/package/gdb/patches/patch-gdb_linux-nat_c
@@ -0,0 +1,26 @@
+--- gdb-7.6.orig/gdb/linux-nat.c 2013-02-13 15:59:49.000000000 +0100
++++ gdb-7.6/gdb/linux-nat.c 2013-08-13 17:01:09.000000000 +0200
+@@ -79,6 +79,14 @@
+ # endif
+ #endif /* HAVE_PERSONALITY */
+
++#ifndef __SIGRTMIN
++#define __SIGRTMIN SIGRTMIN
++#endif
++
++#ifndef W_STOPCODE
++#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
++#endif
++
+ /* This comment documents high-level logic of this file.
+
+ Waiting for events in sync mode
+@@ -2379,7 +2387,7 @@ linux_handle_extended_wait (struct lwp_i
+ status = 0;
+ }
+
+- if (non_stop)
++ if (1)
+ {
+ /* Add the new thread to GDB's lists as soon as possible
+ so that:
diff --git a/package/libthread_db/Makefile b/package/libthread_db/Makefile
index 394830998..7c3b3eb13 100644
--- a/package/libthread_db/Makefile
+++ b/package/libthread_db/Makefile
@@ -9,6 +9,9 @@ endif
ifeq ($(ADK_TARGET_LIB_EGLIBC),y)
include ${TOPDIR}/toolchain/eglibc/Makefile.inc
endif
+ifeq ($(ADK_TARGET_LIB_MUSL),y)
+include ${TOPDIR}/toolchain/musl/Makefile.inc
+endif
ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
include ${TOPDIR}/toolchain/uClibc/Makefile.inc
endif
@@ -30,7 +33,9 @@ INSTALL_STYLE:= manual
do-install:
ifeq ($(ADK_NATIVE),)
${INSTALL_DIR} ${IDIR_LIBTHREAD_DB}/lib
+ifeq ($(ADK_TARGET_LIB_MUSL),)
${CP} ${STAGING_TARGET_DIR}/lib/libthread_db*.so* ${IDIR_LIBTHREAD_DB}/lib
endif
+endif
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/musl/Config.in.manual b/package/musl/Config.in.manual
index 19f590e61..a3881c1e8 100644
--- a/package/musl/Config.in.manual
+++ b/package/musl/Config.in.manual
@@ -4,6 +4,7 @@ config ADK_PACKAGE_MUSL
default y if ADK_TARGET_LIB_MUSL && !ADK_TOOLCHAIN_ONLY
default n
depends on ADK_TARGET_LIB_MUSL
+ select ADK_PACKAGE_LIBGCC
help
Embedded C library.