summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/host-bottom.mk77
-rw-r--r--mk/host.mk56
-rw-r--r--mk/package.mk9
-rw-r--r--mk/pkg-bottom.mk15
-rw-r--r--package/ImageMagick/Makefile2
-rw-r--r--package/MesaLib/Makefile27
-rw-r--r--package/MesaLib/patches/patch-bin_mklib42
-rw-r--r--package/MesaLib/patches/patch-src_gallium_auxiliary_util_u_debug_symbol_c39
-rw-r--r--package/MesaLib/patches/patch-src_gallium_include_pipe_p_config_h45
-rw-r--r--package/MesaLib/patches/patch-src_glsl_Makefile10
-rw-r--r--package/MesaLib/patches/patch-src_glsl_strtod_c32
-rw-r--r--package/MesaLib/patches/patch-src_mesa_main_imports_c33
-rw-r--r--package/MesaLib/patches/patch-src_mesa_main_imports_h13
-rw-r--r--package/MesaLib/patches/patch-src_mesa_main_querymatrix_c11
-rw-r--r--package/SDL_gfx/Makefile2
-rw-r--r--package/SDL_ttf/Makefile2
-rw-r--r--package/alsa-lib/Makefile2
-rw-r--r--package/alsa-utils/Makefile2
-rw-r--r--package/bzip2/Makefile6
-rw-r--r--package/cairo/Makefile2
-rw-r--r--package/cvs/Makefile3
-rw-r--r--package/cxxtools/Makefile2
-rw-r--r--package/db/Makefile3
-rw-r--r--package/e2fsprogs/Makefile1
-rw-r--r--package/exmap/Makefile1
-rw-r--r--package/expat/Makefile1
-rw-r--r--package/ffmpeg/Makefile2
-rw-r--r--package/file/Makefile27
-rw-r--r--package/file/patches/patch-magic_Makefile_in11
-rw-r--r--package/gcc/Makefile12
-rw-r--r--package/gcc/patches/musl-cris.patch11
-rw-r--r--package/gcc/patches/musl-cross.patch825
-rw-r--r--package/gcc/patches/musl-m68k.patch11
-rw-r--r--package/gcc/patches/musl-mips64.patch14
-rw-r--r--package/gcc/patches/musl-ppc.patch155
-rw-r--r--package/gcc/patches/musl-sh.patch11
-rw-r--r--package/gcc/patches/musl-sparc.patch24
-rw-r--r--package/gcc/patches/musl.patch360
-rw-r--r--package/glib/Makefile34
-rw-r--r--package/imlib2/Makefile6
-rw-r--r--package/kexec-tools/Makefile2
-rw-r--r--package/libglew/Makefile2
-rw-r--r--package/libiconv/Makefile12
-rw-r--r--package/libiconv/patches/patch-build-aux_ltmain_sh11
-rw-r--r--package/libiconv/patches/patch-libcharset_build-aux_ltmain_sh11
-rw-r--r--package/libiconv/patches/patch-preload_Makefile_in16
-rw-r--r--package/libiconv/patches/patch-src_Makefile_in11
-rw-r--r--package/libpng/Makefile2
-rw-r--r--package/libthread_db/Makefile2
-rw-r--r--package/libvpx/Makefile2
-rw-r--r--package/libxcb/Makefile8
-rw-r--r--package/libxcb/patches/patch-ltmain_sh11
-rw-r--r--package/madplay/Makefile2
-rw-r--r--package/microperl/Makefile2
-rw-r--r--package/mpd/Makefile6
-rw-r--r--package/mpg123/Makefile2
-rw-r--r--package/ncurses/Makefile53
-rw-r--r--package/ncurses/patches/patch-configure16
-rw-r--r--package/ncurses/patches/patch-misc_run_tic_in33
-rw-r--r--package/ncurses/patches/patch-misc_terminfo_src8
-rw-r--r--package/ncurses/patches/patch-progs_Makefile_in11
-rw-r--r--package/obexftp/Makefile6
-rw-r--r--package/openldap/Makefile26
-rw-r--r--package/pango/Makefile4
-rw-r--r--package/pixman/Makefile2
-rw-r--r--package/python2/Makefile9
-rw-r--r--package/ruby/Makefile44
-rw-r--r--package/ruby/patches/patch-configure141
-rw-r--r--package/ruby/patches/patch-missing_isinf_c19
-rw-r--r--package/ruby/patches/patch-missing_isnan_c11
-rw-r--r--package/sdl-image/Makefile2
-rw-r--r--package/sdl/Makefile2
-rw-r--r--package/section.lst2
-rw-r--r--package/sox/Makefile2
-rw-r--r--package/tntnet/Makefile2
-rw-r--r--package/vlc/Makefile2
-rw-r--r--package/xcb-proto/Makefile17
-rw-r--r--package/xcb-proto/patches/patch-xcb-proto_pc_in10
-rw-r--r--toolchain/gcc/Makefile4
-rw-r--r--tools/adk/pkgmaker.c22
80 files changed, 1558 insertions, 933 deletions
diff --git a/mk/host-bottom.mk b/mk/host-bottom.mk
new file mode 100644
index 000000000..072254087
--- /dev/null
+++ b/mk/host-bottom.mk
@@ -0,0 +1,77 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+host-extract: ${_HOST_PATCH_COOKIE}
+
+host-configure:
+${_HOST_CONFIGURE_COOKIE}: ${_HOST_PATCH_COOKIE}
+ #@sed -e '/^#/d' ${REORDER_DEPENDENCIES} | \
+ #tsort | while read f; do \
+ # cd ${WRKSRC}; \
+ # case $$f in \
+ # /*) \
+ # find . -name "$${f#/}" -print | while read i; do \
+ # touch "$$i"; \
+ # done;; \
+ # *) \
+ # if test -e "$$f" ; then \
+ # touch "$$f"; \
+ # fi;; \
+ # esac; \
+ #done
+ @mkdir -p ${WRKBUILD}
+ @$(CMD_TRACE) "configuring... "
+ @cd ${WRKBUILD}; \
+ for i in $$(find . -name config.sub);do \
+ if [ -f $$i ]; then \
+ ${CP} $$i $$i.bak; \
+ ${CP} ${SCRIPT_DIR}/config.sub $$i; \
+ fi; \
+ done; \
+ for i in $$(find . -name config.guess);do \
+ if [ -f $$i ]; then \
+ ${CP} $$i $$i.bak; \
+ ${CP} ${SCRIPT_DIR}/config.guess $$i; \
+ fi; \
+ done;
+ cd ${WRKBUILD}; rm -f config.{cache,status}; \
+ env ${HOST_CONFIGURE_ENV} \
+ ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
+ --program-prefix= \
+ --program-suffix= \
+ --prefix=/usr \
+ --bindir=/usr/bin \
+ --datadir=/usr/share \
+ --mandir=/usr/share/man \
+ --libexecdir=/usr/libexec \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --disable-dependency-tracking \
+ --disable-libtool-lock \
+ --disable-nls \
+ ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
+ touch $@
+
+host-build:
+${_HOST_BUILD_COOKIE}: ${_HOST_CONFIGURE_COOKIE}
+ @$(CMD_TRACE) "compiling... "
+ cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
+ touch $@
+
+hpkg-install: ${ALL_HOSTINST}
+host-install:
+${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE}
+ cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ DESTDIR='${HOST_WRKINST}' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
+ env ${HOST_MAKE_ENV} ${MAKE} hpkg-install $(MAKE_TRACE)
+ rm -rf ${WRKBUILD} ${WRKDIST} ${WRKSRC}
+ exec ${MAKE} host-extract $(MAKE_TRACE)
+ touch $@
+
+${_HOST_COOKIE}:
+ exec ${MAKE} hostpackage
+
+hostpackage: ${ALL_HOSTDIRS}
+ touch ${_HOST_COOKIE}
+
diff --git a/mk/host.mk b/mk/host.mk
new file mode 100644
index 000000000..f9326da17
--- /dev/null
+++ b/mk/host.mk
@@ -0,0 +1,56 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+HOST_CONFIGURE_ENV+= CONFIG_SHELL='$(strip ${SHELL})' \
+ CFLAGS='$(strip ${CFLAGS_FOR_BUILD})' \
+ CXXFLAGS='$(strip ${CXXFLAGS_FOR_BUILD})' \
+ CPPFLAGS='$(strip ${CPPFLAGS_FOR_BUILD})' \
+ LDFLAGS='$(strip ${LDFLAGS_FOR_BUILD})'
+
+# this is environment for 'make all' and 'make install'
+HOST_MAKE_ENV?=
+# this is arguments for 'make all' and 'make install'
+HOST_XAKE_FLAGS?=
+# this is arguments for 'make all' ONLY
+HOST_MAKE_FLAGS?=
+# this is arguments for 'make install' ONLY
+HOST_FAKE_FLAGS?=
+HOST_ALL_TARGET?= all
+HOST_INSTALL_TARGET?= install
+
+HOST_MAKE_FLAGS+= ${HOST_XAKE_FLAGS} V=1
+HOST_FAKE_FLAGS+= ${HOST_XAKE_FLAGS}
+
+HOST_WRKINST= ${WRKDIR}/host
+
+_HOST_EXTRACT_COOKIE= ${WRKDIST}/.extract_done
+_HOST_PATCH_COOKIE= ${WRKDIST}/.prepared
+_HOST_CONFIGURE_COOKIE= ${WRKBUILD}/.host_configure_done
+_HOST_BUILD_COOKIE= ${WRKBUILD}/.host_build_done
+_HOST_FAKE_COOKIE= ${HOST_WRKINST}/.host_fake_done
+_HOST_COOKIE= ${PACKAGE_DIR}/.stamps/${PKG_NAME}${PKG_VERSION}-${PKG_RELEASE}-host
+
+hostextract: ${_HOST_EXTRACT_COOKIE}
+hostpatch: ${_HOST_PATCH_COOKIE}
+hostconfigure: ${_HOST_CONFIGURE_COOKIE}
+hostbuild: ${_HOST_BUILD_COOKIE}
+hostfake: ${_HOST_FAKE_COOKIE}
+
+# there are some parameters to the HOST_template function
+# 1.) Config.in identifier ADK_PACKAGE_$(1)
+# 2.) name of the package, for single package mostly $(PKG_NAME)
+# 3.) package version (upstream version) and package release (adk version),
+# always $(PKG_VERSION)-$(PKG_RELEASE)
+
+define HOST_template
+ALL_PKGOPTS+= $(1)
+PKGNAME_$(1)= $(2)
+HOSTDIR_$(1)= $(WRKDIR)/host
+ifneq (${ADK_PACKAGE_$(1)}${DEVELOPER},)
+ALL_HOSTDIRS+= $${HOSTDIR_$(1)}
+ALL_HOSTINST+= $(2)-hostinstall
+endif
+
+$$(HOSTDIR_$(1)): ${_HOST_PATCH_COOKIE} ${_HOST_FAKE_COOKIE}
+
+endef
diff --git a/mk/package.mk b/mk/package.mk
index ca1b84fc3..66b3b8a25 100644
--- a/mk/package.mk
+++ b/mk/package.mk
@@ -122,10 +122,15 @@ ALL_POSTINST+= $(2)-install
$(2)-install:
endif
INFO_$(1)= $(PKG_STATE_DIR)/info/$(2).list
+INFO_$(1)_DEV= $(PKG_STATE_DIR)/info/$(2)-dev.list
ifeq ($(ADK_PACKAGE_$(1)),y)
+ifeq ($(ADK_PACKAGE_$(1)_DEV),y)
+install-targets: $$(INFO_$(1)) $$(INFO_$(1)_DEV)
+else
install-targets: $$(INFO_$(1))
endif
+endif
IDEPEND_$(1):= $$(strip $(4))
@@ -257,9 +262,9 @@ endif
$$(INFO_$(1)): $$(IPKG_$(1))
$(PKG_INSTALL) $$(IPKG_$(1))
-ifneq (,$(filter dev,$(7)))
+
+$$(INFO_$(1)_DEV): $$(IPKG_$(1)_DEV)
$(PKG_INSTALL) $$(IPKG_$(1)_DEV)
-endif
endef
install-targets:
diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk
index 0dd93468d..d6ac45cc2 100644
--- a/mk/pkg-bottom.mk
+++ b/mk/pkg-bottom.mk
@@ -17,7 +17,7 @@ PKG_LIBNAME?= $(PKG_NAME)
pre-configure:
do-configure:
post-configure:
-${_CONFIGURE_COOKIE}: ${_PATCH_COOKIE}
+${_CONFIGURE_COOKIE}: ${_HOST_COOKIE} ${_PATCH_COOKIE}
@sed -e '/^#/d' ${REORDER_DEPENDENCIES} | \
tsort | while read f; do \
cd ${WRKSRC}; \
@@ -143,6 +143,7 @@ else
@echo "Invalid INSTALL_STYLE '${INSTALL_STYLE}'" >&2
@exit 1
endif
+ env ${MAKE_ENV} ${MAKE} spkg-install $(MAKE_TRACE)
@rm -f '${STAGING_PKG_DIR}/${PKG_NAME}.scripts'
@for a in ${WRKINST}/usr/bin/*-config*; do \
[[ -e $$a ]] || continue; \
@@ -158,7 +159,6 @@ endif
sed -e "s,^prefix=.*,prefix=${STAGING_TARGET_DIR}/usr," $$a > \
${STAGING_DIR}/usr/lib/pkgconfig/$$(basename $$a); \
done
- env ${MAKE_ENV} ${MAKE} spkg-install $(MAKE_TRACE)
ifeq (,$(filter noremove,${PKG_OPTS}))
@if test -s '${STAGING_PKG_DIR}/${PKG_NAME}'; then \
cd '${STAGING_DIR}'; \
@@ -169,21 +169,20 @@ ifeq (,$(filter noremove,${PKG_OPTS}))
endif
@rm -f '${STAGING_PKG_DIR}/${PKG_NAME}'
ifneq (,$(filter dev,${PKG_OPTS}))
- mkdir -p $(WRKDIR)/fake-${CPU_ARCH}/pkg-$(PKG_LIBNAME)-dev/usr/include
- test -d ${WRKINST}/usr/include && cd ${WRKINST}/usr/include; \
+ @mkdir -p $(WRKDIR)/fake-${CPU_ARCH}/pkg-$(PKG_LIBNAME)-dev/usr/include
+ @test -d ${WRKINST}/usr/include && cd ${WRKINST}/usr/include; \
find . -name \*.h | \
$(TOOLS_DIR)/cpio -padlmu $(WRKDIR)/fake-${CPU_ARCH}/pkg-$(PKG_LIBNAME)-dev/usr/include
- mkdir -p $(WRKDIR)/fake-${CPU_ARCH}/pkg-$(PKG_LIBNAME)-dev/usr/lib/pkgconfig
- test -d ${WRKINST}/usr/lib/pkgconfig && cd ${WRKINST}/usr/lib/pkgconfig; \
+ @mkdir -p $(WRKDIR)/fake-${CPU_ARCH}/pkg-$(PKG_LIBNAME)-dev/usr/lib/pkgconfig
+ @test -d ${WRKINST}/usr/lib/pkgconfig && cd ${WRKINST}/usr/lib/pkgconfig; \
find . -name \*.pc | \
$(TOOLS_DIR)/cpio -padlmu $(WRKDIR)/fake-${CPU_ARCH}/pkg-$(PKG_LIBNAME)-dev/usr/lib/pkgconfig
- for a in ${WRKINST}/usr/bin/*-config*; do \
+ @for a in ${WRKINST}/usr/bin/*-config*; do \
[[ -e $$a ]] || continue; \
mkdir -p $(WRKDIR)/fake-${CPU_ARCH}/pkg-$(PKG_LIBNAME)-dev/usr/bin; \
cp $$a $(WRKDIR)/fake-${CPU_ARCH}/pkg-$(PKG_LIBNAME)-dev/usr/bin; \
chmod 755 $(WRKDIR)/fake-${CPU_ARCH}/pkg-$(PKG_LIBNAME)-dev/usr/bin/$$(basename $$a); \
done
- #env ${MAKE_ENV} ${MAKE} ${PKG_LIBNAME}-dev-install $(MAKE_TRACE)
endif
@-cd ${WRKINST}; \
if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "eglibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libgcc" -a "${PKG_NAME}" != "libthread-db" -a "${PKG_NAME}" != "musl" ];then \
diff --git a/package/ImageMagick/Makefile b/package/ImageMagick/Makefile
index e2b24a587..20c7ba1f5 100644
--- a/package/ImageMagick/Makefile
+++ b/package/ImageMagick/Makefile
@@ -18,6 +18,8 @@ PKG_NEED_CXX:= 1
PKG_LIBNAME:= libimagemagic
PKG_OPTS:= dev
+PKG_ARCH_DEPENDS:= !m68k
+
PKG_SUBPKGS:= CONVERT DISPLAY LIBIMAGEMAGICK
PKGSD_LIBIMAGEMAGICK:= imagemagick library
PKGSC_LIBIMAGEMAGICK:= libs
diff --git a/package/MesaLib/Makefile b/package/MesaLib/Makefile
index 9a8d4420a..694c6b0b1 100644
--- a/package/MesaLib/Makefile
+++ b/package/MesaLib/Makefile
@@ -4,10 +4,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= MesaLib
-PKG_VERSION:= 8.0.5
-PKG_RELEASE:= 3
-PKG_MD5SUM:= cda5d101f43b8784fa60bdeaca4056f2
-PKG_DESCR:= MESA library
+PKG_VERSION:= 9.2.2
+PKG_RELEASE:= 1
+PKG_MD5SUM:= df801a975045150790e10e2ccf32193f
+PKG_DESCR:= MESA 3D graphics library
PKG_SECTION:= libs
PKG_DEPENDS:= libxdamage libxfixes libdrm libxxf86vm libexpat
PKG_BUILDDEP:= libXdamage libXfixes libXxf86vm libdrm
@@ -40,28 +40,13 @@ CONFIGURE_ARGS+= --disable-static \
--disable-gles1 \
--disable-gles2 \
--with-dri-drivers=${DRI_DRIVERS},swrast
-CONFIGURE_ENV+= PYTHON2=/usr/bin/python
+CONFIGURE_ENV+= PYTHON2=/usr/bin/python MISSING="echo"
-XAKE_FLAGS+= HOST_CC=${CC_FOR_BUILD} GLSL_CL=${STAGING_HOST_DIR}/bin/glslcompile
+XAKE_FLAGS+= HOST_CC=${CC_FOR_BUILD}
ifeq ($(ADK_NATIVE),y)
XAKE_FLAGS+= RANLIB=ranlib AR=ar
endif
-post-extract:
- (cd ${WRKBUILD}; rm -rf config.{cache,status}; \
- ./configure \
- --disable-static \
- --disable-gallium-llvm \
- --with-gallium-drivers=swrast \
- --with-driver=xlib \
- );
- ${MAKE} -C ${WRKBUILD}/src/glsl
- ${CP} ${WRKBUILD}/src/glsl/glsl_compiler \
- ${STAGING_HOST_DIR}/bin/glsl_compiler
- ${CP} ${WRKBUILD}/src/glsl/builtin_compiler \
- ${STAGING_HOST_DIR}/bin/builtin_compiler
- ${MAKE} -C ${WRKBUILD}/src/glsl clean
-
mesalib-install:
$(INSTALL_DIR) $(IDIR_MESALIB)/usr/lib/dri
$(CP) $(WRKINST)/usr/lib/libGL*.so* \
diff --git a/package/MesaLib/patches/patch-bin_mklib b/package/MesaLib/patches/patch-bin_mklib
deleted file mode 100644
index a361c1105..000000000
--- a/package/MesaLib/patches/patch-bin_mklib
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -Nur Mesa-8.0.5.orig/bin/mklib Mesa-8.0.5/bin/mklib
---- Mesa-8.0.5.orig/bin/mklib 2012-10-24 21:03:58.000000000 +0200
-+++ Mesa-8.0.5/bin/mklib 2013-09-19 11:59:49.000000000 +0200
-@@ -333,12 +333,6 @@ case $ARCH in
- # Check if objects are 32-bit and we're running in 64-bit
- # environment. If so, pass -m32 flag to linker.
- set ${OBJECTS}
-- ABI32=`file $1 | grep 32-bit`
-- ARM=`file $1 | grep ARM`
-- # Do not add "-m32" option for arm.
-- if [ -z "$ARM" -a "${ABI32}" -a `uname -m` = "x86_64" ] ; then
-- OPTS="-m32 ${OPTS}"
-- fi
-
- if [ "${ALTOPTS}" ] ; then
- OPTS=${ALTOPTS}
-@@ -392,12 +386,6 @@ case $ARCH in
- # Check if objects are 32-bit and we're running in 64-bit
- # environment. If so, pass -m32 flag to linker.
- set ${OBJECTS}
-- ABI32=`file $1 | grep 32-bit`
-- ARM=`file $1 | grep ARM`
-- # Do not add "-m32" option for arm.
-- if [ -z "$ARM" -a "${ABI32}" -a `uname -m` = "x86_64" ] ; then
-- OPTS="-m32 ${OPTS}"
-- fi
- if [ "${ALTOPTS}" ] ; then
- OPTS=${ALTOPTS}
- fi
-@@ -466,12 +454,6 @@ case $ARCH in
- # Check if objects are 32-bit and we're running in 64-bit
- # environment. If so, pass -m32 flag to linker.
- set ${OBJECTS}
-- ABI32=`file $1 | grep 32-bit`
-- if [ "${ABI32}" ] ; then
-- OPTS="-m32 -shared -Wl,-Bdynamic"
-- else
-- OPTS="-m64 -shared -Wl,-Bdynamic"
-- fi
- fi
-
- # If using Sun C++ compiler, need to tell it not to add runpaths
diff --git a/package/MesaLib/patches/patch-src_gallium_auxiliary_util_u_debug_symbol_c b/package/MesaLib/patches/patch-src_gallium_auxiliary_util_u_debug_symbol_c
deleted file mode 100644
index b5da190a5..000000000
--- a/package/MesaLib/patches/patch-src_gallium_auxiliary_util_u_debug_symbol_c
+++ /dev/null
@@ -1,39 +0,0 @@
---- Mesa-8.0.5.orig/src/gallium/auxiliary/util/u_debug_symbol.c 2012-10-24 21:03:59.000000000 +0200
-+++ Mesa-8.0.5/src/gallium/auxiliary/util/u_debug_symbol.c 2013-10-08 12:13:11.000000000 +0200
-@@ -151,23 +151,6 @@ debug_symbol_name_dbghelp(const void *ad
- }
- #endif
-
--#ifdef __GLIBC__
--#include <execinfo.h>
--
--/* This can only provide dynamic symbols, or binary offsets into a file.
-- *
-- * To fix this, post-process the output with tools/addr2line.sh
-- */
--static INLINE void
--debug_symbol_name_glibc(const void *addr, char* buf, unsigned size)
--{
-- char** syms = backtrace_symbols((void**)&addr, 1);
-- strncpy(buf, syms[0], size);
-- buf[size - 1] = 0;
-- free(syms);
--}
--#endif
--
- void
- debug_symbol_name(const void *addr, char* buf, unsigned size)
- {
-@@ -176,12 +159,6 @@ debug_symbol_name(const void *addr, char
- if(buf[0])
- return;
- #endif
--
--#ifdef __GLIBC__
-- debug_symbol_name_glibc(addr, buf, size);
-- if(buf[0])
-- return;
--#endif
-
- util_snprintf(buf, size, "%p", addr);
- buf[size - 1] = 0;
diff --git a/package/MesaLib/patches/patch-src_gallium_include_pipe_p_config_h b/package/MesaLib/patches/patch-src_gallium_include_pipe_p_config_h
deleted file mode 100644
index 5726c5c91..000000000
--- a/package/MesaLib/patches/patch-src_gallium_include_pipe_p_config_h
+++ /dev/null
@@ -1,45 +0,0 @@
---- Mesa-8.0.5.orig/src/gallium/include/pipe/p_config.h 2012-10-24 21:03:59.000000000 +0200
-+++ Mesa-8.0.5/src/gallium/include/pipe/p_config.h 2013-09-19 12:27:54.000000000 +0200
-@@ -111,7 +111,6 @@
- * Endian detection.
- */
-
--#ifdef __GLIBC__
- #include <endian.h>
-
- #if __BYTE_ORDER == __LITTLE_ENDIAN
-@@ -120,34 +119,6 @@
- # define PIPE_ARCH_BIG_ENDIAN
- #endif
-
--#elif defined(__APPLE__)
--#include <machine/endian.h>
--
--#if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
--# define PIPE_ARCH_LITTLE_ENDIAN
--#elif __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN
--# define PIPE_ARCH_BIG_ENDIAN
--#endif
--
--#elif defined(__sun)
--#include <sys/isa_defs.h>
--
--#if defined(_LITTLE_ENDIAN)
--# define PIPE_ARCH_LITTLE_ENDIAN
--#elif defined(_BIG_ENDIAN)
--# define PIPE_ARCH_BIG_ENDIAN
--#endif
--
--#else
--
--#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
--#define PIPE_ARCH_LITTLE_ENDIAN
--#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64)
--#define PIPE_ARCH_BIG_ENDIAN
--#endif
--
--#endif
--
- #if !defined(PIPE_ARCH_LITTLE_ENDIAN) && !defined(PIPE_ARCH_BIG_ENDIAN)
- #error Unknown Endianness
- #endif
diff --git a/package/MesaLib/patches/patch-src_glsl_Makefile b/package/MesaLib/patches/patch-src_glsl_Makefile
deleted file mode 100644
index f8f85b7ec..000000000
--- a/package/MesaLib/patches/patch-src_glsl_Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
---- Mesa-8.0.5.orig/src/glsl/Makefile 2012-10-24 21:03:59.000000000 +0200
-+++ Mesa-8.0.5/src/glsl/Makefile 2013-04-30 12:25:40.000000000 +0200
-@@ -167,6 +167,6 @@ builtin_compiler: $(GLSL2_OBJECTS) $(OBJ
-
- builtin_function.cpp: builtins/profiles/* builtins/ir/* builtins/tools/generate_builtins.py builtins/tools/texture_builtins.py builtin_compiler
- @echo Regenerating builtin_function.cpp...
-- $(PYTHON2) $(PYTHON_FLAGS) builtins/tools/generate_builtins.py ./builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp
-+ $(PYTHON2) $(PYTHON_FLAGS) builtins/tools/generate_builtins.py builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp
-
- -include depend
diff --git a/package/MesaLib/patches/patch-src_glsl_strtod_c b/package/MesaLib/patches/patch-src_glsl_strtod_c
deleted file mode 100644
index ce6514dbb..000000000
--- a/package/MesaLib/patches/patch-src_glsl_strtod_c
+++ /dev/null
@@ -1,32 +0,0 @@
---- Mesa-8.0.5.orig/src/glsl/strtod.c 2012-10-24 21:03:59.000000000 +0200
-+++ Mesa-8.0.5/src/glsl/strtod.c 2013-09-25 17:34:06.000000000 +0200
-@@ -25,14 +25,6 @@
-
-
- #include <stdlib.h>
--
--#ifdef _GNU_SOURCE
--#include <locale.h>
--#ifdef __APPLE__
--#include <xlocale.h>
--#endif
--#endif
--
- #include "strtod.h"
-
-
-@@ -44,14 +36,5 @@
- double
- glsl_strtod(const char *s, char **end)
- {
--#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \
-- !defined(__HAIKU__)
-- static locale_t loc = NULL;
-- if (!loc) {
-- loc = newlocale(LC_CTYPE_MASK, "C", NULL);
-- }
-- return strtod_l(s, end, loc);
--#else
- return strtod(s, end);
--#endif
- }
diff --git a/package/MesaLib/patches/patch-src_mesa_main_imports_c b/package/MesaLib/patches/patch-src_mesa_main_imports_c
deleted file mode 100644
index 10cbca86a..000000000
--- a/package/MesaLib/patches/patch-src_mesa_main_imports_c
+++ /dev/null
@@ -1,33 +0,0 @@
---- Mesa-8.0.5.orig/src/mesa/main/imports.c 2012-10-24 21:03:59.000000000 +0200
-+++ Mesa-8.0.5/src/mesa/main/imports.c 2013-09-25 17:41:11.000000000 +0200
-@@ -49,14 +49,6 @@
- #include "mtypes.h"
- #include "version.h"
-
--#ifdef _GNU_SOURCE
--#include <locale.h>
--#ifdef __APPLE__
--#include <xlocale.h>
--#endif
--#endif
--
--
- #define MAXSTRING 4000 /* for vsnprintf() */
-
- #ifdef WIN32
-@@ -766,14 +758,7 @@ _mesa_strdup( const char *s )
- float
- _mesa_strtof( const char *s, char **end )
- {
--#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \
-- !defined(ANDROID) && !defined(__HAIKU__)
-- static locale_t loc = NULL;
-- if (!loc) {
-- loc = newlocale(LC_CTYPE_MASK, "C", NULL);
-- }
-- return strtof_l(s, end, loc);
--#elif defined(_ISOC99_SOURCE) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)
-+#if defined(_ISOC99_SOURCE) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)
- return strtof(s, end);
- #else
- return (float)strtod(s, end);
diff --git a/package/MesaLib/patches/patch-src_mesa_main_imports_h b/package/MesaLib/patches/patch-src_mesa_main_imports_h
deleted file mode 100644
index 43896c847..000000000
--- a/package/MesaLib/patches/patch-src_mesa_main_imports_h
+++ /dev/null
@@ -1,13 +0,0 @@
---- Mesa-8.0.5.orig/src/mesa/main/imports.h 2012-10-24 21:03:59.000000000 +0200
-+++ Mesa-8.0.5/src/mesa/main/imports.h 2013-09-19 12:39:53.000000000 +0200
-@@ -568,10 +568,8 @@ _mesa_init_sqrt_table(void);
-
- #ifdef __GNUC__
-
--#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(ANDROID) || defined(__APPLE__)
- #define ffs __builtin_ffs
- #define ffsll __builtin_ffsll
--#endif
-
- #define _mesa_ffs(i) ffs(i)
- #define _mesa_ffsll(i) ffsll(i)
diff --git a/package/MesaLib/patches/patch-src_mesa_main_querymatrix_c b/package/MesaLib/patches/patch-src_mesa_main_querymatrix_c
deleted file mode 100644
index f178bfef0..000000000
--- a/package/MesaLib/patches/patch-src_mesa_main_querymatrix_c
+++ /dev/null
@@ -1,11 +0,0 @@
---- Mesa-8.0.5.orig/src/mesa/main/querymatrix.c 2012-03-30 18:19:03.000000000 +0200
-+++ Mesa-8.0.5/src/mesa/main/querymatrix.c 2013-09-19 12:19:01.000000000 +0200
-@@ -70,7 +70,7 @@ fpclassify(double x)
- }
- }
-
--#elif defined(__APPLE__) || defined(__CYGWIN__) || defined(__FreeBSD__) || \
-+#elif defined(fpclassify) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__FreeBSD__) || \
- defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || \
- (defined(__sun) && defined(__C99FEATURES__)) || defined(__MINGW32__) || \
- (defined(__sun) && defined(__GNUC__)) || defined(ANDROID) || defined(__HAIKU__)
diff --git a/package/SDL_gfx/Makefile b/package/SDL_gfx/Makefile
index b0e114ef0..bc4994ce6 100644
--- a/package/SDL_gfx/Makefile
+++ b/package/SDL_gfx/Makefile
@@ -16,8 +16,6 @@ PKG_SITES:= http://www.ferzkopp.net/Software/SDL_gfx-2.0/
PKG_LIBNAME:= libsdl-gfx
PKG_OPTS:= dev
-PKG_ARCH_DEPENDS:= !m68k
-
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,LIBSDL_GFX,libsdl-gfx,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
diff --git a/package/SDL_ttf/Makefile b/package/SDL_ttf/Makefile
index d8d954521..53e49e1e2 100644
--- a/package/SDL_ttf/Makefile
+++ b/package/SDL_ttf/Makefile
@@ -16,8 +16,6 @@ PKG_SITES:= http://www.libsdl.org/projects/SDL_ttf/release/
PKG_LIBNAME:= libsdl-ttf
PKG_OPTS:= dev
-PKG_ARCH_DEPENDS:= !m68k
-
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,LIBSDL_TTF,libsdl-ttf,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
diff --git a/package/alsa-lib/Makefile b/package/alsa-lib/Makefile
index d4505755e..10726ac09 100644
--- a/package/alsa-lib/Makefile
+++ b/package/alsa-lib/Makefile
@@ -13,8 +13,6 @@ PKG_URL:= http://www.alsa-project.org/
PKG_SITES:= ftp://ftp.alsa-project.org/pub/lib/
PKG_OPTS:= dev
-PKG_ARCH_DEPENDS:= !m68k
-
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
include ${TOPDIR}/mk/package.mk
diff --git a/package/alsa-utils/Makefile b/package/alsa-utils/Makefile
index d1f2a7144..721c5757d 100644
--- a/package/alsa-utils/Makefile
+++ b/package/alsa-utils/Makefile
@@ -14,8 +14,6 @@ PKG_BUILDDEP:= alsa-lib
PKG_URL:= http://www.alsa-project.org/
PKG_SITES:= ftp://ftp.alsa-project.org/pub/utils/
-PKG_ARCH_DEPENDS:= !m68k
-
PKG_FLAVOURS_ALSA_UTILS:=WITH_ALSAMIXER
PKGFS_WITH_ALSAMIXER:= libncurses
PKGFD_WITH_ALSAMIXER:= include alsamixer ncurses applet
diff --git a/package/bzip2/Makefile b/package/bzip2/Makefile
index 73a41a443..2f6bb7f8b 100644
--- a/package/bzip2/Makefile
+++ b/package/bzip2/Makefile
@@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= bzip2
PKG_VERSION:= 1.0.6
-PKG_RELEASE:= 2
+PKG_RELEASE:= 3
PKG_MD5SUM:= 00b516f4704d4a7cb50a1d97e6e8e15b
PKG_DESCR:= bzip2 compression utility
PKG_SECTION:= archive
@@ -42,8 +42,8 @@ libbz2-install:
${STAGING_DIR}/usr/lib
(cd ${STAGING_DIR}/usr/lib; ln -sf libbz2.so.1.0.6 libbz2.so)
$(CP) $(WRKBUILD)/bzlib.h $(STAGING_DIR)/usr/include
- ${INSTALL_DIR} $(LIBBZ2_DEV)/usr/include
- $(CP) $(WRKBUILD)/bzlib.h $(LIBBZ2_DEV)/usr/include
+ ${INSTALL_DIR} $(IDIR_LIBBZ2_DEV)/usr/include
+ $(CP) $(WRKBUILD)/bzlib.h $(IDIR_LIBBZ2_DEV)/usr/include
bzip2-install:
${INSTALL_DIR} ${IDIR_BZIP2}/usr/bin
diff --git a/package/cairo/Makefile b/package/cairo/Makefile
index 62c2c3b32..a1015c603 100644
--- a/package/cairo/Makefile
+++ b/package/cairo/Makefile
@@ -17,8 +17,6 @@ PKG_URL:= http://cairographics.org/
PKG_SITES:= http://cairographics.org/releases/
PKG_OPTS:= dev
-PKG_ARCH_DEPENDS:= !m68k
-
#DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz
ifeq ($(ADK_STATIC),y)
diff --git a/package/cvs/Makefile b/package/cvs/Makefile
index fd62d7e27..7652667ec 100644
--- a/package/cvs/Makefile
+++ b/package/cvs/Makefile
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= cvs
PKG_VERSION:= 1.11.23
-PKG_RELEASE:= 1
+PKG_RELEASE:= 2
PKG_MD5SUM:= bf185eb51b5918330a04671c3f3cccde
PKG_DESCR:= concurrent version system
PKG_SECTION:= scm
@@ -17,6 +17,7 @@ include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,CVS,cvs,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
CONFIGURE_ENV+= ac_cv_lib_nsl_main=no
+CONFIGURE_ARGS+= --without-gssapi
cvs-install:
$(INSTALL_DIR) $(IDIR_CVS)/usr/bin
diff --git a/package/cxxtools/Makefile b/package/cxxtools/Makefile
index e72624b2e..26a18a99b 100644
--- a/package/cxxtools/Makefile
+++ b/package/cxxtools/Makefile
@@ -17,7 +17,7 @@ PKG_NEED_CXX:= 1
PKG_CXX:= CXXTOOLS
PKG_OPTS:= dev
-PKG_ARCH_DEPENDS:= !arm !avr32
+PKG_ARCH_DEPENDS:= !arm !avr32 !m68k
include ${TOPDIR}/mk/package.mk
diff --git a/package/db/Makefile b/package/db/Makefile
index 3a65ba83d..798964f94 100644
--- a/package/db/Makefile
+++ b/package/db/Makefile
@@ -12,6 +12,7 @@ PKG_SECTION:= db
PKG_URL:= http://www.oracle.com/technology/software/products/berkeley-db
PKG_SITES:= http://www.openadk.org/distfiles/
PKG_NEED_CXX:= 1
+PKG_LIBNAME:= libdb
PKG_OPTS:= dev
WRKBUILD= ${WRKSRC}/build_unix
@@ -39,6 +40,6 @@ CONFIGURE_ARGS+= --enable-smallbuild \
libdb-install:
${INSTALL_DIR} ${IDIR_LIBDB}/usr/lib
- ${CP} ${WRKINST}/usr/lib/libdb*.so ${IDIR_LIBDB}/usr/lib
+ ${CP} ${WRKINST}/usr/lib/libdb*.so* ${IDIR_LIBDB}/usr/lib
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/e2fsprogs/Makefile b/package/e2fsprogs/Makefile
index 3f4f75eaf..d7b44621a 100644
--- a/package/e2fsprogs/Makefile
+++ b/package/e2fsprogs/Makefile
@@ -73,6 +73,7 @@ endif
e2fsprogs-install:
# workaround for dev subpackage
+ mkdir -p ${IDIR_E2FSPROGS_DEV}/usr/bin
${CP} ${WRKINST}/usr/bin/compile_et \
${IDIR_E2FSPROGS_DEV}/usr/bin
diff --git a/package/exmap/Makefile b/package/exmap/Makefile
index 7ae1f5074..008ce253f 100644
--- a/package/exmap/Makefile
+++ b/package/exmap/Makefile
@@ -13,6 +13,7 @@ PKG_DEPENDS:= exmap-kmod libreadline glib
PKG_BUILDDEP:= glib readline
PKG_SITES:= http://labs.o-hand.com/sources/exmap-console/
+PKG_ARCH_DEPENDS:= !m68k
PKG_CFLINE_EXMAP:= depends on !ADK_TOOLCHAIN_ONLY
PKG_SUBPKGS:= EXMAP EXMAPD EXMAPSERVER EXMAP_KMOD
diff --git a/package/expat/Makefile b/package/expat/Makefile
index c5f676d3d..0ecb2f14c 100644
--- a/package/expat/Makefile
+++ b/package/expat/Makefile
@@ -11,6 +11,7 @@ PKG_DESCR:= a XML parsing library
PKG_SECTION:= libs
PKG_URL:= http://expat.sourceforge.net
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=expat/}
+PKG_LIBNAME:= libexpat
PKG_OPTS:= dev
ifeq ($(ADK_STATIC),y)
diff --git a/package/ffmpeg/Makefile b/package/ffmpeg/Makefile
index 03f81b698..d2408eda5 100644
--- a/package/ffmpeg/Makefile
+++ b/package/ffmpeg/Makefile
@@ -15,7 +15,7 @@ PKG_SITES:= http://www.ffmpeg.org/releases/
PKH_LIBNAME:= libffmpeg
PKG_OPTS:= dev
-PKG_ARCH_DEPENDS:= !avr32 !cris
+PKG_ARCH_DEPENDS:= !avr32 !cris !m68k
PKG_SUBPKGS:= LIBFFMPEG FFSERVER FFPROBE FFMPEG
#PKGSD_FFPLAY:= ffmpeg based video player
diff --git a/package/file/Makefile b/package/file/Makefile
index b96ee1d87..268206130 100644
--- a/package/file/Makefile
+++ b/package/file/Makefile
@@ -4,12 +4,12 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= file
-PKG_VERSION:= 5.11
-PKG_RELEASE:= 2
-PKG_MD5SUM:= 16a407bd66d6c7a832f3a5c0d609c27b
+PKG_VERSION:= 5.15
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 3f99565532f548d7540912c4642d1ede
PKG_DESCR:= a file type guesser
PKG_SECTION:= utils
-PKG_DEPENDS:= libmagic
+PKG_DEPENDS:= libmagic libgcc
PKG_URL:= http://www.darwinsys.com/file
PKG_SITES:= ftp://ftp.fu-berlin.de/unix/tools/file/ \
ftp://ftp.astron.com/pub/file/
@@ -24,19 +24,19 @@ ifeq ($(ADK_STATIC),y)
PKG_OPTS+= libmix
endif
+include ${TOPDIR}/mk/host.mk
include ${TOPDIR}/mk/package.mk
-$(eval $(call PKG_template,FILE,file,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call HOST_template,FILE,file,${PKG_VERSION}-${PKG_RELEASE}))
+$(eval $(call PKG_template,FILE,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,LIBMAGIC,libmagic,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBMAGIC},${PKGSD_LIBMAGIC},${PKGSC_LIBMAGIC},${PKG_OPTS}))
-pre-configure:
- (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
- ./configure --enable-static --disable-shared \
- --disable-warnings \
- );
- ${MAKE} -C ${WRKBUILD}
- ${INSTALL_BIN} ${WRKBUILD}/src/file ${WRKBUILD}/magic
- ${MAKE} -C ${WRKBUILD} clean
+HOST_CONFIGURE_ARGS+= --enable-static \
+ --disable-shared \
+ --disable-warnings
+file-hostinstall:
+ ${INSTALL_BIN} ${HOST_WRKINST}/usr/bin/file \
+ ${STAGING_HOST_DIR}/usr/bin
file-install:
${INSTALL_DIR} ${IDIR_FILE}/usr/bin
@@ -49,4 +49,5 @@ libmagic-install:
${INSTALL_DIR} ${IDIR_LIBMAGIC}/usr/lib
${CP} ${WRKINST}/usr/lib/libmagic.so* ${IDIR_LIBMAGIC}/usr/lib
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/file/patches/patch-magic_Makefile_in b/package/file/patches/patch-magic_Makefile_in
deleted file mode 100644
index 1a8b3a66c..000000000
--- a/package/file/patches/patch-magic_Makefile_in
+++ /dev/null
@@ -1,11 +0,0 @@
---- file-5.11.orig/magic/Makefile.in 2012-02-21 20:17:03.000000000 +0100
-+++ file-5.11/magic/Makefile.in 2012-03-02 17:23:17.000000000 +0100
-@@ -450,7 +450,7 @@ CLEANFILES = ${MAGIC} $(MAGIC_FRAGMENT_D
-
- # FIXME: Build file natively as well so that it can be used to compile
- # the target's magic file; for now we bail if the local version does not match
--@IS_CROSS_COMPILE_TRUE@FILE_COMPILE = file
-+@IS_CROSS_COMPILE_TRUE@FILE_COMPILE = ./file
- @IS_CROSS_COMPILE_FALSE@FILE_COMPILE_DEP = $(FILE_COMPILE)
- @IS_CROSS_COMPILE_TRUE@FILE_COMPILE_DEP =
- all: all-am
diff --git a/package/gcc/Makefile b/package/gcc/Makefile
index 97a317578..26b04522d 100644
--- a/package/gcc/Makefile
+++ b/package/gcc/Makefile
@@ -31,7 +31,7 @@ ifeq ($(ADK_TARGET_SYSTEM_LEMOTE_YEELONG),y)
CONFIGURE_ARGS+= --with-abi=$(ADK_TARGET_ABI)
endif
-ifeq ($(ADK_PACKAGE_GXX),y)
+ifneq ($(ADK_PACKAGE_GXX),)
CONFIGURE_ARGS+= --enable-languages=c,c++
else
CONFIGURE_ARGS+= --enable-languages=c
@@ -69,10 +69,10 @@ gcc-install:
rm -rf ${IDIR_GCC}/usr/lib/gcc/*/*/install-tools
g++-install:
- ${INSTALL_DIR} ${IDIR_GCC}/usr/bin
- ${INSTALL_DIR} ${IDIR_GCC}/usr/include/c++
- ${INSTALL_BIN} ${WRKINST}/usr/bin/g++ ${IDIR_GCC}/usr/bin/
- cd ${IDIR_GCC}/usr/bin/ && ln -sf g++ c++
- ${CP} ${WRKINST}/usr/include/c++/* ${IDIR_GCC}/usr/include/c++/
+ ${INSTALL_DIR} ${IDIR_GXX}/usr/bin
+ ${INSTALL_DIR} ${IDIR_GXX}/usr/include/c++
+ ${INSTALL_BIN} ${WRKINST}/usr/bin/g++ ${IDIR_GXX}/usr/bin/
+ cd ${IDIR_GXX}/usr/bin/ && ln -sf g++ c++
+ ${CP} ${WRKINST}/usr/include/c++/* ${IDIR_GXX}/usr/include/c++/
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/gcc/patches/musl-cris.patch b/package/gcc/patches/musl-cris.patch
new file mode 100644
index 000000000..4889263a1
--- /dev/null
+++ b/package/gcc/patches/musl-cris.patch
@@ -0,0 +1,11 @@
+diff -Nur gcc-4.7.3.orig/gcc/config/cris/linux.h gcc-4.7.3/gcc/config/cris/linux.h
+--- gcc-4.7.3.orig/gcc/config/cris/linux.h 2011-04-11 20:46:05.000000000 +0200
++++ gcc-4.7.3/gcc/config/cris/linux.h 2013-10-11 10:01:51.000000000 +0200
+@@ -104,6 +104,7 @@
+ #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
+
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-cris.1"
+
+ #undef CRIS_LINK_SUBTARGET_SPEC
+ #define CRIS_LINK_SUBTARGET_SPEC \
diff --git a/package/gcc/patches/musl-cross.patch b/package/gcc/patches/musl-cross.patch
new file mode 100644
index 000000000..453ba9aec
--- /dev/null
+++ b/package/gcc/patches/musl-cross.patch
@@ -0,0 +1,825 @@
+diff -Nur gcc-4.7.3.orig/config.sub gcc-4.7.3/config.sub
+--- gcc-4.7.3.orig/config.sub 2012-08-06 16:34:27.000000000 +0200
++++ gcc-4.7.3/config.sub 2013-09-16 15:39:42.000000000 +0200
+@@ -4,7 +4,7 @@
+ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+ # 2011 Free Software Foundation, Inc.
+
+-timestamp='2011-10-29'
++timestamp='2011-03-23'
+
+ # This file is (in principle) common to ALL GNU software.
+ # The presence of a machine in this file suggests that SOME GNU software
+@@ -125,6 +125,7 @@
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
++ linux-musl* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+@@ -251,17 +252,13 @@
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+- | be32 | be64 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+- | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+- | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+- | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+@@ -295,7 +292,7 @@
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+- | rl78 | rx \
++ | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+@@ -304,7 +301,7 @@
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
++ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+@@ -361,7 +358,6 @@
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+- | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+@@ -370,10 +366,8 @@
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+- | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+- | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+@@ -407,7 +401,7 @@
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+- | rl78-* | romp-* | rs6000-* | rx-* \
++ | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+@@ -415,11 +409,10 @@
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+- | tile*-* \
++ | tile-* | tilegx-* \
+ | tron-* \
+ | ubicom32-* \
+- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+- | vax-* \
++ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+@@ -820,10 +813,6 @@
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+- nacl)
+- basic_machine=le32-unknown
+- os=-nacl
+- ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+@@ -1132,8 +1121,13 @@
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
++ # This must be matched before tile*.
++ tilegx*)
++ basic_machine=tilegx-unknown
++ os=-linux-gnu
++ ;;
+ tile*)
+- basic_machine=$basic_machine-unknown
++ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+@@ -1346,6 +1340,7 @@
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
++ | -linux-musl* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+diff -Nur gcc-4.7.3.orig/fixincludes/mkfixinc.sh gcc-4.7.3/fixincludes/mkfixinc.sh
+--- gcc-4.7.3.orig/fixincludes/mkfixinc.sh 2011-09-22 16:00:17.000000000 +0200
++++ gcc-4.7.3/fixincludes/mkfixinc.sh 2013-09-16 15:39:42.000000000 +0200
+@@ -20,7 +20,8 @@
+ powerpc-*-eabi* | \
+ powerpc-*-rtems* | \
+ powerpcle-*-eabisim* | \
+- powerpcle-*-eabi* )
++ powerpcle-*-eabi* | \
++ *-musl* )
+ # IF there is no include fixing,
+ # THEN create a no-op fixer and exit
+ (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
+diff -Nur gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h gcc-4.7.3/gcc/config/arm/linux-eabi.h
+--- gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h 2011-11-02 16:03:19.000000000 +0100
++++ gcc-4.7.3/gcc/config/arm/linux-eabi.h 2013-09-16 15:39:42.000000000 +0200
+@@ -64,6 +64,23 @@
+ #undef GLIBC_DYNAMIC_LINKER
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
+
++/* For ARM musl currently supports two dynamic linkers:
++ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
++ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI.
++ musl does not support the legacy OABI (i.e. broken) mode.
++ All the dynamic linkers live in /lib.
++ We default to soft-float, but this can be overridden by changing both
++ MUSL_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
++#undef MUSL_DYNAMIC_LINKER
++#define MUSL_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-musl-arm.so.1"
++#define MUSL_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-musl-armhf.so.1"
++#define MUSL_DYNAMIC_LINKER_DEFAULT MUSL_DYNAMIC_LINKER_SOFT_FLOAT
++
++#define MUSL_DYNAMIC_LINKER \
++ "%{mfloat-abi=hard:" MUSL_DYNAMIC_LINKER_HARD_FLOAT "} \
++ %{mfloat-abi=soft*:" MUSL_DYNAMIC_LINKER_SOFT_FLOAT "} \
++ %{!mfloat-abi=*:" MUSL_DYNAMIC_LINKER_DEFAULT "}"
++
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */
+ #undef LINK_SPEC
+diff -Nur gcc-4.7.3.orig/gcc/config/i386/linux64.h gcc-4.7.3/gcc/config/i386/linux64.h
+--- gcc-4.7.3.orig/gcc/config/i386/linux64.h 2011-07-07 17:38:34.000000000 +0200
++++ gcc-4.7.3/gcc/config/i386/linux64.h 2013-09-16 15:39:42.000000000 +0200
+@@ -31,3 +31,7 @@
+ #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+ #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+ #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
++
++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
+diff -Nur gcc-4.7.3.orig/gcc/config/i386/linux.h gcc-4.7.3/gcc/config/i386/linux.h
+--- gcc-4.7.3.orig/gcc/config/i386/linux.h 2011-06-03 20:30:39.000000000 +0200
++++ gcc-4.7.3/gcc/config/i386/linux.h 2013-09-16 15:39:42.000000000 +0200
+@@ -22,3 +22,4 @@
+
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
+diff -Nur gcc-4.7.3.orig/gcc/config/linux.h gcc-4.7.3/gcc/config/linux.h
+--- gcc-4.7.3.orig/gcc/config/linux.h 2012-08-14 15:59:04.000000000 +0200
++++ gcc-4.7.3/gcc/config/linux.h 2013-09-16 15:39:42.000000000 +0200
+@@ -33,10 +33,12 @@
+ #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
+ #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
+ #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
+ #else
+ #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
+ #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
+ #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
++#define OPTION_MUSL (linux_libc == LIBC_MUSL)
+ #endif
+
+ #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
+@@ -54,18 +56,21 @@
+ uClibc or Bionic is the default C library and whether
+ -muclibc or -mglibc or -mbionic has been passed to change the default. */
+
+-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
+- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
++#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
++ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
+
+ #if DEFAULT_LIBC == LIBC_GLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
+ #elif DEFAULT_LIBC == LIBC_UCLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
+ #elif DEFAULT_LIBC == LIBC_BIONIC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
++#elif DEFAULT_LIBC == LIBC_MUSL
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
+ #else
+ #error "Unsupported DEFAULT_LIBC"
+ #endif /* DEFAULT_LIBC */
+@@ -85,21 +90,21 @@
+
+ #define GNU_USER_DYNAMIC_LINKER \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
+- BIONIC_DYNAMIC_LINKER)
++ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
+ #define GNU_USER_DYNAMIC_LINKER32 \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
+- BIONIC_DYNAMIC_LINKER32)
++ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
+ #define GNU_USER_DYNAMIC_LINKER64 \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
+- BIONIC_DYNAMIC_LINKER64)
++ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
+ #define GNU_USER_DYNAMIC_LINKERX32 \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
+- BIONIC_DYNAMIC_LINKERX32)
++ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
+
+ /* Determine whether the entire c99 runtime
+ is present in the runtime library. */
+ #undef TARGET_C99_FUNCTIONS
+-#define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
++#define TARGET_C99_FUNCTIONS (OPTION_GLIBC || OPTION_MUSL)
+
+ /* Whether we have sincos that follows the GNU extension. */
+ #undef TARGET_HAS_SINCOS
+@@ -108,3 +113,74 @@
+ /* Whether we have Bionic libc runtime */
+ #undef TARGET_HAS_BIONIC
+ #define TARGET_HAS_BIONIC (OPTION_BIONIC)
++
++/* musl avoids problematic includes by rearranging the include directories.
++ * Unfortunately, this is mostly duplicated from cppdefault.c */
++#if DEFAULT_LIBC == LIBC_MUSL
++#define INCLUDE_DEFAULTS_MUSL_GPP \
++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \
++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \
++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \
++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \
++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
++
++#ifdef LOCAL_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_LOCAL \
++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \
++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
++#else
++#define INCLUDE_DEFAULTS_MUSL_LOCAL
++#endif
++
++#ifdef PREFIX_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_PREFIX \
++ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_PREFIX
++#endif
++
++#ifdef CROSS_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_CROSS \
++ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_CROSS
++#endif
++
++#ifdef TOOL_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_TOOL \
++ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_TOOL
++#endif
++
++#ifdef NATIVE_SYSTEM_HEADER_DIR
++#define INCLUDE_DEFAULTS_MUSL_NATIVE \
++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
++#else
++#define INCLUDE_DEFAULTS_MUSL_NATIVE
++#endif
++
++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
++# undef INCLUDE_DEFAULTS_MUSL_LOCAL
++# define INCLUDE_DEFAULTS_MUSL_LOCAL
++# undef INCLUDE_DEFAULTS_MUSL_NATIVE
++# define INCLUDE_DEFAULTS_MUSL_NATIVE
++#else
++# undef INCLUDE_DEFAULTS_MUSL_CROSS
++# define INCLUDE_DEFAULTS_MUSL_CROSS
++#endif
++
++#undef INCLUDE_DEFAULTS
++#define INCLUDE_DEFAULTS \
++ { \
++ INCLUDE_DEFAULTS_MUSL_GPP \
++ INCLUDE_DEFAULTS_MUSL_PREFIX \
++ INCLUDE_DEFAULTS_MUSL_CROSS \
++ INCLUDE_DEFAULTS_MUSL_TOOL \
++ INCLUDE_DEFAULTS_MUSL_NATIVE \
++ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
++ { 0, 0, 0, 0, 0, 0 } \
++ }
++#endif
+diff -Nur gcc-4.7.3.orig/gcc/config/linux.opt gcc-4.7.3/gcc/config/linux.opt
+--- gcc-4.7.3.orig/gcc/config/linux.opt 2010-09-29 16:51:52.000000000 +0200
++++ gcc-4.7.3/gcc/config/linux.opt 2013-09-16 15:39:42.000000000 +0200
+@@ -30,3 +30,7 @@
+ muclibc
+ Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
+ Use uClibc C library
++
++mmusl
++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
++Use musl C library
+diff -Nur gcc-4.7.3.orig/gcc/config/mips/linux.h gcc-4.7.3/gcc/config/mips/linux.h
+--- gcc-4.7.3.orig/gcc/config/mips/linux.h 2011-07-19 20:00:27.000000000 +0200
++++ gcc-4.7.3/gcc/config/mips/linux.h 2013-09-16 15:39:43.000000000 +0200
+@@ -19,3 +19,5 @@
+ <http://www.gnu.org/licenses/>. */
+
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips.so.1"
+diff -Nur gcc-4.7.3.orig/gcc/config/rs6000/linux64.h gcc-4.7.3/gcc/config/rs6000/linux64.h
+--- gcc-4.7.3.orig/gcc/config/rs6000/linux64.h 2012-03-12 17:16:51.000000000 +0100
++++ gcc-4.7.3/gcc/config/rs6000/linux64.h 2013-09-16 15:39:43.000000000 +0200
+@@ -362,17 +362,21 @@
+ #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
+ #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+ #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1"
++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
+ #elif DEFAULT_LIBC == LIBC_GLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
++#elif DEFAULT_LIBC == LIBC_MUSL
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
+ #else
+ #error "Unsupported DEFAULT_LIBC"
+ #endif
+ #define GNU_USER_DYNAMIC_LINKER32 \
+- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
+ #define GNU_USER_DYNAMIC_LINKER64 \
+- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
+
+
+ #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
+diff -Nur gcc-4.7.3.orig/gcc/config/rs6000/sysv4.h gcc-4.7.3/gcc/config/rs6000/sysv4.h
+--- gcc-4.7.3.orig/gcc/config/rs6000/sysv4.h 2012-04-30 19:39:01.000000000 +0200
++++ gcc-4.7.3/gcc/config/rs6000/sysv4.h 2013-09-16 15:39:43.000000000 +0200
+@@ -804,15 +808,18 @@
+
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+ #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
++#elif DEFAULT_LIBC == LIBC_MUSL
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
+ #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
+ #else
+ #error "Unsupported DEFAULT_LIBC"
+ #endif
+ #define GNU_USER_DYNAMIC_LINKER \
+- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
+
+ #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+diff -Nur gcc-4.7.3.orig/gcc/config.gcc gcc-4.7.3/gcc/config.gcc
+--- gcc-4.7.3.orig/gcc/config.gcc 2013-03-06 23:54:11.000000000 +0100
++++ gcc-4.7.3/gcc/config.gcc 2013-09-16 15:39:43.000000000 +0200
+@@ -522,7 +522,7 @@
+ esac
+
+ # Common C libraries.
+-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
+
+ # Common parts for widely ported systems.
+ case ${target} in
+@@ -625,6 +625,9 @@
+ *-*-*uclibc*)
+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
+ ;;
++ *-*-*musl*)
++ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
++ ;;
+ *)
+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
+ ;;
+@@ -2092,6 +2095,10 @@
+ powerpc*-*-linux*paired*)
+ tm_file="${tm_file} rs6000/750cl.h" ;;
+ esac
++ case ${target} in
++ *-linux*-musl*)
++ enable_secureplt=yes ;;
++ esac
+ if test x${enable_secureplt} = xyes; then
+ tm_file="rs6000/secureplt.h ${tm_file}"
+ fi
+diff -Nur gcc-4.7.3.orig/gcc/configure gcc-4.7.3/gcc/configure
+--- gcc-4.7.3.orig/gcc/configure 2013-02-06 16:23:55.000000000 +0100
++++ gcc-4.7.3/gcc/configure 2013-09-16 15:39:43.000000000 +0200
+@@ -26815,7 +26815,8 @@
+ gcc_cv_libc_provides_ssp=yes
+ fi
+ ;;
+- *-*-gnu*)
++ *-*-gnu* | \
++ *-linux-musl*)
+ # Avoid complicated tests (see
+ # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
+ # simply assert that glibc does provide this, which is true for all
+@@ -26902,6 +26903,9 @@
+ gcc_cv_target_dl_iterate_phdr=no
+ fi
+ ;;
++ *-linux-musl*)
++ gcc_cv_target_dl_iterate_phdr=yes
++ ;;
+ esac
+
+ if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
+diff -Nur gcc-4.7.3.orig/gcc/configure.ac gcc-4.7.3/gcc/configure.ac
+--- gcc-4.7.3.orig/gcc/configure.ac 2013-02-06 16:23:55.000000000 +0100
++++ gcc-4.7.3/gcc/configure.ac 2013-09-16 15:39:43.000000000 +0200
+@@ -4692,7 +4692,8 @@
+ gcc_cv_libc_provides_ssp=yes
+ fi]
+ ;;
+- *-*-gnu*)
++ *-*-gnu* | \
++ *-linux-musl*)
+ # Avoid complicated tests (see
+ # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
+ # simply assert that glibc does provide this, which is true for all
+@@ -4762,6 +4763,9 @@
+ gcc_cv_target_dl_iterate_phdr=no
+ fi
+ ;;
++ *-linux-musl*)
++ gcc_cv_target_dl_iterate_phdr=yes
++ ;;
+ esac
+ GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
+ if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
+diff -Nur gcc-4.7.3.orig/gcc/ginclude/stddef.h gcc-4.7.3/gcc/ginclude/stddef.h
+--- gcc-4.7.3.orig/gcc/ginclude/stddef.h 2012-02-12 02:06:04.000000000 +0100
++++ gcc-4.7.3/gcc/ginclude/stddef.h 2013-09-16 15:39:43.000000000 +0200
+@@ -184,6 +184,7 @@
+ #ifndef _GCC_SIZE_T
+ #ifndef _SIZET_
+ #ifndef __size_t
++#ifndef __DEFINED_size_t /* musl */
+ #define __size_t__ /* BeOS */
+ #define __SIZE_T__ /* Cray Unicos/Mk */
+ #define _SIZE_T
+@@ -200,6 +201,7 @@
+ #define ___int_size_t_h
+ #define _GCC_SIZE_T
+ #define _SIZET_
++#define __DEFINED_size_t /* musl */
+ #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
+ || defined(__FreeBSD_kernel__)
+ /* __size_t is a typedef on FreeBSD 5, must not trash it. */
+@@ -215,6 +217,7 @@
+ typedef long ssize_t;
+ #endif /* __BEOS__ */
+ #endif /* !(defined (__GNUG__) && defined (size_t)) */
++#endif /* __DEFINED_size_t */
+ #endif /* __size_t */
+ #endif /* _SIZET_ */
+ #endif /* _GCC_SIZE_T */
+diff -Nur gcc-4.7.3.orig/libgcc/unwind-dw2-fde-dip.c gcc-4.7.3/libgcc/unwind-dw2-fde-dip.c
+--- gcc-4.7.3.orig/libgcc/unwind-dw2-fde-dip.c 2012-10-06 23:55:06.000000000 +0200
++++ gcc-4.7.3/libgcc/unwind-dw2-fde-dip.c 2013-09-16 15:39:43.000000000 +0200
+@@ -47,28 +47,13 @@
+ #include "unwind-compat.h"
+ #include "gthr.h"
+
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
+- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
+-# define USE_PT_GNU_EH_FRAME
+-#endif
+-
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+- && defined(__FreeBSD__) && __FreeBSD__ >= 7
+-# define ElfW __ElfN
+-# define USE_PT_GNU_EH_FRAME
+-#endif
+-
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+- && defined(__OpenBSD__)
+-# define ElfW(type) Elf_##type
+-# define USE_PT_GNU_EH_FRAME
+-#endif
+-
+-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+- && defined(TARGET_DL_ITERATE_PHDR) \
+- && defined(__sun__) && defined(__svr4__)
++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR)
+ # define USE_PT_GNU_EH_FRAME
++# ifdef __OpenBSD__
++# define ElfW(type) Elf_##typ
++# elif defined(__FreeBSD__) && __FreeBSD__ >= 7
++# define ElfW __ElfN
++# endif
+ #endif
+
+ #if defined(USE_PT_GNU_EH_FRAME)
+diff -Nur gcc-4.7.3.orig/libgomp/config/posix/time.c gcc-4.7.3/libgomp/config/posix/time.c
+--- gcc-4.7.3.orig/libgomp/config/posix/time.c 2009-04-09 17:00:19.000000000 +0200
++++ gcc-4.7.3/libgomp/config/posix/time.c 2013-09-16 15:39:43.000000000 +0200
+@@ -28,6 +28,8 @@
+ The following implementation uses the most simple POSIX routines.
+ If present, POSIX 4 clocks should be used instead. */
+
++#define _POSIX_C_SOURCE 199309L /* for clocks */
++
+ #include "libgomp.h"
+ #include <unistd.h>
+ #if TIME_WITH_SYS_TIME
+diff -Nur gcc-4.7.3.orig/libitm/config/arm/hwcap.cc gcc-4.7.3/libitm/config/arm/hwcap.cc
+--- gcc-4.7.3.orig/libitm/config/arm/hwcap.cc 2011-12-15 04:24:05.000000000 +0100
++++ gcc-4.7.3/libitm/config/arm/hwcap.cc 2013-09-16 15:39:43.000000000 +0200
+@@ -40,7 +40,11 @@
+
+ #ifdef __linux__
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <sys/fcntl.h>
++#else
++#include <fcntl.h>
++#endif
+ #include <elf.h>
+
+ static void __attribute__((constructor))
+diff -Nur gcc-4.7.3.orig/libitm/config/linux/x86/tls.h gcc-4.7.3/libitm/config/linux/x86/tls.h
+--- gcc-4.7.3.orig/libitm/config/linux/x86/tls.h 2011-11-08 12:13:41.000000000 +0100
++++ gcc-4.7.3/libitm/config/linux/x86/tls.h 2013-09-16 15:39:43.000000000 +0200
+@@ -25,16 +25,19 @@
+ #ifndef LIBITM_X86_TLS_H
+ #define LIBITM_X86_TLS_H 1
+
+-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
++#if defined(__GLIBC_PREREQ)
++#if __GLIBC_PREREQ(2, 10)
+ /* Use slots in the TCB head rather than __thread lookups.
+ GLIBC has reserved words 10 through 13 for TM. */
+ #define HAVE_ARCH_GTM_THREAD 1
+ #define HAVE_ARCH_GTM_THREAD_DISP 1
+ #endif
++#endif
+
+ #include "config/generic/tls.h"
+
+-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
++#if defined(__GLIBC_PREREQ)
++#if __GLIBC_PREREQ(2, 10)
+ namespace GTM HIDDEN {
+
+ #ifdef __x86_64__
+@@ -101,5 +104,6 @@
+
+ } // namespace GTM
+ #endif /* >= GLIBC 2.10 */
++#endif
+
+ #endif // LIBITM_X86_TLS_H
+diff -Nur gcc-4.7.3.orig/libssp/configure gcc-4.7.3/libssp/configure
+--- gcc-4.7.3.orig/libssp/configure 2012-08-06 16:34:27.000000000 +0200
++++ gcc-4.7.3/libssp/configure 2013-09-16 15:39:43.000000000 +0200
+@@ -626,6 +626,8 @@
+ ssp_have_usable_vsnprintf
+ EGREP
+ GREP
++LIBSSP_IN_LIBC_FALSE
++LIBSSP_IN_LIBC_TRUE
+ LIBSSP_USE_SYMVER_SUN_FALSE
+ LIBSSP_USE_SYMVER_SUN_TRUE
+ LIBSSP_USE_SYMVER_GNU_FALSE
+@@ -735,6 +737,7 @@
+ enable_multilib
+ enable_dependency_tracking
+ enable_symvers
++enable_ssp_in_libc
+ enable_shared
+ enable_static
+ with_pic
+@@ -1374,6 +1377,7 @@
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --disable-symvers disable symbol versioning for libssp
++ --enable-ssp-in-libc do not build SSP, as it is in libc
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+@@ -4206,6 +4210,36 @@
+ fi
+
+
++# musl provides libssp in libc
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libssp is provided in libc" >&5
++$as_echo_n "checking whether libssp is provided in libc... " >&6; }
++# Check whether --enable-ssp_in_libc was given.
++if test "${enable_ssp_in_libc+set}" = set; then :
++ enableval=$enable_ssp_in_libc; ssp_in_libc=$enableval
++else
++ ssp_in_libc=check
++fi
++
++if test "x$ssp_in_libc" = "xcheck"; then
++ case "$host" in
++ *-musl*)
++ ssp_in_libc=yes
++ ;;
++
++ *)
++ ssp_in_libc=no
++ ;;
++ esac
++fi
++ if test "x$ssp_in_libc" = xyes; then
++ LIBSSP_IN_LIBC_TRUE=
++ LIBSSP_IN_LIBC_FALSE='#'
++else
++ LIBSSP_IN_LIBC_TRUE='#'
++ LIBSSP_IN_LIBC_FALSE=
++fi
++
++
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+ $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+@@ -10650,7 +10684,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 10653 "configure"
++#line 10687 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -10756,7 +10790,7 @@
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 10759 "configure"
++#line 10793 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -11185,6 +11219,10 @@
+ as_fn_error "conditional \"LIBSSP_USE_SYMVER_SUN\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
++if test -z "${LIBSSP_IN_LIBC_TRUE}" && test -z "${LIBSSP_IN_LIBC_FALSE}"; then
++ as_fn_error "conditional \"LIBSSP_IN_LIBC\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
+
+ : ${CONFIG_STATUS=./config.status}
+ ac_write_fail=0
+diff -Nur gcc-4.7.3.orig/libssp/configure.ac gcc-4.7.3/libssp/configure.ac
+--- gcc-4.7.3.orig/libssp/configure.ac 2012-05-31 20:59:34.000000000 +0200
++++ gcc-4.7.3/libssp/configure.ac 2013-09-16 15:39:43.000000000 +0200
+@@ -114,6 +114,26 @@
+ AM_CONDITIONAL(LIBSSP_USE_SYMVER_GNU, [test "x$ssp_use_symver" = xgnu])
+ AM_CONDITIONAL(LIBSSP_USE_SYMVER_SUN, [test "x$ssp_use_symver" = xsun])
+
++# musl provides libssp in libc
++AC_MSG_CHECKING([whether libssp is provided in libc])
++AC_ARG_ENABLE(ssp_in_libc,
++AC_HELP_STRING([--enable-ssp-in-libc],
++ [do not build SSP, as it is in libc]),
++ssp_in_libc=$enableval,
++ssp_in_libc=check)
++if test "x$ssp_in_libc" = "xcheck"; then
++ case "$host" in
++ *-musl*)
++ ssp_in_libc=yes
++ ;;
++
++ *)
++ ssp_in_libc=no
++ ;;
++ esac
++fi
++AM_CONDITIONAL(LIBSSP_IN_LIBC, [test "x$ssp_in_libc" = xyes])
++
+ AC_CHECK_HEADERS(alloca.h malloc.h paths.h syslog.h string.h unistd.h fcntl.h stdio.h limits.h)
+
+ if test x$gcc_no_link = xyes; then
+diff -Nur gcc-4.7.3.orig/libssp/Makefile.am gcc-4.7.3/libssp/Makefile.am
+--- gcc-4.7.3.orig/libssp/Makefile.am 2010-12-06 01:50:04.000000000 +0100
++++ gcc-4.7.3/libssp/Makefile.am 2013-09-16 15:39:43.000000000 +0200
+@@ -36,7 +36,11 @@
+
+ AM_CFLAGS = -Wall
+
++if LIBSSP_IN_LIBC
++toolexeclib_LTLIBRARIES = libssp_nonshared.la
++else
+ toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la
++endif
+
+ target_noncanonical = @target_noncanonical@
+ libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include
+diff -Nur gcc-4.7.3.orig/libssp/Makefile.in gcc-4.7.3/libssp/Makefile.in
+--- gcc-4.7.3.orig/libssp/Makefile.in 2011-02-13 12:45:53.000000000 +0100
++++ gcc-4.7.3/libssp/Makefile.in 2013-09-16 15:39:43.000000000 +0200
+@@ -93,12 +93,17 @@
+ libssp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libssp_la_LDFLAGS) $(LDFLAGS) -o $@
++@LIBSSP_IN_LIBC_FALSE@am_libssp_la_rpath = -rpath $(toolexeclibdir)
+ am_libssp_nonshared_la_OBJECTS = libssp_nonshared_la-ssp-local.lo
+ libssp_nonshared_la_OBJECTS = $(am_libssp_nonshared_la_OBJECTS)
+ libssp_nonshared_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(libssp_nonshared_la_CFLAGS) $(CFLAGS) \
+ $(libssp_nonshared_la_LDFLAGS) $(LDFLAGS) -o $@
++@LIBSSP_IN_LIBC_FALSE@am_libssp_nonshared_la_rpath = -rpath \
++@LIBSSP_IN_LIBC_FALSE@ $(toolexeclibdir)
++@LIBSSP_IN_LIBC_TRUE@am_libssp_nonshared_la_rpath = -rpath \
++@LIBSSP_IN_LIBC_TRUE@ $(toolexeclibdir)
+ DEFAULT_INCLUDES = -I.@am__isrc@
+ depcomp = $(SHELL) $(top_srcdir)/../depcomp
+ am__depfiles_maybe = depfiles
+@@ -258,7 +263,8 @@
+ @LIBSSP_USE_SYMVER_GNU_TRUE@@LIBSSP_USE_SYMVER_TRUE@version_dep = $(srcdir)/ssp.map
+ @LIBSSP_USE_SYMVER_SUN_TRUE@@LIBSSP_USE_SYMVER_TRUE@version_dep = ssp.map-sun
+ AM_CFLAGS = -Wall
+-toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la
++@LIBSSP_IN_LIBC_FALSE@toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la
++@LIBSSP_IN_LIBC_TRUE@toolexeclib_LTLIBRARIES = libssp_nonshared.la
+ libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include
+ nobase_libsubinclude_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h
+ libssp_la_SOURCES = \
+@@ -414,9 +420,9 @@
+ rm -f "$${dir}/so_locations"; \
+ done
+ libssp.la: $(libssp_la_OBJECTS) $(libssp_la_DEPENDENCIES)
+- $(libssp_la_LINK) -rpath $(toolexeclibdir) $(libssp_la_OBJECTS) $(libssp_la_LIBADD) $(LIBS)
++ $(libssp_la_LINK) $(am_libssp_la_rpath) $(libssp_la_OBJECTS) $(libssp_la_LIBADD) $(LIBS)
+ libssp_nonshared.la: $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_DEPENDENCIES)
+- $(libssp_nonshared_la_LINK) -rpath $(toolexeclibdir) $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_LIBADD) $(LIBS)
++ $(libssp_nonshared_la_LINK) $(am_libssp_nonshared_la_rpath) $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+diff -Nur gcc-4.7.3.orig/libstdc++-v3/configure.host gcc-4.7.3/libstdc++-v3/configure.host
+--- gcc-4.7.3.orig/libstdc++-v3/configure.host 2012-12-18 15:27:14.000000000 +0100
++++ gcc-4.7.3/libstdc++-v3/configure.host 2013-09-16 15:39:43.000000000 +0200
+@@ -243,6 +243,13 @@
+ os_include_dir="os/bsd/freebsd"
+ ;;
+ gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
++ # check for musl by target
++ case "${host_os}" in
++ *-musl*)
++ os_include_dir="os/generic"
++ ;;
++ *)
++
+ if [ "$uclibc" = "yes" ]; then
+ os_include_dir="os/uclibc"
+ elif [ "$bionic" = "yes" ]; then
+@@ -251,6 +258,9 @@
+ os_include_dir="os/gnu-linux"
+ fi
+ ;;
++
++ esac
++ ;;
+ hpux*)
+ os_include_dir="os/hpux"
+ ;;
diff --git a/package/gcc/patches/musl-m68k.patch b/package/gcc/patches/musl-m68k.patch
new file mode 100644
index 000000000..54c7e0eef
--- /dev/null
+++ b/package/gcc/patches/musl-m68k.patch
@@ -0,0 +1,11 @@
+diff -Nur gcc-4.7.3.orig/gcc/config/m68k/linux.h gcc-4.7.3/gcc/config/m68k/linux.h
+--- gcc-4.7.3.orig/gcc/config/m68k/linux.h 2011-11-27 00:57:37.000000000 +0100
++++ gcc-4.7.3/gcc/config/m68k/linux.h 2013-09-28 22:37:22.000000000 +0200
+@@ -73,6 +73,7 @@
+ done. */
+
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-m68k.so.1"
+
+ #undef LINK_SPEC
+ #define LINK_SPEC "-m m68kelf %{shared} \
diff --git a/package/gcc/patches/musl-mips64.patch b/package/gcc/patches/musl-mips64.patch
new file mode 100644
index 000000000..671ba9f28
--- /dev/null
+++ b/package/gcc/patches/musl-mips64.patch
@@ -0,0 +1,14 @@
+diff -Nur gcc-4.7.3.orig/gcc/config/mips/linux64.h gcc-4.7.3/gcc/config/mips/linux64.h
+--- gcc-4.7.3.orig/gcc/config/mips/linux64.h 2011-07-19 20:00:27.000000000 +0200
++++ gcc-4.7.3/gcc/config/mips/linux64.h 2013-09-17 09:24:36.000000000 +0200
+@@ -28,6 +28,9 @@
+ #define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
+ #define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
+ #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips.so.1"
++#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mips.so.1"
++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips.so.1"
+ #define GNU_USER_DYNAMIC_LINKERN32 \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
+- BIONIC_DYNAMIC_LINKERN32)
++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
diff --git a/package/gcc/patches/musl-ppc.patch b/package/gcc/patches/musl-ppc.patch
new file mode 100644
index 000000000..f4211ee73
--- /dev/null
+++ b/package/gcc/patches/musl-ppc.patch
@@ -0,0 +1,155 @@
+diff -Nur gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h
+--- gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h 2011-11-12 18:20:58.000000000 +0100
++++ gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h 2013-09-15 18:29:20.000000000 +0200
+@@ -27,7 +27,6 @@
+ #define R_CR2 70
+ #define R_VR0 77
+ #define R_VRSAVE 109
+-#define R_VSCR 110
+
+ struct gcc_vregs
+ {
+@@ -176,38 +175,6 @@
+ }
+ #endif
+
+-/* Find an entry in the process auxiliary vector. The canonical way to
+- test for VMX is to look at AT_HWCAP. */
+-
+-static long
+-ppc_linux_aux_vector (long which)
+-{
+- /* __libc_stack_end holds the original stack passed to a process. */
+- extern long *__libc_stack_end;
+- long argc;
+- char **argv;
+- char **envp;
+- struct auxv
+- {
+- long a_type;
+- long a_val;
+- } *auxp;
+-
+- /* The Linux kernel puts argc first on the stack. */
+- argc = __libc_stack_end[0];
+- /* Followed by argv, NULL terminated. */
+- argv = (char **) __libc_stack_end + 1;
+- /* Followed by environment string pointers, NULL terminated. */
+- envp = argv + argc + 1;
+- while (*envp++)
+- continue;
+- /* Followed by the aux vector, zero terminated. */
+- for (auxp = (struct auxv *) envp; auxp->a_type != 0; ++auxp)
+- if (auxp->a_type == which)
+- return auxp->a_val;
+- return 0;
+-}
+-
+ /* Do code reading to identify a signal frame, and set the frame
+ state data appropriately. See unwind-dw2.c for the structs. */
+
+@@ -217,8 +184,8 @@
+ ppc_fallback_frame_state (struct _Unwind_Context *context,
+ _Unwind_FrameState *fs)
+ {
+- static long hwcap = 0;
+ struct gcc_regs *regs = get_regs (context);
++ struct gcc_vregs *vregs;
+ long new_cfa;
+ int i;
+
+@@ -230,12 +197,15 @@
+ fs->regs.cfa_reg = STACK_POINTER_REGNUM;
+ fs->regs.cfa_offset = new_cfa - (long) context->cfa;
+
+- for (i = 0; i < 32; i++)
+- if (i != STACK_POINTER_REGNUM)
+- {
+- fs->regs.reg[i].how = REG_SAVED_OFFSET;
+- fs->regs.reg[i].loc.offset = (long) &regs->gpr[i] - new_cfa;
+- }
++#ifdef __powerpc64__
++ fs->regs.reg[2].how = REG_SAVED_OFFSET;
++ fs->regs.reg[2].loc.offset = (long) &regs->gpr[2] - new_cfa;
++#endif
++ for (i = 14; i < 32; i++)
++ {
++ fs->regs.reg[i].how = REG_SAVED_OFFSET;
++ fs->regs.reg[i].loc.offset = (long) &regs->gpr[i] - new_cfa;
++ }
+
+ fs->regs.reg[R_CR2].how = REG_SAVED_OFFSET;
+ /* CR? regs are always 32-bit and PPC is big-endian, so in 64-bit
+@@ -251,57 +221,35 @@
+ fs->retaddr_column = ARG_POINTER_REGNUM;
+ fs->signal_frame = 1;
+
+- if (hwcap == 0)
++ /* If we have a FPU... */
++ for (i = 14; i < 32; i++)
+ {
+- hwcap = ppc_linux_aux_vector (16);
+- /* These will already be set if we found AT_HWCAP. A nonzero
+- value stops us looking again if for some reason we couldn't
+- find AT_HWCAP. */
+-#ifdef __powerpc64__
+- hwcap |= 0xc0000000;
+-#else
+- hwcap |= 0x80000000;
+-#endif
++ fs->regs.reg[i + 32].how = REG_SAVED_OFFSET;
++ fs->regs.reg[i + 32].loc.offset = (long) &regs->fpr[i] - new_cfa;
+ }
+
+- /* If we have a FPU... */
+- if (hwcap & 0x08000000)
+- for (i = 0; i < 32; i++)
+- {
+- fs->regs.reg[i + 32].how = REG_SAVED_OFFSET;
+- fs->regs.reg[i + 32].loc.offset = (long) &regs->fpr[i] - new_cfa;
+- }
+-
+ /* If we have a VMX unit... */
+- if (hwcap & 0x10000000)
+- {
+- struct gcc_vregs *vregs;
+ #ifdef __powerpc64__
+- vregs = regs->vp;
++ vregs = regs->vp;
+ #else
+- vregs = &regs->vregs;
++ vregs = &regs->vregs;
+ #endif
+- if (regs->msr & (1 << 25))
++ if (regs->msr & (1 << 25))
++ {
++ for (i = 20; i < 32; i++)
+ {
+- for (i = 0; i < 32; i++)
+- {
+- fs->regs.reg[i + R_VR0].how = REG_SAVED_OFFSET;
+- fs->regs.reg[i + R_VR0].loc.offset
+- = (long) &vregs->vr[i] - new_cfa;
+- }
+-
+- fs->regs.reg[R_VSCR].how = REG_SAVED_OFFSET;
+- fs->regs.reg[R_VSCR].loc.offset = (long) &vregs->vscr - new_cfa;
++ fs->regs.reg[i + R_VR0].how = REG_SAVED_OFFSET;
++ fs->regs.reg[i + R_VR0].loc.offset = (long) &vregs->vr[i] - new_cfa;
+ }
+-
+- fs->regs.reg[R_VRSAVE].how = REG_SAVED_OFFSET;
+- fs->regs.reg[R_VRSAVE].loc.offset = (long) &vregs->vsave - new_cfa;
+ }
+
++ fs->regs.reg[R_VRSAVE].how = REG_SAVED_OFFSET;
++ fs->regs.reg[R_VRSAVE].loc.offset = (long) &vregs->vsave - new_cfa;
++
+ /* If we have SPE register high-parts... we check at compile-time to
+ avoid expanding the code for all other PowerPC. */
+ #ifdef __SPE__
+- for (i = 0; i < 32; i++)
++ for (i = 14; i < 32; i++)
+ {
+ fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].how = REG_SAVED_OFFSET;
+ fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].loc.offset
diff --git a/package/gcc/patches/musl-sh.patch b/package/gcc/patches/musl-sh.patch
new file mode 100644
index 000000000..7738f266e
--- /dev/null
+++ b/package/gcc/patches/musl-sh.patch
@@ -0,0 +1,11 @@
+diff -Nur gcc-4.7.3.orig/gcc/config/sh/linux.h gcc-4.7.3/gcc/config/sh/linux.h
+--- gcc-4.7.3.orig/gcc/config/sh/linux.h 2013-03-25 23:55:56.000000000 +0100
++++ gcc-4.7.3/gcc/config/sh/linux.h 2013-09-26 21:16:39.000000000 +0200
+@@ -46,6 +46,7 @@
+ #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh.1"
+
+ #undef SUBTARGET_LINK_EMUL_SUFFIX
+ #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
diff --git a/package/gcc/patches/musl-sparc.patch b/package/gcc/patches/musl-sparc.patch
new file mode 100644
index 000000000..228b8522d
--- /dev/null
+++ b/package/gcc/patches/musl-sparc.patch
@@ -0,0 +1,24 @@
+diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux64.h gcc-4.7.3/gcc/config/sparc/linux64.h
+--- gcc-4.7.3.orig/gcc/config/sparc/linux64.h 2011-11-12 02:05:07.000000000 +0100
++++ gcc-4.7.3/gcc/config/sparc/linux64.h 2013-09-19 11:37:50.000000000 +0200
+@@ -95,6 +95,9 @@
+
+ #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+ #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-sparc.1"
++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-sparc.1"
++
+
+ #ifdef SPARC_BI_ARCH
+
+diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux.h gcc-4.7.3/gcc/config/sparc/linux.h
+--- gcc-4.7.3.orig/gcc/config/sparc/linux.h 2011-11-12 02:05:07.000000000 +0100
++++ gcc-4.7.3/gcc/config/sparc/linux.h 2013-09-19 11:37:12.000000000 +0200
+@@ -85,6 +85,7 @@
+ done. */
+
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sparc.1"
+
+ #undef LINK_SPEC
+ #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
diff --git a/package/gcc/patches/musl.patch b/package/gcc/patches/musl.patch
deleted file mode 100644
index 4da8ce564..000000000
--- a/package/gcc/patches/musl.patch
+++ /dev/null
@@ -1,360 +0,0 @@
-diff -Nur gcc-4.7.3.orig/config.sub gcc-4.7.3/config.sub
---- gcc-4.7.3.orig/config.sub 2012-08-06 16:34:27.000000000 +0200
-+++ gcc-4.7.3/config.sub 2013-08-11 14:20:23.979180205 +0200
-@@ -125,6 +125,7 @@
- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
- case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-+ linux-musl* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
-diff -Nur gcc-4.7.3.orig/fixincludes/mkfixinc.sh gcc-4.7.3/fixincludes/mkfixinc.sh
---- gcc-4.7.3.orig/fixincludes/mkfixinc.sh 2011-09-22 16:00:17.000000000 +0200
-+++ gcc-4.7.3/fixincludes/mkfixinc.sh 2013-08-11 14:17:48.905129751 +0200
-@@ -20,7 +20,8 @@
- powerpc-*-eabi* | \
- powerpc-*-rtems* | \
- powerpcle-*-eabisim* | \
-- powerpcle-*-eabi* )
-+ powerpcle-*-eabi* | \
-+ *-musl* )
- # IF there is no include fixing,
- # THEN create a no-op fixer and exit
- (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
-diff -Nur gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h gcc-4.7.3/gcc/config/arm/linux-eabi.h
---- gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h 2011-11-02 16:03:19.000000000 +0100
-+++ gcc-4.7.3/gcc/config/arm/linux-eabi.h 2013-08-11 14:17:15.153554066 +0200
-@@ -64,6 +64,10 @@
- #undef GLIBC_DYNAMIC_LINKER
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
-
-+/* musl has no "classic" (i.e. broken) mode */
-+#undef MUSL_DYNAMIC_LINKER
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-arm.so.1"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
- use the GNU/Linux version, not the generic BPABI version. */
- #undef LINK_SPEC
-diff -Nur gcc-4.7.3.orig/gcc/config/i386/linux64.h gcc-4.7.3/gcc/config/i386/linux64.h
---- gcc-4.7.3.orig/gcc/config/i386/linux64.h 2011-07-07 17:38:34.000000000 +0200
-+++ gcc-4.7.3/gcc/config/i386/linux64.h 2013-08-11 14:17:15.157554016 +0200
-@@ -31,3 +31,7 @@
- #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
- #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
- #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
-+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
-diff -Nur gcc-4.7.3.orig/gcc/config/i386/linux.h gcc-4.7.3/gcc/config/i386/linux.h
---- gcc-4.7.3.orig/gcc/config/i386/linux.h 2011-06-03 20:30:39.000000000 +0200
-+++ gcc-4.7.3/gcc/config/i386/linux.h 2013-08-11 14:17:15.153554066 +0200
-@@ -22,3 +22,4 @@
-
- #define GNU_USER_LINK_EMULATION "elf_i386"
- #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
-diff -Nur gcc-4.7.3.orig/gcc/config/linux.h gcc-4.7.3/gcc/config/linux.h
---- gcc-4.7.3.orig/gcc/config/linux.h 2012-08-14 15:59:04.000000000 +0200
-+++ gcc-4.7.3/gcc/config/linux.h 2013-08-11 14:17:15.169553864 +0200
-@@ -33,10 +33,12 @@
- #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
- #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
- #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
-+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL)
- #else
- #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
- #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
- #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
-+#define OPTION_MUSL (linux_libc == LIBC_MUSL)
- #endif
-
- #define GNU_USER_TARGET_OS_CPP_BUILTINS() \
-@@ -54,18 +56,21 @@
- uClibc or Bionic is the default C library and whether
- -muclibc or -mglibc or -mbionic has been passed to change the default. */
-
--#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
-- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
-+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \
-+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
-
- #if DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
- #elif DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
- #elif DEFAULT_LIBC == LIBC_BIONIC
--#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
-- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
-+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif /* DEFAULT_LIBC */
-@@ -85,16 +90,16 @@
-
- #define GNU_USER_DYNAMIC_LINKER \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
-- BIONIC_DYNAMIC_LINKER)
-+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
- #define GNU_USER_DYNAMIC_LINKER32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
-- BIONIC_DYNAMIC_LINKER32)
-+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
-- BIONIC_DYNAMIC_LINKER64)
-+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
- #define GNU_USER_DYNAMIC_LINKERX32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
-- BIONIC_DYNAMIC_LINKERX32)
-+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
-
- /* Determine whether the entire c99 runtime
- is present in the runtime library. */
-diff -Nur gcc-4.7.3.orig/gcc/config/linux.opt gcc-4.7.3/gcc/config/linux.opt
---- gcc-4.7.3.orig/gcc/config/linux.opt 2010-09-29 16:51:52.000000000 +0200
-+++ gcc-4.7.3/gcc/config/linux.opt 2013-08-11 14:17:15.169553864 +0200
-@@ -30,3 +30,7 @@
- muclibc
- Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
- Use uClibc C library
-+
-+mmusl
-+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
-+Use musl C library
-diff -Nur gcc-4.7.3.orig/gcc/config/mips/linux64.h gcc-4.7.3/gcc/config/mips/linux64.h
---- gcc-4.7.3.orig/gcc/config/mips/linux64.h 2011-07-19 20:00:27.000000000 +0200
-+++ gcc-4.7.3/gcc/config/mips/linux64.h 2013-08-11 14:17:15.357551501 +0200
-@@ -28,6 +28,9 @@
- #define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
- #define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
-+#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mips.so.1"
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips.so.1"
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips.so.1"
- #define GNU_USER_DYNAMIC_LINKERN32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
-- BIONIC_DYNAMIC_LINKERN32)
-+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
-diff -Nur gcc-4.7.3.orig/gcc/config/mips/linux.h gcc-4.7.3/gcc/config/mips/linux.h
---- gcc-4.7.3.orig/gcc/config/mips/linux.h 2011-07-19 20:00:27.000000000 +0200
-+++ gcc-4.7.3/gcc/config/mips/linux.h 2013-08-11 14:17:15.169553864 +0200
-@@ -19,3 +19,5 @@
- <http://www.gnu.org/licenses/>. */
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips.so.1"
-diff -Nur gcc-4.7.3.orig/gcc/config/rs6000/linux64.h gcc-4.7.3/gcc/config/rs6000/linux64.h
---- gcc-4.7.3.orig/gcc/config/rs6000/linux64.h 2012-03-12 17:16:51.000000000 +0100
-+++ gcc-4.7.3/gcc/config/rs6000/linux64.h 2013-08-11 14:17:15.169553864 +0200
-@@ -362,17 +362,21 @@
- #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
- #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
- #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1"
-+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1"
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER32 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
- #define GNU_USER_DYNAMIC_LINKER64 \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
-
-
- #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
-diff -Nur gcc-4.7.3.orig/gcc/config/rs6000/sysv4.h gcc-4.7.3/gcc/config/rs6000/sysv4.h
---- gcc-4.7.3.orig/gcc/config/rs6000/sysv4.h 2012-04-30 19:39:01.000000000 +0200
-+++ gcc-4.7.3/gcc/config/rs6000/sysv4.h 2013-08-11 14:17:15.173553814 +0200
-@@ -804,15 +804,18 @@
-
- #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
- #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
- #if DEFAULT_LIBC == LIBC_UCLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
-+#elif DEFAULT_LIBC == LIBC_MUSL
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
- #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
--#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
-+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
- #else
- #error "Unsupported DEFAULT_LIBC"
- #endif
- #define GNU_USER_DYNAMIC_LINKER \
-- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
-+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
-
- #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
- %{rdynamic:-export-dynamic} \
-diff -Nur gcc-4.7.3.orig/gcc/config.gcc gcc-4.7.3/gcc/config.gcc
---- gcc-4.7.3.orig/gcc/config.gcc 2013-03-06 23:54:11.000000000 +0100
-+++ gcc-4.7.3/gcc/config.gcc 2013-08-11 14:17:15.141554216 +0200
-@@ -522,7 +522,7 @@
- esac
-
- # Common C libraries.
--tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
-+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
-
- # Common parts for widely ported systems.
- case ${target} in
-@@ -625,6 +625,9 @@
- *-*-*uclibc*)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
- ;;
-+ *-*-*musl*)
-+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
-+ ;;
- *)
- tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
- ;;
-diff -Nur gcc-4.7.3.orig/gcc/configure gcc-4.7.3/gcc/configure
---- gcc-4.7.3.orig/gcc/configure 2013-02-06 16:23:55.000000000 +0100
-+++ gcc-4.7.3/gcc/configure 2013-08-11 14:17:42.205213980 +0200
-@@ -26902,6 +26902,9 @@
- gcc_cv_target_dl_iterate_phdr=no
- fi
- ;;
-+ *-linux-musl*)
-+ gcc_cv_target_dl_iterate_phdr=yes
-+ ;;
- esac
-
- if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
-diff -Nur gcc-4.7.3.orig/gcc/ginclude/stddef.h gcc-4.7.3/gcc/ginclude/stddef.h
---- gcc-4.7.3.orig/gcc/ginclude/stddef.h 2012-02-12 02:06:04.000000000 +0100
-+++ gcc-4.7.3/gcc/ginclude/stddef.h 2013-08-11 14:17:15.349551601 +0200
-@@ -184,6 +184,7 @@
- #ifndef _GCC_SIZE_T
- #ifndef _SIZET_
- #ifndef __size_t
-+#ifndef __DEFINED_size_t /* musl */
- #define __size_t__ /* BeOS */
- #define __SIZE_T__ /* Cray Unicos/Mk */
- #define _SIZE_T
-@@ -200,6 +201,7 @@
- #define ___int_size_t_h
- #define _GCC_SIZE_T
- #define _SIZET_
-+#define __DEFINED_size_t /* musl */
- #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
- || defined(__FreeBSD_kernel__)
- /* __size_t is a typedef on FreeBSD 5, must not trash it. */
-@@ -215,6 +217,7 @@
- typedef long ssize_t;
- #endif /* __BEOS__ */
- #endif /* !(defined (__GNUG__) && defined (size_t)) */
-+#endif /* __DEFINED_size_t */
- #endif /* __size_t */
- #endif /* _SIZET_ */
- #endif /* _GCC_SIZE_T */
-diff -Nur gcc-4.7.3.orig/libgomp/config/posix/time.c gcc-4.7.3/libgomp/config/posix/time.c
---- gcc-4.7.3.orig/libgomp/config/posix/time.c 2009-04-09 17:00:19.000000000 +0200
-+++ gcc-4.7.3/libgomp/config/posix/time.c 2013-08-11 14:17:15.349551601 +0200
-@@ -28,6 +28,8 @@
- The following implementation uses the most simple POSIX routines.
- If present, POSIX 4 clocks should be used instead. */
-
-+#define _POSIX_C_SOURCE 199309L /* for clocks */
-+
- #include "libgomp.h"
- #include <unistd.h>
- #if TIME_WITH_SYS_TIME
-diff -Nur gcc-4.7.3.orig/libitm/config/arm/hwcap.cc gcc-4.7.3/libitm/config/arm/hwcap.cc
---- gcc-4.7.3.orig/libitm/config/arm/hwcap.cc 2011-12-15 04:24:05.000000000 +0100
-+++ gcc-4.7.3/libitm/config/arm/hwcap.cc 2013-08-11 14:17:15.353551551 +0200
-@@ -40,7 +40,11 @@
-
- #ifdef __linux__
- #include <unistd.h>
-+#ifdef __GLIBC__
- #include <sys/fcntl.h>
-+#else
-+#include <fcntl.h>
-+#endif
- #include <elf.h>
-
- static void __attribute__((constructor))
-diff -Nur gcc-4.7.3.orig/libitm/config/linux/x86/tls.h gcc-4.7.3/libitm/config/linux/x86/tls.h
---- gcc-4.7.3.orig/libitm/config/linux/x86/tls.h 2011-11-08 12:13:41.000000000 +0100
-+++ gcc-4.7.3/libitm/config/linux/x86/tls.h 2013-08-11 14:17:15.353551551 +0200
-@@ -25,16 +25,19 @@
- #ifndef LIBITM_X86_TLS_H
- #define LIBITM_X86_TLS_H 1
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- /* Use slots in the TCB head rather than __thread lookups.
- GLIBC has reserved words 10 through 13 for TM. */
- #define HAVE_ARCH_GTM_THREAD 1
- #define HAVE_ARCH_GTM_THREAD_DISP 1
- #endif
-+#endif
-
- #include "config/generic/tls.h"
-
--#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
-+#if defined(__GLIBC_PREREQ)
-+#if __GLIBC_PREREQ(2, 10)
- namespace GTM HIDDEN {
-
- #ifdef __x86_64__
-@@ -101,5 +104,6 @@
-
- } // namespace GTM
- #endif /* >= GLIBC 2.10 */
-+#endif
-
- #endif // LIBITM_X86_TLS_H
-diff -Nur gcc-4.7.3.orig/libstdc++-v3/configure.host gcc-4.7.3/libstdc++-v3/configure.host
---- gcc-4.7.3.orig/libstdc++-v3/configure.host 2012-12-18 15:27:14.000000000 +0100
-+++ gcc-4.7.3/libstdc++-v3/configure.host 2013-08-11 14:17:15.357551501 +0200
-@@ -243,6 +243,13 @@
- os_include_dir="os/bsd/freebsd"
- ;;
- gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
-+ # check for musl by target
-+ case "${host_os}" in
-+ *-musl*)
-+ os_include_dir="os/generic"
-+ ;;
-+ *)
-+
- if [ "$uclibc" = "yes" ]; then
- os_include_dir="os/uclibc"
- elif [ "$bionic" = "yes" ]; then
-@@ -251,6 +258,9 @@
- os_include_dir="os/gnu-linux"
- fi
- ;;
-+
-+ esac
-+ ;;
- hpux*)
- os_include_dir="os/hpux"
- ;;
diff --git a/package/glib/Makefile b/package/glib/Makefile
index 732f2bc0a..fef89ccab 100644
--- a/package/glib/Makefile
+++ b/package/glib/Makefile
@@ -6,7 +6,7 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= glib
PKG_VERSION:= 2.28.1
PKG_EXTRAVER:= 2.28
-PKG_RELEASE:= 2
+PKG_RELEASE:= 3
PKG_MD5SUM:= 9f6e85e1e38490c3956f4415bcd33e6e
PKG_DESCR:= low-level core library that forms the basis of GTK+
PKG_SECTION:= libs
@@ -17,14 +17,14 @@ PKG_SITES:= http://ftp.gnome.org/pub/gnome/sources/glib/${PKG_EXTRAVER}/
PKG_NOPARALLEL:= 1
PKG_OPTS:= dev
-#DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz
-
ifeq ($(ADK_STATIC),y)
PKG_OPTS+= libonly
endif
+include ${TOPDIR}/mk/host.mk
include ${TOPDIR}/mk/package.mk
+$(eval $(call HOST_template,GLIB,glib,${PKG_VERSION}-${PKG_RELEASE}))
$(eval $(call PKG_template,GLIB,glib,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
@@ -41,19 +41,17 @@ CONFIGURE_ENV+= glib_cv_long_long_format=ll \
ac_cv_func_posix_getpwuid_r=yes \
ac_cv_func_posix_getgrgid_r=yes
+HOST_CONFIGURE_ARGS+= --prefix=$(HOST_WRKINST)/usr \
+ --enable-debug=no \
+ --disable-fam
-pre-configure:
-ifeq ($(OStype),Linux)
- (cd ${WRKBUILD}; rm -rf config.{cache,status}; \
- ./configure --prefix=$(STAGING_HOST_DIR) \
- )
- ${MAKE} -C ${WRKBUILD} V=1
- $(CP) ${WRKBUILD}/gio/.libs/glib-compile-schemas ${STAGING_HOST_DIR}/bin
- $(CP) ${WRKBUILD}/gobject/.libs/glib-genmarshal ${STAGING_HOST_DIR}/bin
- $(CP) ${WRKBUILD}/gobject/glib-mkenums ${STAGING_HOST_DIR}/bin
- ${MAKE} -C ${WRKBUILD} clean
-endif
-
+glib-hostinstall:
+ $(INSTALL_BIN) ${HOST_WRKINST}/usr/bin/glib-compile-schemas \
+ ${STAGING_HOST_DIR}/usr/bin
+ $(INSTALL_BIN) ${HOST_WRKINST}/usr/bin/glib-genmarshal \
+ ${STAGING_HOST_DIR}/usr/bin
+ $(INSTALL_BIN) ${HOST_WRKINST}/usr/bin/glib-mkenums \
+ ${STAGING_HOST_DIR}/usr/bin
glib-install:
${INSTALL_DIR} ${IDIR_GLIB}/usr/lib
@@ -67,13 +65,9 @@ glib-install:
${INSTALL_DIR} ${IDIR_GLIB_DEV}/usr/lib/glib-2.0/include
${CP} ${WRKINST}/usr/lib/glib-2.0/include/glibconfig.h \
${IDIR_GLIB_DEV}/usr/lib/glib-2.0/include
- ${CP} ${WRKINST}/usr/include/* \
- ${IDIR_GLIB_DEV}/usr/include
- ${INSTALL_DIR} ${IDIR_GLIB_DEV}/usr/lib/pkgconfig
- ${CP} ${WRKINST}/usr/lib/pkgconfig/*.pc \
- ${IDIR_GLIB_DEV}/usr/lib/pkgconfig
${INSTALL_DIR} ${IDIR_GLIB_DEV}/usr/bin
$(INSTALL_BIN) $(WRKINST)/usr/bin/glib-genmarshal \
${IDIR_GLIB_DEV}/usr/bin
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/imlib2/Makefile b/package/imlib2/Makefile
index c1c4c4e6d..c2c975908 100644
--- a/package/imlib2/Makefile
+++ b/package/imlib2/Makefile
@@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= imlib2
PKG_VERSION:= 1.4.4
-PKG_RELEASE:= 2
+PKG_RELEASE:= 4
PKG_MD5SUM:= 20d59c7cda06742015baade6f5975415
PKG_DESCR:= Version 2 of an advanced replacement library for libraries like libXpm
PKG_SECTION:= libs
-PKG_DEPENDS:= libfreetype zlib libpng libtiff
-PKG_BUILDDEP:= freetype zlib libpng libtiff
+PKG_DEPENDS:= libfreetype zlib libpng libtiff libx11 libxext
+PKG_BUILDDEP:= freetype zlib libpng libtiff libX11 libXext
PKG_URL:= http://www.enlightenment.org/
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=enlightenment/}
PKG_OPTS:= dev
diff --git a/package/kexec-tools/Makefile b/package/kexec-tools/Makefile
index 0edd45ea9..7f6332a3f 100644
--- a/package/kexec-tools/Makefile
+++ b/package/kexec-tools/Makefile
@@ -14,7 +14,7 @@ PKG_BUILDEP:= zlib
PKG_URL:= http://kernel.org/pub/linux/utils/kernel/kexec/
PKG_SITES:= http://kernel.org/pub/linux/utils/kernel/kexec/
-PKG_ARCH_DEPENDS:= !cris !avr32 !mips
+PKG_ARCH_DEPENDS:= !cris !avr32 !mips !m68k
PKG_CFLINE_KEXEC_TOOLS:= select ADK_KERNEL_KEXEC
include $(TOPDIR)/mk/package.mk
diff --git a/package/libglew/Makefile b/package/libglew/Makefile
index 5e9d623ca..d6aed4f12 100644
--- a/package/libglew/Makefile
+++ b/package/libglew/Makefile
@@ -15,6 +15,8 @@ PKG_URL:= http://glew.sourceforge.net/index.html
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=glew/}
PKG_OPTS:= dev
+PKG_ARCH_DEPENDS:= !m68k
+
DISTFILES:= glew-$(PKG_VERSION).tgz
WRKDIST= ${WRKDIR}/glew-$(PKG_VERSION)
diff --git a/package/libiconv/Makefile b/package/libiconv/Makefile
index 114c473d9..458581038 100644
--- a/package/libiconv/Makefile
+++ b/package/libiconv/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= libiconv
-PKG_VERSION:= 1.13.1
-PKG_RELEASE:= 2
-PKG_MD5SUM:= 7ab33ebd26687c744a37264a330bbe9a
+PKG_VERSION:= 1.14
+PKG_RELEASE:= 1
+PKG_MD5SUM:= e34509b1623cec449dfeb73d7ce9c6c6
PKG_DESCR:= character set conversion library
PKG_SECTION:= libs
PKG_URL:= http://www.gnu.org/software/libiconv/
@@ -21,12 +21,6 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,LIBICONV,libiconv,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
-TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
-TARGET_CFLAGS+= -fPIC
-FAKE_FLAGS+= libdir="${WRKINST}/usr/lib" \
- includedir="${WRKINST}/usr/include" \
-INSTALL_TARGET= install-lib
-
libiconv-install:
${INSTALL_DIR} ${IDIR_LIBICONV}/usr/lib
${CP} ${WRKINST}/usr/lib/libiconv.so* ${IDIR_LIBICONV}/usr/lib/
diff --git a/package/libiconv/patches/patch-build-aux_ltmain_sh b/package/libiconv/patches/patch-build-aux_ltmain_sh
deleted file mode 100644
index 1c6d67d61..000000000
--- a/package/libiconv/patches/patch-build-aux_ltmain_sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- libiconv-1.13.1.orig/build-aux/ltmain.sh 2009-06-21 13:17:33.000000000 +0200
-+++ libiconv-1.13.1/build-aux/ltmain.sh 2011-01-14 00:42:49.000000000 +0100
-@@ -4885,7 +4885,7 @@ func_mode_link ()
- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
- # @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
-+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
diff --git a/package/libiconv/patches/patch-libcharset_build-aux_ltmain_sh b/package/libiconv/patches/patch-libcharset_build-aux_ltmain_sh
deleted file mode 100644
index 1c0c92ab1..000000000
--- a/package/libiconv/patches/patch-libcharset_build-aux_ltmain_sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- libiconv-1.13.1.orig/libcharset/build-aux/ltmain.sh 2009-06-21 13:17:33.000000000 +0200
-+++ libiconv-1.13.1/libcharset/build-aux/ltmain.sh 2011-01-14 00:44:22.000000000 +0100
-@@ -4885,7 +4885,7 @@ func_mode_link ()
- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
- # @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
-+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
diff --git a/package/libiconv/patches/patch-preload_Makefile_in b/package/libiconv/patches/patch-preload_Makefile_in
deleted file mode 100644
index 5aa7e91e0..000000000
--- a/package/libiconv/patches/patch-preload_Makefile_in
+++ /dev/null
@@ -1,16 +0,0 @@
---- libiconv-1.13.orig/preload/Makefile.in 2009-01-17 00:11:37.000000000 +0100
-+++ libiconv-1.13/preload/Makefile.in 2009-10-10 22:01:15.666144195 +0200
-@@ -54,11 +54,11 @@ preloadable_libiconv.so : $(SOURCES)
- done && \
- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) -o libiconv.la -rpath $(libdir) -no-undefined objects/*.lo && \
- $(RM) -r objects
-- cp .libs/libiconv.so preloadable_libiconv.so
-+ -test -f .libs/libiconv.so && cp .libs/libiconv.so preloadable_libiconv.so
-
- install : all force
- if [ ! -d $(DESTDIR)$(libdir) ] ; then $(mkinstalldirs) $(DESTDIR)$(libdir) ; fi
-- if test -n "@PLUGLIB@"; then $(INSTALL_DATA) @PLUGLIB@ $(DESTDIR)$(libdir)/@PLUGLIB@.new && mv $(DESTDIR)$(libdir)/@PLUGLIB@.new $(DESTDIR)$(libdir)/@PLUGLIB@ ; fi
-+ -if test -n "@PLUGLIB@"; then $(INSTALL_DATA) @PLUGLIB@ $(DESTDIR)$(libdir)/@PLUGLIB@.new && mv $(DESTDIR)$(libdir)/@PLUGLIB@.new $(DESTDIR)$(libdir)/@PLUGLIB@ ; fi
-
- install-strip : install
-
diff --git a/package/libiconv/patches/patch-src_Makefile_in b/package/libiconv/patches/patch-src_Makefile_in
deleted file mode 100644
index 2763d71e4..000000000
--- a/package/libiconv/patches/patch-src_Makefile_in
+++ /dev/null
@@ -1,11 +0,0 @@
---- libiconv-1.13.1.orig/src/Makefile.in 2009-06-21 13:17:33.000000000 +0200
-+++ libiconv-1.13.1/src/Makefile.in 2011-02-04 17:12:50.000000000 +0100
-@@ -113,7 +113,7 @@ install : all force
- if [ ! -d $(DESTDIR)$(bindir) ] ; then $(mkinstalldirs) $(DESTDIR)$(bindir) ; fi
- case "@host_os@" in \
- hpux*) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a -L$(DESTDIR)$(libdir) -liconv @LIBINTL@ $(OBJECTS_RES_@WOE32@) `if test -n '$(DESTDIR)'; then echo " -Wl,+b -Wl,$(libdir)"; fi` -o iconv$(EXEEXT);; \
-- *) $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a $(DESTDIR)$(libdir)/libiconv.la @LTLIBINTL@ $(OBJECTS_RES_@WOE32@) -o iconv$(EXEEXT);; \
-+ *) $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a ../lib/libiconv.la @LTLIBINTL@ $(OBJECTS_RES_@WOE32@) -o iconv$(EXEEXT);; \
- esac
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) iconv$(EXEEXT) $(DESTDIR)$(bindir)/iconv$(EXEEXT)
-
diff --git a/package/libpng/Makefile b/package/libpng/Makefile
index af067f4d2..1d43a4998 100644
--- a/package/libpng/Makefile
+++ b/package/libpng/Makefile
@@ -15,8 +15,6 @@ PKG_URL:= http://www.libpng.org/pub/png/libpng.html
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=libpng/}
PKG_OPTS:= dev
-PKG_ARCH_DEPENDS:= !m68k
-
ifeq ($(ADK_STATIC),y)
PKG_OPTS+= libonly
endif
diff --git a/package/libthread_db/Makefile b/package/libthread_db/Makefile
index 7c3b3eb13..6827a4fdd 100644
--- a/package/libthread_db/Makefile
+++ b/package/libthread_db/Makefile
@@ -20,6 +20,8 @@ PKG_NAME:= libthread-db
PKG_DESCR:= POSIX threads library for gdb/gdbserver
PKG_SECTION:= libs
+PKG_ARCH_DEPENDS:= !m68k
+
NO_DISTFILES:= 1
include ${TOPDIR}/mk/package.mk
diff --git a/package/libvpx/Makefile b/package/libvpx/Makefile
index 6205ac4b1..13796e7d5 100644
--- a/package/libvpx/Makefile
+++ b/package/libvpx/Makefile
@@ -13,7 +13,7 @@ PKG_URL:= http://www.webmproject.org/about/
PKG_SITES:= http://webm.googlecode.com/files/
PKG_OPTS:= dev
-PKG_ARCH_DEPENDS:= !avr32
+PKG_ARCH_DEPENDS:= !avr32 !m68k
DISTFILES:= ${PKG_NAME}-v${PKG_VERSION}.tar.bz2
WRKDIST= $(WRKDIR)/${PKG_NAME}-v${PKG_VERSION}
diff --git a/package/libxcb/Makefile b/package/libxcb/Makefile
index ba6d72c29..f394cc10f 100644
--- a/package/libxcb/Makefile
+++ b/package/libxcb/Makefile
@@ -4,13 +4,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= libxcb
-PKG_VERSION:= 1.7
-PKG_RELEASE:= 2
-PKG_MD5SUM:= f715e53c9c1b25f856d14d6123663d96
+PKG_VERSION:= 1.9.1
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 324c76024a73dba8a902638696ba87de
PKG_DESCR:= X11 keyboard library
PKG_SECTION:= x11/libs
PKG_BUILDDEP:= python2 libpthread-stubs libxslt libXau xcb-proto
-PKG_SITES:= ${MASTER_SITE_XORG}
+PKG_SITES:= http://xcb.freedesktop.org/dist/
PKG_OPTS:= dev
include $(TOPDIR)/mk/package.mk
diff --git a/package/libxcb/patches/patch-ltmain_sh b/package/libxcb/patches/patch-ltmain_sh
deleted file mode 100644
index c3b2b8713..000000000
--- a/package/libxcb/patches/patch-ltmain_sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- libxcb-1.7.orig/ltmain.sh 2010-08-13 13:46:48.000000000 +0200
-+++ libxcb-1.7/ltmain.sh 2011-01-30 18:41:38.000000000 +0100
-@@ -4765,7 +4765,7 @@ func_mode_link ()
- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
- # @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
-+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
diff --git a/package/madplay/Makefile b/package/madplay/Makefile
index e146ce9c0..cb154ae8c 100644
--- a/package/madplay/Makefile
+++ b/package/madplay/Makefile
@@ -15,8 +15,6 @@ PKG_URL:= http://www.underbit.com/products/mad
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=mad/} \
ftp://ftp.mars.org/pub/mpeg/
-PKG_ARCH_DEPENDS:= !m68k
-
include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,MADPLAY,madplay,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
diff --git a/package/microperl/Makefile b/package/microperl/Makefile
index e8253abde..53c380d10 100644
--- a/package/microperl/Makefile
+++ b/package/microperl/Makefile
@@ -12,7 +12,7 @@ PKG_SECTION:= lang
PKG_URL:= http://www.perl.org/
PKG_SITES:= ftp://ftp.cpan.org/pub/CPAN/src/5.0/
-PKG_ARCH_DEPENDS:= !avr32
+PKG_ARCH_DEPENDS:= !avr32 !m68k
DISTFILES:= perl-${PKG_VERSION}.tar.gz
WRKDIST= ${WRKDIR}/perl-${PKG_VERSION}
diff --git a/package/mpd/Makefile b/package/mpd/Makefile
index 93176ee63..a78aa7ffc 100644
--- a/package/mpd/Makefile
+++ b/package/mpd/Makefile
@@ -5,12 +5,12 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= mpd
PKG_VERSION:= 0.17.6
-PKG_RELEASE:= 3
+PKG_RELEASE:= 4
PKG_MD5SUM:= d0da6a6a1d9cf1e8710b6082f6ef7849
PKG_DESCR:= A music player daemon
PKG_SECTION:= multimedia
-PKG_DEPENDS:= glib libstdcxx libgcc
-PKG_FDEPENDS:= glib libstdcxx
+PKG_DEPENDS:= glib libstdcxx libgcc libiconv
+PKG_FDEPENDS:= glib libstdcxx libgcc libiconv
PKG_BUILDDEP:= glib
PKG_URL:= http://www.musicpd.org/
PKG_SITES:= http://www.musicpd.org/download/mpd/0.17/
diff --git a/package/mpg123/Makefile b/package/mpg123/Makefile
index f7b69e786..49d23b617 100644
--- a/package/mpg123/Makefile
+++ b/package/mpg123/Makefile
@@ -14,8 +14,6 @@ PKG_BUILDDEP:= alsa-lib
PKG_URL:= http://www.mpg123.de/
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=mpg123/}
-PKG_ARCH_DEPENDS:= !m68k
-
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
include $(TOPDIR)/mk/package.mk
diff --git a/package/ncurses/Makefile b/package/ncurses/Makefile
index c72b4b279..b923e8fa3 100644
--- a/package/ncurses/Makefile
+++ b/package/ncurses/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= ncurses
-PKG_VERSION:= 5.7
-PKG_RELEASE:= 5
-PKG_MD5SUM:= cce05daf61a64501ef6cd8da1f727ec6
+PKG_VERSION:= 5.9
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 8cb9c412e5f2d96bc6f459aa8c6282a1
PKG_DESCR:= a terminal handling library
PKG_SECTION:= libs
PKG_URL:= http://www.gnu.org/software/ncurses/
@@ -17,8 +17,10 @@ PKG_OPTS:= dev
PKG_FLAVOURS_LIBNCURSES:= FULL_TERMINFO
PKGFD_FULL_TERMINFO:= install the complete set of terminfo files as provided upstream
+include ${TOPDIR}/mk/host.mk
include ${TOPDIR}/mk/package.mk
+$(eval $(call HOST_template,LIBNCURSES,libncurses,${PKG_VERSION}-${PKG_RELEASE}))
$(eval $(call PKG_template,LIBNCURSES,libncurses,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
TARGET_CFLAGS+= -lgcc
@@ -27,40 +29,46 @@ CONFIGURE_ARGS+= --without-cxx \
--without-cxx-binding \
--with-build-cc=${CC_FOR_BUILD} \
--without-progs \
- --with-fallbacks \
--disable-termcap \
+ --enable-symlinks \
--without-ada \
--with-shared \
- --with-normal \
--without-debug \
--without-profile \
--without-gpm \
+ --without-manpages \
+ --without-tests \
--enable-overwrite \
--with-terminfo-dirs=/usr/share/terminfo \
--with-default-terminfo-dir=/usr/share/terminfo \
--disable-big-core \
--disable-home-terminfo \
--without-rcs-ids \
- --enable-const \
- --enable-echo
+ --enable-const
ALL_TARGET:= libs
INSTALL_TARGET:= install.libs install.data
-pre-configure:
- # create tic host binary
- (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
- ./configure \
- --with-shared \
- --with-build-cc=${CC_FOR_BUILD} \
- --with-progs \
- --without-debug \
- --without-profile \
- );
- ${MAKE} -C ${WRKBUILD}/include
- ${MAKE} -C ${WRKBUILD}/progs
- ${CP} ${WRKBUILD}/progs/tic ${STAGING_HOST_DIR}/bin
- find ${WRKBUILD} -name *.o -exec rm {} \;
- find ${WRKBUILD} -name *.a -exec rm {} \;
+# use sth which does not exist
+HOST_ALL_TARGET:= progs
+HOST_INSTALL_TARGET:= install.includes install.progs
+HOST_CONFIGURE_ARGS+= --without-shared \
+ --with-build-cc=${CC_FOR_BUILD} \
+ --with-progs \
+ --with-ticlib \
+ --disable-tic-depends \
+ --enable-symlinks \
+ --without-manpages \
+ --without-tests \
+ --without-cxx \
+ --without-cxx-binding \
+ --without-gpm \
+ --without-ada \
+ --disable-termcap \
+ --without-debug \
+ --without-profile
+
+libncurses-hostinstall:
+ ${CP} ${HOST_WRKINST}/usr/bin/* ${STAGING_HOST_DIR}/usr/bin
libncurses-install:
# this is installed as libncurses - make libcurses a "link"
@@ -83,4 +91,5 @@ else
done
endif
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/ncurses/patches/patch-configure b/package/ncurses/patches/patch-configure
deleted file mode 100644
index 1ef36c733..000000000
--- a/package/ncurses/patches/patch-configure
+++ /dev/null
@@ -1,16 +0,0 @@
---- ncurses-5.7.orig/configure 2008-10-26 02:04:38.000000000 +0200
-+++ ncurses-5.7/configure 2009-11-15 22:44:41.000000000 +0100
-@@ -3985,13 +3985,6 @@ echo "${ECHO_T}$BUILD_LIBS" >&6
-
- : ${BUILD_CC:='${CC}'}
-
-- if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
-- { { echo "$as_me:3989: error: Cross-build requires two compilers.
--Use --with-build-cc to specify the native compiler." >&5
--echo "$as_me: error: Cross-build requires two compilers.
--Use --with-build-cc to specify the native compiler." >&2;}
-- { (exit 1); exit 1; }; }
-- fi
-
- else
- : ${BUILD_CC:='${CC}'}
diff --git a/package/ncurses/patches/patch-misc_run_tic_in b/package/ncurses/patches/patch-misc_run_tic_in
deleted file mode 100644
index b4c917fb8..000000000
--- a/package/ncurses/patches/patch-misc_run_tic_in
+++ /dev/null
@@ -1,33 +0,0 @@
---- ncurses-5.7.orig/misc/run_tic.in 2006-10-28 21:43:30.000000000 +0200
-+++ ncurses-5.7/misc/run_tic.in 2009-12-30 15:14:43.273450029 +0100
-@@ -58,22 +58,25 @@ echo '** Building terminfo database, ple
-
- test -z "${DESTDIR}" && DESTDIR=
-
-+# original comment:
- # Allow tic to run either from the install-path, or from the build-directory.
- # Do not do this if we appear to be cross-compiling. In that case, we rely
- # on the host's copy of tic to compile the terminfo database.
--if test "$THAT_CC" = "$THIS_CC" ; then
-+# -- end comment --
-+# ATTENTION: Always use native tic from build environment
-+#if test "$THAT_CC" = "$THIS_CC" ; then
- case "$PATH" in
- :*) PATH=../progs:../lib:${DESTDIR}$bindir$PATH ;;
- *) PATH=../progs:../lib:${DESTDIR}$bindir:$PATH ;;
- esac
- export PATH
- SHLIB="sh $srcdir/shlib"
--else
-+#else
- # Cross-compiling, so don't set PATH or run shlib.
--SHLIB=
-+#SHLIB=
- # reset $suffix, since it applies to the target, not the build platform.
--suffix=
--fi
-+#suffix=
-+#fi
-
-
- # set another env var that doesn't get reset when `shlib' runs, so `shlib' uses
diff --git a/package/ncurses/patches/patch-misc_terminfo_src b/package/ncurses/patches/patch-misc_terminfo_src
index 47535d1cb..865759cb2 100644
--- a/package/ncurses/patches/patch-misc_terminfo_src
+++ b/package/ncurses/patches/patch-misc_terminfo_src
@@ -1,6 +1,6 @@
---- ncurses-5.7.orig/misc/terminfo.src 2008-10-13 01:03:54.000000000 +0200
-+++ ncurses-5.7/misc/terminfo.src 2010-07-15 17:30:24.852569567 +0200
-@@ -3965,6 +3965,171 @@ rxvt-cygwin-native|rxvt terminal emulato
+--- ncurses-5.9.orig/misc/terminfo.src 2011-02-20 21:46:53.000000000 +0100
++++ ncurses-5.9/misc/terminfo.src 2013-10-23 20:00:07.000000000 +0200
+@@ -4208,6 +4208,175 @@ rxvt-cygwin-native|rxvt terminal emulato
rxvt-16color|xterm with 16 colors like aixterm,
ncv#32, use=ibm+16color, use=rxvt,
@@ -169,6 +169,6 @@
+ fsl=\007,
+ dsl=\E]2;\007,
+
- # mrxvt 0.5.3
+ # mrxvt 0.5.4
#
# mrxvt is based on rxvt 2.7.11, but has by default XTERM_FKEYS defined, which
diff --git a/package/ncurses/patches/patch-progs_Makefile_in b/package/ncurses/patches/patch-progs_Makefile_in
deleted file mode 100644
index db8b6a74b..000000000
--- a/package/ncurses/patches/patch-progs_Makefile_in
+++ /dev/null
@@ -1,11 +0,0 @@
---- ncurses-5.7.orig/progs/Makefile.in 2008-09-07 15:58:55.000000000 +0200
-+++ ncurses-5.7/progs/Makefile.in 2010-07-26 17:44:33.000000000 +0200
-@@ -109,7 +109,7 @@ LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHA
-
- LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@)
-
--LIBS_TIC = @LDFLAGS_STATIC@ @TICS_ARGS@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LD_MODEL@ @LIBS@
-+LIBS_TIC = ../lib/libncurses.a
- LDFLAGS_TIC = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TIC)
-
- LIBS_TINFO = @LDFLAGS_STATIC@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LD_MODEL@ @LIBS@
diff --git a/package/obexftp/Makefile b/package/obexftp/Makefile
index 5d9797730..4b293376b 100644
--- a/package/obexftp/Makefile
+++ b/package/obexftp/Makefile
@@ -5,11 +5,11 @@ include ${TOPDIR}/rules.mk
PKG_NAME:= obexftp
PKG_VERSION:= 0.23
-PKG_RELEASE:= 3
+PKG_RELEASE:= 4
PKG_MD5SUM:= f20762061b68bc921e80be4aebc349eb
PKG_DESCR:= bluetooth ftp application
PKG_SECTION:= bluetooth
-PKG_DEPENDS:= openobex libiconv libobexftp
+PKG_DEPENDS:= openobex libiconv libobexftp libbluetooth
PKG_BUILDDEP:= openobex libiconv
PKG_URL:= http://dev.zuckschwerdt.org/openobex/wiki/ObexFtp
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=openobex/}
@@ -17,6 +17,8 @@ PKG_LIBNAME:= libobexftp
PKG_OPTS:= dev
PKG_SUBPKGS:= OBEXFTP LIBOBEXFTP
+PKGSC_LIBOBEXFTP:= libs
+PKGSD_LIBOBEXFTP:= obex ftp library
PKG_ARCH_DEPENDS:= !avr32
diff --git a/package/openldap/Makefile b/package/openldap/Makefile
index 64cf8b108..1e45c66f8 100644
--- a/package/openldap/Makefile
+++ b/package/openldap/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= openldap
-PKG_VERSION:= 2.4.26
-PKG_RELEASE:= 2
-PKG_MD5SUM:= f36f3086031dd56ae94f722ffae8df5e
+PKG_VERSION:= 2.4.36
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 744701405d396b1fb9de6cb7a453c6e9
PKG_DESCR:= OpenLDAP client libraries
PKG_SECTION:= libs
PKG_DEPENDS:= libopenssl libsasl2 libdb libpthread libuuid
@@ -40,7 +40,7 @@ $(eval $(call PKG_template,LIBOPENLDAP,libopenldap,${PKG_VERSION}-${PKG_RELEASE}
$(eval $(call PKG_template,OPENLDAP_UTILS,openldap-utils,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENLDAP_UTILS},${PKGSD_OPENLDAP_UTILS},${PKGSC_OPENLDAP_UTILS}))
$(eval $(call PKG_template,OPENLDAP_SLAPD,openldap-slapd,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENLDAP_SLAPD},${PKGSD_OPENLDAP_SLAPD},${PKGSC_OPENLDAP_SLAPD}))
-PKG_CONFIGURE_OPTIONS+= --enable-slapd \
+CONFIGURE_ARGS+= --enable-slapd \
--libexecdir=/usr/sbin \
--enable-bdb \
--disable-hdb \
@@ -62,26 +62,8 @@ CONFIGURE_ARGS+= --disable-ipv6
endif
CONFIGURE_ENV+= ac_cv_func_memcmp_working=yes
-CONFIGURE_ARGS+= ${PKG_CONFIGURE_OPTIONS}
XAKE_FLAGS+= STRIP="" CPPFLAGS="-D_GNU_SOURCE"
-pre-configure:
- (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
- CPPFLAGS=-D_GNU_SOURCE ./configure \
- ${PKG_CONFIGURE_OPTIONS} \
- --disable-slapd \
- --without-cyrus-sasl \
- --without-threads \
- --without-tls \
- );
- ${MAKE} -C ${WRKBUILD} depend
- ${MAKE} -C ${WRKBUILD}/libraries/liblutil
- ${MAKE} -C ${WRKBUILD}/libraries/liblber
- ${MAKE} -C ${WRKBUILD}/libraries/liblunicode
- ${MAKE} -C ${WRKBUILD}/libraries/liblber clean
- ${MAKE} -C ${WRKBUILD}/libraries/liblutil clean
- ${MAKE} -C ${WRKBUILD}/libraries/liblunicode clean
-
libopenldap-install:
${INSTALL_DIR} ${IDIR_LIBOPENLDAP}/etc/openldap
${CP} ${WRKINST}/etc/openldap/ldap.conf \
diff --git a/package/pango/Makefile b/package/pango/Makefile
index b89fc7f18..b3979b9e2 100644
--- a/package/pango/Makefile
+++ b/package/pango/Makefile
@@ -15,10 +15,6 @@ PKG_SITES:= ${MASTER_SITE_GNOME:=pango/1.28/}
PKG_NEED_CXX:= 1
PKG_OPTS:= dev
-PKG_ARCH_DEPENDS:= !m68k
-
-#DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz
-
ifeq ($(ADK_STATIC),y)
PKG_OPTS+= libonly
endif
diff --git a/package/pixman/Makefile b/package/pixman/Makefile
index 9ed31b20a..5cb1821d9 100644
--- a/package/pixman/Makefile
+++ b/package/pixman/Makefile
@@ -13,8 +13,6 @@ PKG_BUILDDEP:= libpng
PKG_SITES:= http://www.cairographics.org/releases/
PKG_OPTS:= dev
-PKG_ARCH_DEPENDS:= !m68k
-
ifeq ($(ADK_STATIC),y)
PKG_OPTS+= libonly
endif
diff --git a/package/python2/Makefile b/package/python2/Makefile
index c020e645d..b97266468 100644
--- a/package/python2/Makefile
+++ b/package/python2/Makefile
@@ -13,7 +13,7 @@ PKG_BUILDDEP:= zlib libffi openssl readline bzip2
PKG_DEPENDS:= libpthread zlib libffi libopenssl libgcc
PKG_URL:= http://www.python.org/
PKG_SITES:= http://www.python.org/ftp/python/${PKG_VERSION}/
-PKG_OPTS:= noscripts
+PKG_OPTS:= dev noscripts
PKG_HOST_DEPENDS:= !netbsd !openbsd
@@ -27,8 +27,8 @@ PKGSS_PYTHON2_BZIP2:= bzip2
include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,PYTHON2,python2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
-$(eval $(call PKG_template,PYTHON2_BZIP2,python2-bzip2,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_PYTHON2_BZIP2},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
-$(eval $(call PKG_template,PYTHON2_READLINE,python2-readline,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_PYTHON2_READLINE},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+$(eval $(call PKG_template,PYTHON2_BZIP2,python2-bzip2,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_PYTHON2_BZIP2},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,PYTHON2_READLINE,python2-readline,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_PYTHON2_READLINE},${PKG_DESCR},${PKG_SECTION}))
ifeq ($(ADK_HOST_CYGWIN),y)
EXE:= .exe
@@ -79,7 +79,8 @@ python2-install:
${INSTALL_BIN} ${WRKINST}/usr/bin/python ${IDIR_PYTHON2}/usr/bin
${CP} ${WRKINST}/usr/lib/libpython*.so* ${IDIR_PYTHON2}/usr/lib
${CP} ${WRKINST}/usr/lib/python2.7/* ${IDIR_PYTHON2}/usr/lib/python2.7
- ${CP} ${WRKINST}/usr/include/python2.7/* ${IDIR_PYTHON2}/usr/include/python2.7
+ ${CP} ${WRKINST}/usr/include/python2.7/pyconfig.h \
+ ${IDIR_PYTHON2}/usr/include/python2.7
-find ${IDIR_PYTHON2} -name "\*.pyc" -o -name "*\.pyo" -exec rm {} \;
-rm ${IDIR_PYTHON2}/usr/lib/python2.7/lib-dynload/readline.so
-rm ${IDIR_PYTHON2}/usr/lib/python2.7/lib-dynload/bz2.so
diff --git a/package/ruby/Makefile b/package/ruby/Makefile
index 79e4e3a46..cf0bff905 100644
--- a/package/ruby/Makefile
+++ b/package/ruby/Makefile
@@ -4,14 +4,15 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= ruby
-PKG_VERSION:= 1.9.3
-PKG_EXTRAVER:= 0
+PKG_VERSION:= 2.0.0
+PKG_EXTRAVER:= 247
PKG_RELEASE:= 1
-PKG_MD5SUM:= 8e2fef56185cfbaf29d0c8329fc77c05
+PKG_MD5SUM:= c351450a0bed670e0f5ca07da3458a5b
PKG_DESCR:= interpreter for the ruby language
PKG_SECTION:= lang
+PKG_DEPENDS:= librt libpthread libgcc
PKG_URL:= http://www.ruby-lang.org/
-PKG_SITES:= http://ftp.ruby-lang.org/pub/ruby/1.9/
+PKG_SITES:= http://ftp.ruby-lang.org/pub/ruby/2.0/
PKG_NOPARALLEL:= 1
PKG_HOST_DEPENDS:= !freebsd !cygwin
@@ -19,26 +20,38 @@ PKG_HOST_DEPENDS:= !freebsd !cygwin
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}-p${PKG_EXTRAVER}.tar.gz
WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION}-p${PKG_EXTRAVER}
+include ${TOPDIR}/mk/host.mk
include ${TOPDIR}/mk/package.mk
+$(eval $(call HOST_template,RUBY,ruby,${PKG_VERSION}-${PKG_RELEASE}))
$(eval $(call PKG_template,RUBY,ruby,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+# uClibc setpgrp does not take arguments
+CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes \
+ rb_cv_binary_elf=yes
+CONFIGURE_ARGS+= --disable-install-doc \
+ --with-baseruby=${STAGING_HOST_DIR}/usr/bin/ruby
+
MAKE_FILE:= GNUmakefile
XAKE_FLAGS+= optflags='' debugflags='' dldflags="$(TARGET_LDFLAGS)"
-# uClibc setpgrp does not take arguments
-CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes rb_cv_binary_elf=yes
-CONFIGURE_ARGS+= --disable-install-doc --with-baseruby=${STAGING_DIR}/bin/ruby
ALL_TARGET:= main
INSTALL_TARGET:= install-nodoc
-pre-configure:
- (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
- rb_cv_binary_elf=yes ./configure --prefix=$(STAGING_HOST_DIR) --disable-install-doc \
- );
- -$(MAKE) -C ${WRKBUILD} main Q=""
- cp ${WRKBUILD}/ruby ${STAGING_DIR}/bin/ruby
- $(MAKE) -C ${WRKBUILD} install-nodoc
- $(MAKE) -C ${WRKBUILD} clean
+HOST_CONFIGURE_ARGS+= --disable-install-doc \
+ --disable-shared \
+ --prefix=$(HOST_WRKINST)/usr \
+ --bindir=$(HOST_WRKINST)/usr/bin \
+ --mandir=$(HOST_WRKINST)/usr/share/man \
+ --disable-rubygems
+HOST_ALL_TARGET:= main
+HOST_INSTALL_TARGET:= install-nodoc
+HOST_XAKE_FLAGS:= V=1 DESTDIR=""
+
+ruby-hostinstall:
+ $(INSTALL_BIN) $(HOST_WRKINST)/usr/bin/ruby \
+ $(STAGING_HOST_DIR)/usr/bin
+ $(CP) $(HOST_WRKINST)/usr/lib/ruby \
+ $(STAGING_HOST_DIR)/usr/lib
ruby-install:
${INSTALL_DIR} ${IDIR_RUBY}/usr/lib/ruby
@@ -47,4 +60,5 @@ ruby-install:
${CP} ${WRKINST}/usr/lib/ruby/* ${IDIR_RUBY}/usr/lib/ruby
${INSTALL_BIN} ${WRKINST}/usr/bin/* ${IDIR_RUBY}/usr/bin
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/ruby/patches/patch-configure b/package/ruby/patches/patch-configure
new file mode 100644
index 000000000..f278b96ee
--- /dev/null
+++ b/package/ruby/patches/patch-configure
@@ -0,0 +1,141 @@
+--- ruby-2.0.0-p247.orig/configure 2013-06-27 13:16:17.000000000 +0200
++++ ruby-2.0.0-p247/configure 2013-10-24 11:12:04.000000000 +0200
+@@ -7373,138 +7373,6 @@ else
+ fi
+
+
+- # -fstack-protector
+- case "$target_os" in #(
+- mingw*|nacl|haiku) :
+-
+- stack_protector=no
+- ;; #(
+- *) :
+-
+-
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fstack-protector is accepted as CFLAGS" >&5
+-$as_echo_n "checking whether -fstack-protector is accepted as CFLAGS... " >&6; }
+- save_CFLAGS="$CFLAGS"
+-CFLAGS="$CFLAGS $rb_cv_warnflags"
+-if test "${ac_c_werror_flag+set}"; then
+- rb_c_werror_flag="$ac_c_werror_flag"
+-else
+- unset rb_c_werror_flag
+-fi
+-ac_c_werror_flag=yes
+-
+- CFLAGS="$CFLAGS -fstack-protector"
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-
+-int
+-main ()
+-{
+-
+- ;
+- return 0;
+-}
+-_ACEOF
+-if ac_fn_c_try_compile "$LINENO"; then :
+- stack_protector=yes
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+-$as_echo "yes" >&6; }
+-else
+- stack_protector=no
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-
+-CFLAGS="$save_CFLAGS"
+-save_CFLAGS=
+-if test "${rb_c_werror_flag+set}"; then
+- ac_c_werror_flag="$rb_c_werror_flag"
+-else
+- unset ac_c_werror_flag
+-fi
+-
+- if test "x$stack_protector" = xyes; then
+-
+- save_LDFLAGS="$LDFLAGS"
+- LDFLAGS="$LDFLAGS -fstack-protector"
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fstack-protector is accepted as LDFLAGS" >&5
+-$as_echo_n "checking whether -fstack-protector is accepted as LDFLAGS... " >&6; }
+- save_CFLAGS="$CFLAGS"
+-CFLAGS="$CFLAGS $rb_cv_warnflags"
+-if test "${ac_c_werror_flag+set}"; then
+- rb_c_werror_flag="$ac_c_werror_flag"
+-else
+- unset rb_c_werror_flag
+-fi
+-ac_c_werror_flag=yes
+-
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+-/* end confdefs.h. */
+-
+-int
+-main ()
+-{
+-
+- ;
+- return 0;
+-}
+-_ACEOF
+-if ac_fn_c_try_link "$LINENO"; then :
+-
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+-$as_echo "yes" >&6; }
+-else
+- stack_protector=broken
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-rm -f core conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-
+-CFLAGS="$save_CFLAGS"
+-save_CFLAGS=
+-if test "${rb_c_werror_flag+set}"; then
+- ac_c_werror_flag="$rb_c_werror_flag"
+-else
+- unset ac_c_werror_flag
+-fi
+- LDFLAGS="$save_LDFLAGS"
+- save_LDFLAGS=
+-
+- fi
+- ;;
+-esac
+- if test "x$stack_protector" = xyes; then
+- # RUBY_APPEND_OPTION(XCFLAGS, -fstack-protector)
+- case " ${XCFLAGS-} " in #(
+- *' -fstack-protector '*) :
+- ;; #(
+- ' ') :
+- XCFLAGS="-fstack-protector" ;; #(
+- *) :
+- XCFLAGS="$XCFLAGS -fstack-protector" ;;
+-esac
+- # RUBY_APPEND_OPTION(XLDFLAGS, -fstack-protector)
+- case " ${XLDFLAGS-} " in #(
+- *' -fstack-protector '*) :
+- ;; #(
+- ' ') :
+- XLDFLAGS="-fstack-protector" ;; #(
+- *) :
+- XLDFLAGS="$XLDFLAGS -fstack-protector" ;;
+-esac
+- # RUBY_APPEND_OPTION(LDFLAGS, -fstack-protector)
+- case " ${LDFLAGS-} " in #(
+- *' -fstack-protector '*) :
+- ;; #(
+- ' ') :
+- LDFLAGS="-fstack-protector" ;; #(
+- *) :
+- LDFLAGS="$LDFLAGS -fstack-protector" ;;
+-esac
+- fi
+-
+ case "$target_os" in #(
+ mingw*) :
+
diff --git a/package/ruby/patches/patch-missing_isinf_c b/package/ruby/patches/patch-missing_isinf_c
new file mode 100644
index 000000000..6029850b9
--- /dev/null
+++ b/package/ruby/patches/patch-missing_isinf_c
@@ -0,0 +1,19 @@
+--- ruby-2.0.0-p247.orig/missing/isinf.c 2011-05-15 13:55:52.000000000 +0200
++++ ruby-2.0.0-p247/missing/isinf.c 2013-10-24 09:18:55.000000000 +0200
+@@ -5,6 +5,7 @@
+ #define _IEEE 1
+ #include <nan.h>
+
++
+ int
+ isinf(double n)
+ {
+@@ -52,6 +53,8 @@ static double zero(void) { return 0.0; }
+ static double one (void) { return 1.0; }
+ static double inf (void) { return one() / zero(); }
+
++#undef isinf
++
+ int
+ isinf(double n)
+ {
diff --git a/package/ruby/patches/patch-missing_isnan_c b/package/ruby/patches/patch-missing_isnan_c
new file mode 100644
index 000000000..f85fef4ec
--- /dev/null
+++ b/package/ruby/patches/patch-missing_isnan_c
@@ -0,0 +1,11 @@
+--- ruby-2.0.0-p247.orig/missing/isnan.c 2010-07-28 10:12:01.000000000 +0200
++++ ruby-2.0.0-p247/missing/isnan.c 2013-10-24 09:02:41.000000000 +0200
+@@ -4,6 +4,8 @@
+
+ static int double_ne(double n1, double n2);
+
++#undef isnan
++
+ int
+ isnan(double n)
+ {
diff --git a/package/sdl-image/Makefile b/package/sdl-image/Makefile
index b8968bd15..7aa1d1930 100644
--- a/package/sdl-image/Makefile
+++ b/package/sdl-image/Makefile
@@ -17,8 +17,6 @@ PKG_NEED_CXX:= 1
PKG_LIBNAME:= libsdl-image
PKG_OPTS:= dev
-PKG_ARCH_DEPENDS:= !m68k
-
DISTFILES:= SDL_image-${PKG_VERSION}.tar.gz
WRKDIST= ${WRKDIR}/SDL_image-${PKG_VERSION}
diff --git a/package/sdl/Makefile b/package/sdl/Makefile
index 08e47eaf5..bb20aad1d 100644
--- a/package/sdl/Makefile
+++ b/package/sdl/Makefile
@@ -16,8 +16,6 @@ PKG_SITES:= http://www.libsdl.org/release/
PKG_LIBNAME:= libsdl
PKG_OPTS:= dev
-PKG_ARCH_DEPENDS:= !m68k
-
PKG_FLAVOURS_LIBSDL:= WITH_TSLIB
PKGFD_WITH_TSLIB:= enable touchscreen support
PKGFS_WITH_TSLIB:= tslib
diff --git a/package/section.lst b/package/section.lst
index 6c501d5e3..b4aa58f3b 100644
--- a/package/section.lst
+++ b/package/section.lst
@@ -9,7 +9,6 @@ archive Compression and Archivers
crypto Cryptography
db Databases
debug Debugging / Analyzing
-devel Development / Headers
dns DNS / DHCP
dhcp DNS / DHCP
firewall Firewall / Routing / Bridging
@@ -46,3 +45,4 @@ x11/server X server
x11/libs X libraries
x11/misc X misc
x11/fonts X fonts
+devel Development (see GCC package)
diff --git a/package/sox/Makefile b/package/sox/Makefile
index d5aca61e7..2f5436146 100644
--- a/package/sox/Makefile
+++ b/package/sox/Makefile
@@ -14,8 +14,6 @@ PKG_DEPENDS:= zlib libmad liblame alsa-lib libid3tag
PKG_URL:= http://sox.sourceforge.net/
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=sox/}
-PKG_ARCH_DEPENDS:= !m68k
-
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,SOX,sox,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
diff --git a/package/tntnet/Makefile b/package/tntnet/Makefile
index dc6e8596f..a7237bbc1 100644
--- a/package/tntnet/Makefile
+++ b/package/tntnet/Makefile
@@ -15,7 +15,7 @@ PKG_URL:= http://www.tntnet.org/
PKG_SITES:= http://www.tntnet.org/download/
PKG_NEED_CXX:= 1
-PKG_ARCH_DEPENDS:= !arm !avr32
+PKG_ARCH_DEPENDS:= !arm !avr32 !m68k
PKG_CHOICES_TNTNET:= WITHOUT_SSL WITH_OPENSSL WITH_GNUTLS
PKGCD_WITHOUT_SSL:= use no SSL
diff --git a/package/vlc/Makefile b/package/vlc/Makefile
index d9fbbefa5..27d98e0fa 100644
--- a/package/vlc/Makefile
+++ b/package/vlc/Makefile
@@ -14,7 +14,7 @@ PKG_DEPENDS:= libffmpeg xcb-util libtheora libgcrypt
PKG_URL:= http://www.videolan.org/vlc/
PKG_SITES:= http://download.videolan.org/pub/videolan/vlc/$(PKG_VERSION)/
-PKG_ARCH_DEPENDS:= !cris !avr32
+PKG_ARCH_DEPENDS:= !cris !avr32 !m68k
DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz
diff --git a/package/xcb-proto/Makefile b/package/xcb-proto/Makefile
index 8a070c474..fd4674b47 100644
--- a/package/xcb-proto/Makefile
+++ b/package/xcb-proto/Makefile
@@ -4,13 +4,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= xcb-proto
-PKG_VERSION:= 1.6
+PKG_VERSION:= 1.8
PKG_RELEASE:= 1
PKG_DESCR:= XML-XCB protocol descriptions
PKG_SECTION:= devel
PKG_BUILDDEP:= python2
-PKG_MD5SUM:= 8d29695e8faf5fcdce568c66eaeaa5ee
-PKG_SITES:= ${MASTER_SITE_XORG}
+PKG_MD5SUM:= 8d2cdb770129cef563088a90c5bec768
+PKG_SITES:= http://xcb.freedesktop.org/dist/
PKG_OPTS:= dev devonly
PKG_SUBPKGS:= XCB_PROTO XCB_PYTHON
@@ -19,20 +19,21 @@ PKGSC_XCB_PYTHON:= x11/misc
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,XCB_PROTO,xcb-proto,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
-$(eval $(call PKG_template,XCB_PYTHON,xcb-python,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKGSC_XCB_PROTO}))
+$(eval $(call PKG_template,XCB_PYTHON,xcb-python,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKGSC_XCB_PYTHON}))
include $(TOPDIR)/mk/python.mk
CONFIGURE_ENV+= PYTHON=$(PYTHON)
+CONFIGURE_ARGS+= --datadir=${STAGING_DIR}/usr/share
-xcb-proto-install:
+post-build:
${INSTALL_DIR} ${STAGING_DIR}/usr/share/xcb
- $(INSTALL_DIR) ${STAGING_DIR}/usr/lib/python${PYTHON_VERSION}/site-packages/xcbgen
${CP} ${WRKBUILD}/src/*.xml ${STAGING_DIR}/usr/share/xcb
- ${CP} ${WRKINST}/usr/lib/python${PYTHON_VERSION}/site-packages/xcbgen/*.py \
- ${STAGING_DIR}/usr/lib/python${PYTHON_VERSION}/site-packages/xcbgen
xcb-python-install:
+ $(INSTALL_DIR) ${STAGING_DIR}/usr/lib/python${PYTHON_VERSION}/site-packages/xcbgen
+ ${CP} ${WRKINST}/usr/lib/python${PYTHON_VERSION}/site-packages/xcbgen/*.py \
+ ${STAGING_DIR}/usr/lib/python${PYTHON_VERSION}/site-packages/xcbgen
${INSTALL_DIR} ${IDIR_XCB_PYTHON}/usr/lib/python${PYTHON_VERSION}/site-packages/xcbgen
${CP} ${WRKINST}/usr/lib/python${PYTHON_VERSION}/site-packages/xcbgen/*.py \
${IDIR_XCB_PYTHON}/usr/lib/python${PYTHON_VERSION}/site-packages/xcbgen
diff --git a/package/xcb-proto/patches/patch-xcb-proto_pc_in b/package/xcb-proto/patches/patch-xcb-proto_pc_in
deleted file mode 100644
index b16750915..000000000
--- a/package/xcb-proto/patches/patch-xcb-proto_pc_in
+++ /dev/null
@@ -1,10 +0,0 @@
---- xcb-proto-1.6.orig/xcb-proto.pc.in 2008-08-27 10:12:22.000000000 +0200
-+++ xcb-proto-1.6/xcb-proto.pc.in 2011-01-24 16:11:29.000000000 +0100
-@@ -1,6 +1,6 @@
- prefix=@prefix@
- datarootdir=@datarootdir@
--datadir=@datadir@
-+datadir=${prefix}/../@datadir@
- xcbincludedir=@xcbincludedir@
- pythondir=@pythondir@
-
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index ff8c3d509..775f871c1 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -59,11 +59,15 @@ else
GCC_CONFOPTS+= --disable-lto
endif
+ifeq ($(ARCH),m68k)
+GCC_CONFOPTS+= --disable-tls
+else
ifeq ($(ARCH),cris)
GCC_CONFOPTS+= --disable-tls
else
GCC_CONFOPTS+= --enable-tls
endif
+endif
ifeq ($(ARCH),powerpc)
ifeq ($(ADK_TARGET_LIBC),musl)
diff --git a/tools/adk/pkgmaker.c b/tools/adk/pkgmaker.c
index 19bbbc0eb..ed29ae062 100644
--- a/tools/adk/pkgmaker.c
+++ b/tools/adk/pkgmaker.c
@@ -1003,6 +1003,28 @@ int main() {
fprintf(cfg, "\tprompt \"%s. development files for %s\"\n", pseudo_name, pkg_libname);
fprintf(cfg, "\ttristate\n");
+
+ /* create package target architecture dependency information */
+ if (pkg_arch_depends != NULL) {
+ pkg_helper = strdup(pkg_arch_depends);
+ token = strtok(pkg_helper, " ");
+ fprintf(cfg, "\tdepends on ");
+ sp = "";
+ while (token != NULL) {
+ if(strncmp(token, "!", 1) == 0) {
+ fprintf(cfg, "%s!ADK_LINUX%s", sp, toupperstr(token));
+ sp = " && ";
+ } else {
+ fprintf(cfg, "%sADK_LINUX_%s", sp, toupperstr(token));
+ sp = " || ";
+ }
+ token = strtok(NULL, " ");
+ }
+ fprintf(cfg, "\n");
+ free(pkg_helper);
+ pkg_helper = NULL;
+ }
+
fprintf(cfg, "\tdepends on ADK_PACKAGE_GCC\n");
fprintf(cfg, "\tselect ADK_PACKAGE_%s\n", toupperstr(pkg_libname));
fprintf(cfg, "\tdefault n\n");