summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/binutils/Makefile6
-rw-r--r--package/busybox/Makefile2
-rw-r--r--package/dropbear/Makefile1
-rw-r--r--package/dropbear/patches/patch-Makefile_in21
-rw-r--r--package/eglibc/Makefile62
-rw-r--r--package/glibc/Makefile51
-rw-r--r--package/libgcc/Makefile8
-rw-r--r--package/librt/Makefile4
-rw-r--r--package/libssp/Makefile47
-rw-r--r--package/m4/patches/patch-lib_config_hin14
-rw-r--r--package/m4/patches/patch-lib_stdio_in_h10
11 files changed, 169 insertions, 57 deletions
diff --git a/package/binutils/Makefile b/package/binutils/Makefile
index 9bd18ce93..43043514c 100644
--- a/package/binutils/Makefile
+++ b/package/binutils/Makefile
@@ -19,6 +19,12 @@ include ${TOPDIR}/mk/package.mk
$(eval $(call PKG_template,BINUTILS,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,LIBBFD,libbfd,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBBFD},${PKGSC_LIBBFD}))
+ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
+CONFIGURE_ARGS+= --enable-multilib
+else
+CONFIGURE_ARGS+= --disable-multilib
+endif
+
TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
TARGET_CFLAGS+= -fPIC
ifeq ($(ADK_NATIVE),)
diff --git a/package/busybox/Makefile b/package/busybox/Makefile
index 34b274d96..9fe1ef52a 100644
--- a/package/busybox/Makefile
+++ b/package/busybox/Makefile
@@ -9,7 +9,7 @@ PKG_RELEASE:= 1
PKG_MD5SUM:= e025414bc6cd79579cc7a32a45d3ae1c
PKG_DESCR:= Core utilities for embedded systems
PKG_SECTION:= base
-#PKG_BUILDDEP:= libtirpc
+PKG_BUILDDEP:= libtirpc
PKG_URL:= http://www.busybox.net/
PKG_SITES:= http://www.busybox.net/downloads/
diff --git a/package/dropbear/Makefile b/package/dropbear/Makefile
index 3728ef8da..31d9c68f8 100644
--- a/package/dropbear/Makefile
+++ b/package/dropbear/Makefile
@@ -24,6 +24,7 @@ include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,DROPBEAR,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
$(eval $(call PKG_template,DBCONVERT,dropbearconvert,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_DBCONVERT},${PKG_SECTION}))
+TARGET_LDFLAGS+= $(ADK_TARGET_ABI_CFLAGS)
BUILD_STYLE:= manual
INSTALL_STYLE:= manual
CONFIGURE_ARGS+= --disable-pam \
diff --git a/package/dropbear/patches/patch-Makefile_in b/package/dropbear/patches/patch-Makefile_in
index 0995ed95a..3e6783b64 100644
--- a/package/dropbear/patches/patch-Makefile_in
+++ b/package/dropbear/patches/patch-Makefile_in
@@ -1,5 +1,5 @@
--- dropbear-2012.55.orig/Makefile.in 2012-02-23 14:47:05.000000000 +0100
-+++ dropbear-2012.55/Makefile.in 2012-06-02 21:00:17.000000000 +0200
++++ dropbear-2012.55/Makefile.in 2012-10-05 17:24:16.000000000 +0200
@@ -56,7 +56,7 @@ HEADERS=options.h dbutil.h session.h pac
loginrec.h atomicio.h x11fwd.h agentfwd.h tcpfwd.h compat.h \
listener.h fake-rfc2553.h
@@ -21,7 +21,16 @@
LDFLAGS=@LDFLAGS@
EXEEXT=@EXEEXT@
-@@ -169,7 +168,7 @@ scp: $(SCPOBJS) $(HEADERS) Makefile
+@@ -159,7 +158,7 @@ dropbearkey: $(dropbearkeyobjs)
+ dropbearconvert: $(dropbearconvertobjs)
+
+ dropbear dbclient dropbearkey dropbearconvert: $(HEADERS) $(LIBTOM_DEPS) Makefile
+- $(CC) $(LDFLAGS) -o $@$(EXEEXT) $($@objs) $(LIBS)
++ $(CC) $(LDFLAGS) -static-libgcc -o $@$(EXEEXT) $($@objs) $(LIBS)
+
+ # scp doesn't use the libs so is special.
+ scp: $(SCPOBJS) $(HEADERS) Makefile
+@@ -169,14 +168,14 @@ scp: $(SCPOBJS) $(HEADERS) Makefile
# multi-binary compilation.
MULTIOBJS=
ifeq ($(MULTI),1)
@@ -30,3 +39,11 @@
CFLAGS+=$(addprefix -DDBMULTI_, $(PROGRAMS)) -DDROPBEAR_MULTI
endif
+ dropbearmulti: multilink
+
+ multibinary: $(HEADERS) $(MULTIOBJS) $(LIBTOM_DEPS) Makefile
+- $(CC) $(LDFLAGS) -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS)
++ $(CC) $(LDFLAGS) -static-libgcc -o dropbearmulti$(EXEEXT) $(MULTIOBJS) $(LIBS)
+
+ multilink: multibinary $(addprefix link, $(PROGRAMS))
+
diff --git a/package/eglibc/Makefile b/package/eglibc/Makefile
index 0ea35d935..fe30f490e 100644
--- a/package/eglibc/Makefile
+++ b/package/eglibc/Makefile
@@ -3,6 +3,7 @@
include $(TOPDIR)/rules.mk
include $(TOPDIR)/toolchain/eglibc/Makefile.inc
+include $(TOPDIR)/toolchain/eglibc/Makefile.multilib
PKG_DESCR:= embedded GNU C library
PKG_SECTION:= base
@@ -21,52 +22,32 @@ CONFIG_STYLE:= manual
BUILD_STYLE:= manual
INSTALL_STYLE:= manual
-EGLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
- --host=$(REAL_GNU_TARGET_NAME) \
- --with-headers=$(STAGING_TARGET_DIR)/usr/include \
- --disable-nls \
- --without-cvs \
- --disable-profile \
- --disable-debug \
- --enable-kernel=2.6.0 \
- --without-gd \
- --with-__thread \
- --with-tls \
- --enable-add-ons
-
-EGLIBC_ENV:= PATH='${TARGET_PATH}' \
- GCC_HONOUR_COPTS=s \
- BUILD_CC=${CC_FOR_BUILD} \
- CFLAGS="$(TARGET_CFLAGS)" \
- CC=${REAL_GNU_TARGET_NAME}-gcc \
- CXX=${REAL_GNU_TARGET_NAME}-g++ \
- AR=${REAL_GNU_TARGET_NAME}-ar \
- RANLIB=${REAL_GNU_TARGET_NAME}-ranlib \
- libc_cv_forced_unwind=yes \
- libc_cv_c_cleanup=yes \
- libc_cv_gnu99_inline=yes \
- libc_cv_slibdir="/lib"
-
# compile nothing, eglibc is already build in toolchain directory
do-install:
-ifeq ($(ADK_LOCALES),y)
- ${INSTALL_DIR} $(IDIR_EGLIBC)/usr/bin
- $(CP) $(STAGING_TARGET_DIR)/usr/bin/locale $(IDIR_EGLIBC)/usr/bin
-endif
- ${INSTALL_DIR} $(IDIR_EGLIBC)/$(ADK_TARGET_LIBC_PATH) $(IDIR_EGLIBC)/etc \
+ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
+ for abi in $(TABI); do \
+ ${INSTALL_DIR} $(IDIR_EGLIBC)/lib$${abi/*:/} $(IDIR_EGLIBC)/usr/lib$${abi/*:/} ; \
+ $(CP) $(STAGING_TARGET_DIR)/lib/ld* $(IDIR_EGLIBC)/lib$${abi/*:/} ; \
+ -for file in libc libcrypt libdl libm libresolv libutil libnsl libnss_dns libnss_files; do \
+ $(CP) $(STAGING_TARGET_DIR)-$${abi/*:/}/lib/$$file.so* $(IDIR_EGLIBC)/lib$${abi/*:/}; \
+ $(CP) $(STAGING_TARGET_DIR)-$${abi/*:/}/lib/$$file-$(PKG_VERSION).so $(IDIR_EGLIBC)/lib$${abi/*:/}; \
+ done ; \
+ done
+else
+ ${INSTALL_DIR} $(IDIR_EGLIBC)/$(ADK_TARGET_LIBC_PATH) \
$(IDIR_EGLIBC)/usr/lib $(IDIR_EGLIBC)/usr/bin
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
- $(CP) $(STAGING_TARGET_DIR)/lib/libssp.so* $(IDIR_EGLIBC)/$(ADK_TARGET_LIBC_PATH)
-endif
$(CP) $(STAGING_TARGET_DIR)/lib/ld* $(IDIR_EGLIBC)/$(ADK_TARGET_LIBC_PATH)
-for file in libc libcrypt libdl libm libresolv libutil libnsl libnss_dns libnss_files; do \
$(CP) $(STAGING_TARGET_DIR)/lib/$$file.so* $(IDIR_EGLIBC)/$(ADK_TARGET_LIBC_PATH); \
$(CP) $(STAGING_TARGET_DIR)/lib/$$file-$(PKG_VERSION).so $(IDIR_EGLIBC)/$(ADK_TARGET_LIBC_PATH); \
done
- ${INSTALL_DATA} ${STAGING_TARGET_DIR}/etc/gai.conf ${IDIR_EGLIBC}/etc
- ${INSTALL_DATA} ${STAGING_TARGET_DIR}/etc/nscd.conf ${IDIR_EGLIBC}/etc
- ${INSTALL_DATA} ${STAGING_TARGET_DIR}/etc/nsswitch.conf ${IDIR_EGLIBC}/etc
$(CP) $(STAGING_TARGET_DIR)/usr/bin/getconf $(IDIR_EGLIBC)/usr/bin
+ifeq ($(ADK_LOCALES),y)
+ $(CP) $(STAGING_TARGET_DIR)/usr/bin/locale $(IDIR_EGLIBC)/usr/bin
+endif
+endif
+ ${INSTALL_DIR} $(IDIR_EGLIBC)/etc
+ ${INSTALL_DATA} ${STAGING_TARGET_DIR}/etc/{gai,nscd,nsswitch}.conf ${IDIR_EGLIBC}/etc
eglibc-static-install:
${INSTALL_DIR} $(IDIR_EGLIBC_STATIC)/usr/lib
@@ -98,13 +79,14 @@ endif
(cd $(WRKBUILD); \
${EGLIBC_ENV} \
$(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/$(PKG_NAME)-$(PKG_VERSION)/libc/configure \
+ --host=$(REAL_GNU_TARGET_NAME) \
--prefix=$(IDIR_EGLIBC_DEV)/usr \
--with-headers=$(IDIR_EGLIBC_DEV)/usr/include \
${EGLIBC_CONFOPTS} \
);
- PATH='${TARGET_PATH}' $(MAKE) -C $(WRKBUILD) \
- install-headers install-bootstrap-headers=yes
- @touch $(IDIR_EGLIBC_DEV)/usr/include/gnu/stubs.h
+ PATH='${TARGET_PATH}' $(MAKE) -C $(WRKBUILD) install-headers install-bootstrap-headers=yes
+ touch $(IDIR_EGLIBC_DEV)/usr/include/gnu/stubs.h
+ touch $(IDIR_EGLIBC_DEV)/usr/include/gnu/stubs-{32,x32,64}.h
@find $(IDIR_EGLIBC_DEV) -name .install -exec rm {} \;
@find $(IDIR_EGLIBC_DEV) -name ..install.cmd -exec rm {} \;
# conflicts with libiconv
diff --git a/package/glibc/Makefile b/package/glibc/Makefile
index 9655288a6..355595ffa 100644
--- a/package/glibc/Makefile
+++ b/package/glibc/Makefile
@@ -3,16 +3,17 @@
include $(TOPDIR)/rules.mk
-TARGET_CFLAGS:= $(filter-out -fstack-protector,$(TARGET_CFLAGS))
-TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
+TARGET_CFLAGS:= $(filter-out -fstack-protector,$(TARGET_CFLAGS))
+TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
include $(TOPDIR)/toolchain/glibc/Makefile.inc
+include $(TOPDIR)/toolchain/glibc/Makefile.multilib
PKG_DESCR:= GNU C library
PKG_VER:= 2.16
PKG_SECTION:= base
PKG_OPTS:= noremove
-PKG_SUBPKGS:= GLIBC GLIBC_DEV
+PKG_SUBPKGS:= GLIBC GLIBC_DEV GLIBC_STATIC
NO_DISTFILES:= 1
@@ -20,9 +21,10 @@ include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,GLIBC,glibc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
$(eval $(call PKG_template,GLIBC_DEV,glibc-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+$(eval $(call PKG_template,GLIBC_STATIC,$(PKG_NAME)-static,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
-TARGET_CFLAGS:= $(filter-out -fstack-protector,$(TARGET_CFLAGS))
-TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
+#TARGET_CFLAGS:= $(filter-out -fstack-protector,$(TARGET_CFLAGS))
+#TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
XAKE_FLAGS+= GCC_HONOUR_COPTS=s
CONFIG_STYLE:= manual
@@ -31,24 +33,48 @@ INSTALL_STYLE:= manual
# compile nothing, glibc is already build in toolchain directory
do-install:
- ${INSTALL_DIR} ${IDIR_GLIBC}/$(ADK_TARGET_LIBC_PATH) ${IDIR_GLIBC}/etc
- ${CP} ${STAGING_TARGET_DIR}/etc/gai.conf ${IDIR_GLIBC}/etc
- ${CP} ${STAGING_TARGET_DIR}/etc/nscd.conf ${IDIR_GLIBC}/etc
- ${CP} ${STAGING_TARGET_DIR}/etc/nsswitch.conf ${IDIR_GLIBC}/etc
-ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
- $(CP) $(STAGING_TARGET_DIR)/lib/libssp.so* $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH)
-endif
+ifeq ($(ADK_TARGET_WITH_MULTILIB),y)
+ for abi in $(TABI); do \
+ ${INSTALL_DIR} $(IDIR_GLIBC)/lib$${abi/*:/} $(IDIR_GLIBC)/usr/lib$${abi/*:/} ; \
+ $(CP) $(STAGING_TARGET_DIR)/lib/ld* $(IDIR_GLIBC)/lib$${abi/*:/} ; \
+ -for file in libc libcrypt libdl libm libresolv libutil libnsl libnss_dns libnss_files; do \
+ $(CP) $(STAGING_TARGET_DIR)-$${abi/*:/}/lib/$$file.so* $(IDIR_GLIBC)/lib$${abi/*:/}; \
+ $(CP) $(STAGING_TARGET_DIR)-$${abi/*:/}/lib/$$file-$(PKG_VERSION).so $(IDIR_GLIBC)/lib$${abi/*:/}; \
+ done ; \
+ done
+else
+ ${INSTALL_DIR} ${IDIR_GLIBC}/$(ADK_TARGET_LIBC_PATH)
$(CP) $(STAGING_TARGET_DIR)/lib/ld*.so* $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH)
for file in libc libcrypt libdl libm libnsl libresolv libutil libnss_compat libnss_dns libnss_files; do \
$(CP) $(STAGING_TARGET_DIR)/lib/$$file.so* $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \
$(CP) $(STAGING_TARGET_DIR)/lib/$$file-$(PKG_VER).so $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \
done
+ $(CP) $(STAGING_TARGET_DIR)/usr/bin/getconf $(IDIR_GLIBC)/usr/bin
+ifeq ($(ADK_LOCALES),y)
+ $(CP) $(STAGING_TARGET_DIR)/usr/bin/locale $(IDIR_GLIBC)/usr/bin
+endif
+endif
+ ${INSTALL_DIR} ${IDIR_GLIBC}/etc
+ ${INSTALL_DATA} ${STAGING_TARGET_DIR}/etc/{gai,nscd,nsswitch}.conf ${IDIR_GLIBC}/etc
+
+glibc-static-install:
+ ${INSTALL_DIR} $(IDIR_GLIBC_STATIC)/usr/lib
+ $(CP) $(STAGING_TARGET_DIR)/usr/lib/libc.a $(IDIR_GLIBC_STATIC)/usr/lib
glibc-dev-install:
echo $(TARGET_CFLAGS)
${INSTALL_DIR} $(IDIR_GLIBC_DEV)/$(ADK_TARGET_LIBC_PATH) $(IDIR_GLIBC_DEV)/usr/lib
# install linker script
-cp ./files/libc.so.$(CPU_ARCH) $(IDIR_GLIBC_DEV)/usr/lib/libc.so
+ifeq ($(ADK_TARGET_ABI_O32),y)
+ $(SED) "s#@@ELFFORMAT@@#elf32-tradlittlemips#" $(IDIR_GLIBC_DEV)/usr/lib/libc.so
+endif
+ifeq ($(ADK_TARGET_ABI_N32),y)
+ $(SED) "s#@@ELFFORMAT@@#elf32-ntradlittlemips#" $(IDIR_GLIBC_DEV)/usr/lib/libc.so
+endif
+ifeq ($(ADK_TARGET_ABI_N64),y)
+ $(SED) "s#@@ELFFORMAT@@#elf64-tradlittlemips#" $(IDIR_GLIBC_DEV)/usr/lib/libc.so
+endif
${CP} ${STAGING_TARGET_DIR}/usr/lib/crt* ${IDIR_GLIBC_DEV}/usr/lib
${CP} ${STAGING_TARGET_DIR}/usr/lib/libc_nonshared.a ${IDIR_GLIBC_DEV}/usr/lib
-for file in libcrypt libdl libm libresolv libutil; do \
@@ -69,6 +95,7 @@ glibc-dev-install:
);
$(GLIBC_ENV) $(MAKE) -C $(WRKBUILD) cross-compiling=yes install-headers
touch $(IDIR_GLIBC_DEV)/usr/include/gnu/stubs.h
+ touch $(IDIR_GLIBC_DEV)/usr/include/gnu/stubs-{32,x32,64}.h
touch $(IDIR_GLIBC_DEV)/usr/include/bits/stdio_lim.h
# WORKAROUND: bits/syscall.h is only installed via install-others target
$(CP) $(STAGING_TARGET_DIR)/usr/include/bits/syscall.h \
diff --git a/package/libgcc/Makefile b/package/libgcc/Makefile
index bea6792e7..fbe82117f 100644
--- a/package/libgcc/Makefile
+++ b/package/libgcc/Makefile
@@ -26,5 +26,13 @@ ifeq ($(ADK_NATIVE),)
${INSTALL_DIR} ${IDIR_LIBGCC}/$(ADK_TARGET_LIBC_PATH)
${CP} ${STAGING_TARGET_DIR}/lib/libgcc*.so* ${IDIR_LIBGCC}/$(ADK_TARGET_LIBC_PATH)
endif
+ifeq ($(ADK_TARGET_MULTILIB_X86_32),y)
+ ${INSTALL_DIR} ${IDIR_LIBGCC}/lib32
+ ${CP} ${STAGING_TARGET_DIR_32}/lib/libgcc*.so* ${IDIR_LIBGCC}/lib32
+endif
+ifeq ($(ADK_TARGET_MULTILIB_X86_X32),y)
+ ${INSTALL_DIR} ${IDIR_LIBGCC}/libx32
+ ${CP} ${STAGING_TARGET_DIR_X32}/lib/libgcc*.so* ${IDIR_LIBGCC}/libx32
+endif
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/librt/Makefile b/package/librt/Makefile
index e3f9ee052..9695257f8 100644
--- a/package/librt/Makefile
+++ b/package/librt/Makefile
@@ -40,8 +40,8 @@ INSTALL_STYLE:= manual
librt-install:
ifeq ($(ADK_NATIVE),)
- ${INSTALL_DIR} ${IDIR_LIBR}/$(ADK_TARGET_LIBC_PATH)
- ${CP} ${STAGING_TARGET_DIR}/lib/librt*.so* ${IDIR_LIBR}/$(ADK_TARGET_LIBC_PATH)
+ ${INSTALL_DIR} ${IDIR_LIBRT}/$(ADK_TARGET_LIBC_PATH)
+ ${CP} ${STAGING_TARGET_DIR}/lib/librt*.so* ${IDIR_LIBRT}/$(ADK_TARGET_LIBC_PATH)
endif
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/libssp/Makefile b/package/libssp/Makefile
new file mode 100644
index 000000000..4f43bb425
--- /dev/null
+++ b/package/libssp/Makefile
@@ -0,0 +1,47 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include ${TOPDIR}/rules.mk
+
+ifeq ($(ADK_TARGET_LIB_GLIBC),y)
+include ${TOPDIR}/toolchain/glibc/Makefile.inc
+endif
+ifeq ($(ADK_TARGET_LIB_EGLIBC),y)
+include ${TOPDIR}/toolchain/eglibc/Makefile.inc
+endif
+ifeq ($(ADK_TARGET_LIB_UCLIBC),y)
+include ${TOPDIR}/toolchain/uClibc/Makefile.inc
+endif
+ifeq ($(ADK_NATIVE),y)
+PKG_VERSION:= 1.0
+PKG_RELEASE:= 1
+endif
+
+PKG_NAME:= libssp
+PKG_DESCR:= Stack smashing protection library
+PKG_SECTION:= libs
+PKG_OPTS:= noremove
+
+NO_DISTFILES:= 1
+
+PKG_SUBPKGS:= LIBSSP
+
+ifeq ($(ADK_STATIC),y)
+PKG_OPTS+= libonly
+endif
+
+include ${TOPDIR}/mk/package.mk
+
+$(eval $(call PKG_template,LIBSSP,libssp,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+
+CONFIG_STYLE:= manual
+BUILD_STYLE:= manual
+INSTALL_STYLE:= manual
+
+libssp-install:
+ifeq ($(ADK_NATIVE),)
+ ${INSTALL_DIR} ${IDIR_LIBSSP}/$(ADK_TARGET_LIBC_PATH)
+ ${CP} ${STAGING_TARGET_DIR}/lib/libssp.so* ${IDIR_LIBSSP}/$(ADK_TARGET_LIBC_PATH)
+endif
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/m4/patches/patch-lib_config_hin b/package/m4/patches/patch-lib_config_hin
new file mode 100644
index 000000000..08932ac77
--- /dev/null
+++ b/package/m4/patches/patch-lib_config_hin
@@ -0,0 +1,14 @@
+--- m4-1.4.16.orig/lib/config.hin 2011-03-01 17:57:39.000000000 +0100
++++ m4-1.4.16/lib/config.hin 2012-10-01 22:43:08.000000000 +0200
+@@ -1266,6 +1266,11 @@
+ # endif
+ #endif
+
++/* Enable large inode numbers on Mac OS X 10.5. */
++#ifndef _DARWIN_USE_64_BIT_INODE
++# define _DARWIN_USE_64_BIT_INODE 1
++#endif
++
+ /* Number of bits in a file offset, on hosts where this is settable. */
+ #undef _FILE_OFFSET_BITS
+
diff --git a/package/m4/patches/patch-lib_stdio_in_h b/package/m4/patches/patch-lib_stdio_in_h
new file mode 100644
index 000000000..3453282bc
--- /dev/null
+++ b/package/m4/patches/patch-lib_stdio_in_h
@@ -0,0 +1,10 @@
+--- m4-1.4.16.orig/lib/stdio.in.h 2011-03-01 17:39:29.000000000 +0100
++++ m4-1.4.16/lib/stdio.in.h 2012-10-02 09:26:29.000000000 +0200
+@@ -162,7 +162,6 @@ _GL_WARN_ON_USE (fflush, "fflush is not
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+ #undef gets
+-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@