summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO3
-rw-r--r--mk/build.mk2
-rw-r--r--package/Config.in7
-rw-r--r--package/Depends.mk2
-rw-r--r--package/Makefile4
-rw-r--r--package/base-files/extra/etc/profile2
-rw-r--r--package/busybox/config/Config.in28
-rw-r--r--package/dnsmasq/Makefile4
-rw-r--r--package/libtirpc/patches/patch-src_svc_c26
-rw-r--r--package/make/Config.in6
-rw-r--r--package/make/Makefile27
-rw-r--r--package/mksh/Makefile14
-rw-r--r--package/mksh/files/mksh.conffiles2
-rw-r--r--package/nspr/Config.in5
-rw-r--r--package/nspr/Makefile30
-rw-r--r--package/nss/Config.in5
-rw-r--r--package/nss/Makefile43
-rw-r--r--package/nss/patches/patch-mozilla_security_coreconf_Linux_mk15
-rw-r--r--package/nss/patches/patch-mozilla_security_coreconf_arch_mk11
-rw-r--r--package/nss/patches/patch-mozilla_security_coreconf_nsinstall_Makefile13
-rw-r--r--package/nss/patches/patch-mozilla_security_nss_cmd_shlibsign_sign_sh11
-rw-r--r--package/patch/Config.in6
-rw-r--r--package/patch/Makefile27
-rw-r--r--package/patch/patches/patch-Makefile_in18
-rw-r--r--package/rpm/Config.in11
-rw-r--r--package/rpm/Makefile37
-rw-r--r--package/rpm/patches/patch-config_guess207
-rw-r--r--package/rpm/patches/patch-config_sub180
-rw-r--r--package/rpm/patches/patch-configure11
-rw-r--r--package/rpm/patches/patch-rpmio_fts_c12
-rw-r--r--package/rpm/patches/patch-rpmio_rpmio_h12
-rw-r--r--package/rpm/patches/patch-rpmio_rpmsq_c132
-rw-r--r--package/uclibc/Makefile6
-rwxr-xr-xscripts/install.sh6
-rw-r--r--target/Config.in20
-rw-r--r--target/lemote/files/etc/inittab4
-rw-r--r--target/lemote/kernel.config71
-rw-r--r--target/lemote/uclibc.config9
-rw-r--r--target/wag54g/patches/ar7.patch11
-rw-r--r--target/wag54g/uclibc.config40
-rw-r--r--toolchain/binutils/Makefile2
-rw-r--r--toolchain/gcc/Makefile2
-rw-r--r--toolchain/gcc/patches/no-lib64.patch20
-rw-r--r--toolchain/uClibc/Makefile5
-rw-r--r--toolchain/uClibc/patches/always_inline.patch360
-rw-r--r--toolchain/uClibc/patches/extension-insteadof-inline.patch77
-rw-r--r--toolchain/uClibc/patches/nold64.patch17
-rw-r--r--toolchain/uClibc/patches/pagesize-fix.patch276
48 files changed, 1352 insertions, 487 deletions
diff --git a/TODO b/TODO
index 0c3a6f5a1..895f3c6a7 100644
--- a/TODO
+++ b/TODO
@@ -12,11 +12,8 @@
- netbsd build
- macos x build
- openbsd build
-- use kmod-template for external kernel modules
- optimize iptables package (libdirs depending on choosen kernel features)
- checksum for toolchain packages
- network scripts for wireless client / ap
- network scripts for pppoe
-- fix platform zaurus
-- test qemu etrax again
- publish via trac+git
diff --git a/mk/build.mk b/mk/build.mk
index 4cdc7b6c7..c74e16045 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -101,8 +101,10 @@ image:
switch:
echo "Saving configuration for device: ${DEVICE}"
cp .config .config.${DEVICE}
+ mv .cfg .cfg.${DEVICE}
if [ -f .config.${DEV} ];then cp .config.${DEV} .config; \
cp .config.${DEV} .config.old; \
+ mv .cfg.${DEV} .cfg; \
echo "Setting configuration to device: ${DEV}"; \
else echo "No old device config found";mv .config .config.bak;fi
diff --git a/package/Config.in b/package/Config.in
index 56e4a5f0c..96aeec3aa 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -12,6 +12,7 @@ source "package/cfgfs/Config.in"
source "package/uclibc/Config.in"
source "package/glibc/Config.in"
source "package/libc/Config.in"
+source "package/rpm/Config.in"
endmenu
menu "Bluetooth"
@@ -141,7 +142,8 @@ source "package/comgt/Config.in"
source "package/fbset/Config.in"
source "package/file/Config.in"
source "package/hdparm/Config.in"
-source "package/usbutils/Config.in" # lsusb
+source "package/usbutils/Config.in"
+source "package/patch/Config.in"
source "package/pciutils/Config.in"
source "package/procps/Config.in"
source "package/sispmctl/Config.in"
@@ -350,6 +352,7 @@ source "package/gcc/Config.in"
source "package/haserl/Config.in"
source "package/jamvm/Config.in"
source "package/lua/Config.in"
+source "package/make/Config.in"
source "package/microperl/Config.in"
source "package/php/Config.in"
source "package/ruby/Config.in"
@@ -397,6 +400,8 @@ source "package/libid3tag/Config.in"
source "package/jpeg/Config.in" # libjpeg
source "package/lame/Config.in.lib" # libltdl
source "package/mpfr/Config.in"
+source "package/nspr/Config.in"
+source "package/nss/Config.in"
source "package/libtool/Config.in" # libltdl
source "package/openldap/Config.in.lib"
source "package/liblzo/Config.in"
diff --git a/package/Depends.mk b/package/Depends.mk
index 25d58ab58..9a45f5823 100644
--- a/package/Depends.mk
+++ b/package/Depends.mk
@@ -182,6 +182,8 @@ raddump-compile: openssl-compile libpcap-compile
radiusclient-ng-compile: openssl-compile
rarpd-compile: libnet-compile
readline-compile: ncurses-compile
+nss-compile: nspr-compile zlib-compile
+rpm-compile: nss-compile libdb-compile
rrdcollect-compile: rrdtool-compile
rrdtool-compile: libxml2-compile cgilib-compile freetype-compile libart-compile libpng-compile
rsync-compile: popt-compile
diff --git a/package/Makefile b/package/Makefile
index ad82261bf..68d6cc5f5 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -223,6 +223,7 @@ package-$(ADK_COMPILE_LUA) += lua
package-$(ADK_COMPILE_LVM) += lvm
package-$(ADK_PACKAGE_MACCHANGER) += macchanger
package-$(ADK_PACKAGE_MADPLAY) += madplay
+package-$(ADK_PACKAGE_MAKE) += make
package-$(ADK_PACKAGE_MARADNS) += maradns
package-$(ADK_PACKAGE_MGETTY) += mgetty
package-$(ADK_PACKAGE_MC) += mc
@@ -258,6 +259,7 @@ package-$(ADK_PACKAGE_NFS_UTILS) += nfs-utils
package-$(ADK_PACKAGE_NFS_KERNEL_NFSD) += nfs-utils
package-$(ADK_PACKAGE_NMAP) += nmap
package-$(ADK_PACKAGE_NTPCLIENT) += ntpclient
+package-$(ADK_PACKAGE_NSS) += nss
package-$(ADK_PACKAGE_OBEXFTP) += obexftp
package-$(ADK_PACKAGE_OLSRD) += olsrd
package-$(ADK_COMPILE_OPENCDK) += opencdk
@@ -278,6 +280,7 @@ package-$(ADK_PACKAGE_OWFS) += owfs
package-$(ADK_PACKAGE_P910ND) += p910nd
package-$(ADK_PACKAGE_PALANTIR) += palantir
package-$(ADK_PACKAGE_PARPROUTED) += parprouted
+package-$(ADK_PACKAGE_PATCH) += patch
package-$(ADK_PACKAGE_PCIUTILS) += pciutils
package-$(ADK_COMPILE_PCRE) += pcre
package-$(ADK_COMPILE_PHP) += php
@@ -307,6 +310,7 @@ package-$(ADK_PACKAGE_REAIM) += reaim
package-$(ADK_PACKAGE_RENDERPROTO) += renderproto
package-$(ADK_PACKAGE_RESOURCEPROTO) += resourceproto
package-$(ADK_COMPILE_RP_PPPOE) += rp-pppoe
+package-$(ADK_PACKAGE_RPM) += rpm
package-$(ADK_PACKAGE_RRDCOLLECT) += rrdcollect
package-$(ADK_COMPILE_RRDTOOL) += rrdtool
package-$(ADK_PACKAGE_RUBY) += ruby
diff --git a/package/base-files/extra/etc/profile b/package/base-files/extra/etc/profile
index 55002b01f..798548a46 100644
--- a/package/base-files/extra/etc/profile
+++ b/package/base-files/extra/etc/profile
@@ -9,4 +9,4 @@ cat /etc/banner 2>&-
[ -x /usr/bin/less ] || alias less=more
[ -x /usr/bin/vim ] || alias vim=vi
[ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; }
-[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 /lib/ld.so "$@"; }
+[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 "$@"; }
diff --git a/package/busybox/config/Config.in b/package/busybox/config/Config.in
index b41788be0..0426f7288 100644
--- a/package/busybox/config/Config.in
+++ b/package/busybox/config/Config.in
@@ -273,20 +273,20 @@ endmenu
menu 'Build Options'
-#config BUSYBOX_STATIC
-# bool "Build BusyBox as a static binary (no shared libs)"
-# default n
-# help
-# If you want to build a static BusyBox binary, which does not
-# use or require any shared libraries, then enable this option.
-# This can cause BusyBox to be considerably larger, so you should
-# leave this option false unless you have a good reason (i.e.
-# your target platform does not support shared libraries, or
-# you are building an initrd which doesn't need anything but
-# BusyBox, etc).
-#
-# Most people will leave this set to 'N'.
-#
+config BUSYBOX_STATIC
+ bool "Build BusyBox as a static binary (no shared libs)"
+ default n
+ help
+ If you want to build a static BusyBox binary, which does not
+ use or require any shared libraries, then enable this option.
+ This can cause BusyBox to be considerably larger, so you should
+ leave this option false unless you have a good reason (i.e.
+ your target platform does not support shared libraries, or
+ you are building an initrd which doesn't need anything but
+ BusyBox, etc).
+
+ Most people will leave this set to 'N'.
+
#config BUSYBOX_PIE
# bool "Build BusyBox as a position independent executable"
# default n
diff --git a/package/dnsmasq/Makefile b/package/dnsmasq/Makefile
index 9d14a2726..0cfa55f25 100644
--- a/package/dnsmasq/Makefile
+++ b/package/dnsmasq/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= dnsmasq
-PKG_VERSION:= 2.47
+PKG_VERSION:= 2.49
PKG_RELEASE:= 1
-PKG_MD5SUM:= 4524081e56d0b935717d493e8e8d3e11
+PKG_MD5SUM:= 7ccc861d8a733474f9c0a0a127006ee9
PKG_DESCR:= A lightweight DNS and DHCP server
PKG_SECTION:= net
PKG_URL:= http://thekelleys.org.uk/dnsmasq
diff --git a/package/libtirpc/patches/patch-src_svc_c b/package/libtirpc/patches/patch-src_svc_c
new file mode 100644
index 000000000..48f84da1c
--- /dev/null
+++ b/package/libtirpc/patches/patch-src_svc_c
@@ -0,0 +1,26 @@
+--- libtirpc-0.2.0.orig/src/svc.c 2009-05-28 21:25:26.000000000 +0200
++++ libtirpc-0.2.0/src/svc.c 2009-06-27 10:18:05.491935140 +0200
+@@ -77,7 +77,9 @@ static struct svc_callout
+
+ extern rwlock_t svc_lock;
+ extern rwlock_t svc_fd_lock;
++#ifdef HAVE_RPCSEC_GSS
+ extern struct svc_auth_ops svc_auth_gss_ops;
++#endif
+
+ static struct svc_callout *svc_find (rpcprog_t, rpcvers_t,
+ struct svc_callout **, char *);
+@@ -715,11 +717,13 @@ svc_getreq_common (fd)
+ SVC_DESTROY (xprt);
+ break;
+ }
++#ifdef HAVE_RPCSEC_GSS
+ else if ((xprt->xp_auth != NULL) &&
+ (xprt->xp_auth->svc_ah_ops != &svc_auth_gss_ops))
+ {
+ xprt->xp_auth = NULL;
+ }
++#endif
+ }
+ while (stat == XPRT_MOREREQS);
+ }
diff --git a/package/make/Config.in b/package/make/Config.in
new file mode 100644
index 000000000..6fe261e4c
--- /dev/null
+++ b/package/make/Config.in
@@ -0,0 +1,6 @@
+config ADK_PACKAGE_MAKE
+ prompt "make.............................. GNU make"
+ tristate
+ default n
+ help
+ GNU make
diff --git a/package/make/Makefile b/package/make/Makefile
new file mode 100644
index 000000000..e8af2ed26
--- /dev/null
+++ b/package/make/Makefile
@@ -0,0 +1,27 @@
+# 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
+
+PKG_NAME:= make
+PKG_VERSION:= 3.81
+PKG_RELEASE:= 1
+PKG_MD5SUM:= a4e9494ac6dc3f6b0c5ff75c5d52abba
+PKG_DESCR:= GNU make
+PKG_SECTION:= misc
+PKG_URL:= http://www.gnu.org/software/make
+PKG_SITES:= ${MASTER_SITE_GNU:=make/}
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,MAKE,make,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_STYLE= gnu
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+
+post-install:
+ $(INSTALL_DIR) $(IDIR_MAKE)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/make $(IDIR_MAKE)/usr/bin
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/mksh/Makefile b/package/mksh/Makefile
index 5ef85559f..101fc91fc 100644
--- a/package/mksh/Makefile
+++ b/package/mksh/Makefile
@@ -4,10 +4,10 @@
include ${TOPDIR}/rules.mk
PKG_NAME= mksh
-PKG_VERSION= 38
+PKG_VERSION= 38c
PKG_RELEASE= 1
-PKG_MD5SUM= e2fa1f50690abf763cc3e4d8e1612728
-PKG_DESCR:= popular MirOS KSH
+PKG_MD5SUM= 692192a6468b5f5c5e559756f1851766
+PKG_DESCR:= MirBSD Korn Shell
PKG_SECTION:= shells
PKG_URL:= http://www.mirbsd.org
PKG_SITES= ${MASTER_SITE_MIRBSD:distfiles/=dist/mir/mksh/}
@@ -26,11 +26,11 @@ endif
do-build:
cd ${WRKBUILD} && CC='${TARGET_CC}' CFLAGS='${TCFLAGS}' \
CPPFLAGS='${TCPPFLAGS}' LDFLAGS='${TLDFLAGS}' \
- TARGET_OS=Linux ${BASH} ${WRKSRC}/Build.sh -Q -r
+ TARGET_OS=Linux ${BASH} ${WRKSRC}/Build.sh -Q -r -combine
do-install:
- install -d -m 0755 ${IDIR_MKSH}/bin
- install -c -m 755 ${WRKBUILD}/mksh ${IDIR_MKSH}/bin/
- install -c -m 644 ${WRKSRC}/dot.mkshrc ${IDIR_MKSH}/.mkshrc
+ ${INSTALL_DIR} ${IDIR_MKSH}/bin ${IDIR_MKSH}/root
+ ${INSTALL_BIN} ${WRKBUILD}/mksh ${IDIR_MKSH}/bin/
+ ${CP} ${WRKSRC}/dot.mkshrc ${IDIR_MKSH}/root/.mkshrc
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/mksh/files/mksh.conffiles b/package/mksh/files/mksh.conffiles
index f139f0b55..dec964050 100644
--- a/package/mksh/files/mksh.conffiles
+++ b/package/mksh/files/mksh.conffiles
@@ -1 +1 @@
-/.mkshrc
+/root/.mkshrc
diff --git a/package/nspr/Config.in b/package/nspr/Config.in
new file mode 100644
index 000000000..9cc1e9cbb
--- /dev/null
+++ b/package/nspr/Config.in
@@ -0,0 +1,5 @@
+config ADK_PACKAGE_NSPR
+ prompt "nspr.............................. Red Hat package manager"
+ tristate
+ default n
+ help
diff --git a/package/nspr/Makefile b/package/nspr/Makefile
new file mode 100644
index 000000000..aa6a168bd
--- /dev/null
+++ b/package/nspr/Makefile
@@ -0,0 +1,30 @@
+# 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
+
+PKG_NAME:= nspr
+PKG_VERSION:= 4.8
+PKG_RELEASE:= 1
+PKG_MD5SUM:= e0916a72bcc6c427551ea262183fdb26
+PKG_DESCR:= NSPR library
+PKG_SECTION:= libs
+PKG_URL:= http://www.mozilla.org/projects/nspr/
+PKG_SITES:= https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8/src/
+
+WRKSRC= ${WRKDIST}/mozilla/nsprpub
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,NSPR,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_ENV+= HOST_CC="${HOSTCC}" HOST_CFLAGS="${HOSTCFLAGS}"
+CONFIGURE_STYLE= gnu
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+
+post-install:
+ $(INSTALL_DIR) $(IDIR_NSPR)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/*.so* $(IDIR_NSPR)/usr/lib
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/nss/Config.in b/package/nss/Config.in
new file mode 100644
index 000000000..06c56929e
--- /dev/null
+++ b/package/nss/Config.in
@@ -0,0 +1,5 @@
+config ADK_PACKAGE_NSS
+ prompt "nss............................... NSS library"
+ tristate
+ default n
+ help
diff --git a/package/nss/Makefile b/package/nss/Makefile
new file mode 100644
index 000000000..a837cd8d9
--- /dev/null
+++ b/package/nss/Makefile
@@ -0,0 +1,43 @@
+# 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
+
+PKG_NAME:= nss
+PKG_VERSION:= 3.12.3
+PKG_RELEASE:= 1
+PKG_MD5SUM:= ecb7079ba4ebcf29b7716775384f1f18
+PKG_DESCR:= Network Security Services (NSS) library
+PKG_SECTION:= libs
+PKG_URL:= http://www.mozilla.org/projects/security/pki/nss/
+PKG_SITES:= ftp://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_3_RTM/src/
+
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
+WRKSRC= ${WRKDIST}/mozilla/security/nss
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,NSS,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+ifeq ($(ADK_LINUX_64),y)
+TCFLAGS+= -DUSE_64
+MAKE_FLAGS+= USE_64=1
+endif
+
+MAKE_FLAGS+= NATIVE_CC="${HOSTCC}" NATIVE_FLAGS="${HOSTCFLAGS}" NATIVE_LDFLAGS="${HOSTLDFLAGS}"
+TCPPFLAGS+= -I${STAGING_DIR}/usr/include/nspr
+TCFLAGS+= -I${STAGING_DIR}/usr/include/nspr
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+MAKE_FLAGS+= SOURCE_MD_DIR=${WRKDIST}/dist DIST=${WRKDIST}/dist NSS_DISABLE_DBM=1 OS_TEST=${ARCH} \
+ ARCHFLAG="${TCFLAGS} ${TCPPFLAGS}"
+ALL_TARGET:= build_coreconf all
+XAKE_FLAGS+= OS_TEST=${ARCH} NSS_DISABLE_DBM=1
+
+post-install:
+ $(INSTALL_DIR) $(IDIR_NSS)/usr/lib
+ ${INSTALL_DATA} ${WRKDIST}/dist/lib/*.so $(IDIR_NSS)/usr/lib
+ ${INSTALL_DIR} ${STAGING_DIR}/usr/include/nss
+ ${INSTALL_DATA} ${WRKDIST}/mozilla/dist/public/nss/* ${STAGING_DIR}/usr/include/nss
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/nss/patches/patch-mozilla_security_coreconf_Linux_mk b/package/nss/patches/patch-mozilla_security_coreconf_Linux_mk
new file mode 100644
index 000000000..cce23e2ee
--- /dev/null
+++ b/package/nss/patches/patch-mozilla_security_coreconf_Linux_mk
@@ -0,0 +1,15 @@
+--- nss-3.12.3.orig/mozilla/security/coreconf/Linux.mk 2008-09-06 01:17:23.000000000 +0200
++++ nss-3.12.3/mozilla/security/coreconf/Linux.mk 2009-06-24 19:11:27.470840369 +0200
+@@ -46,9 +46,9 @@ ifeq ($(USE_PTHREADS),1)
+ IMPL_STRATEGY = _PTH
+ endif
+
+-CC = gcc
+-CCC = g++
+-RANLIB = ranlib
++CC ?= gcc
++CCC ?= g++
++RANLIB ?= ranlib
+
+ DEFAULT_COMPILER = gcc
+
diff --git a/package/nss/patches/patch-mozilla_security_coreconf_arch_mk b/package/nss/patches/patch-mozilla_security_coreconf_arch_mk
new file mode 100644
index 000000000..1ebf69cc9
--- /dev/null
+++ b/package/nss/patches/patch-mozilla_security_coreconf_arch_mk
@@ -0,0 +1,11 @@
+--- nss-3.12.3.orig/mozilla/security/coreconf/arch.mk 2009-03-11 19:54:24.000000000 +0100
++++ nss-3.12.3/mozilla/security/coreconf/arch.mk 2009-06-24 21:46:32.910214640 +0200
+@@ -329,7 +329,7 @@ endif
+ # IMPL_STRATEGY may be defined too.
+ #
+
+-OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
++OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(LIBC_TAG).OBJ
+
+ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+ ifndef BUILD_OPT
diff --git a/package/nss/patches/patch-mozilla_security_coreconf_nsinstall_Makefile b/package/nss/patches/patch-mozilla_security_coreconf_nsinstall_Makefile
new file mode 100644
index 000000000..db87f018b
--- /dev/null
+++ b/package/nss/patches/patch-mozilla_security_coreconf_nsinstall_Makefile
@@ -0,0 +1,13 @@
+--- nss-3.12.3.orig/mozilla/security/coreconf/nsinstall/Makefile 2005-10-06 00:25:37.000000000 +0200
++++ nss-3.12.3/mozilla/security/coreconf/nsinstall/Makefile 2009-06-24 19:48:52.858310011 +0200
+@@ -65,6 +65,10 @@ ifdef NATIVE_FLAGS
+ OS_CFLAGS=$(NATIVE_FLAGS)
+ endif
+
++ifdef NATIVE_LDFLAGS
++LDFLAGS=$(NATIVE_LDFLAGS)
++endif
++
+ include $(DEPTH)/coreconf/rules.mk
+
+ # Redefine MAKE_OBJDIR for just this directory
diff --git a/package/nss/patches/patch-mozilla_security_nss_cmd_shlibsign_sign_sh b/package/nss/patches/patch-mozilla_security_nss_cmd_shlibsign_sign_sh
new file mode 100644
index 000000000..9c643dacf
--- /dev/null
+++ b/package/nss/patches/patch-mozilla_security_nss_cmd_shlibsign_sign_sh
@@ -0,0 +1,11 @@
+--- nss-3.12.3.orig/mozilla/security/nss/cmd/shlibsign/sign.sh 2006-01-18 21:56:28.000000000 +0100
++++ nss-3.12.3/mozilla/security/nss/cmd/shlibsign/sign.sh 2009-06-24 21:27:49.462838938 +0200
+@@ -53,6 +53,7 @@ OpenVMS)
+ ADDON_PATH=${1}/lib:${4}:$ADDON_PATH
+ export ADDON_PATH
+ echo ${2}/shlibsign -v -i ${5}
+- ${2}/shlibsign -v -i ${5}
++ #disable for cross-compile
++ #${2}/shlibsign -v -i ${5}
+ ;;
+ esac
diff --git a/package/patch/Config.in b/package/patch/Config.in
new file mode 100644
index 000000000..651abdde9
--- /dev/null
+++ b/package/patch/Config.in
@@ -0,0 +1,6 @@
+config ADK_PACKAGE_PATCH
+ prompt "patch............................. patch"
+ tristate
+ default n
+ help
+ patch
diff --git a/package/patch/Makefile b/package/patch/Makefile
new file mode 100644
index 000000000..80a608f0d
--- /dev/null
+++ b/package/patch/Makefile
@@ -0,0 +1,27 @@
+# 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
+
+PKG_NAME:= patch
+PKG_VERSION:= 2.5.9
+PKG_RELEASE:= 1
+PKG_MD5SUM:= dacfb618082f8d3a2194601193cf8716
+PKG_DESCR:= GNU patch
+PKG_SECTION:= misc
+PKG_URL:= http://www.gnu.org/software/patch
+PKG_SITES:= ${MASTER_SITE_GNU:=patch/}
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,PATCH,patch,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_STYLE= gnu
+BUILD_STYLE= auto
+INSTALL_STYLE= auto
+
+post-install:
+ $(INSTALL_DIR) $(IDIR_PATCH)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/patch $(IDIR_PATCH)/usr/bin
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/patch/patches/patch-Makefile_in b/package/patch/patches/patch-Makefile_in
new file mode 100644
index 000000000..eab39b6e8
--- /dev/null
+++ b/package/patch/patches/patch-Makefile_in
@@ -0,0 +1,18 @@
+--- patch-2.5.9.orig/Makefile.in 2003-05-20 18:15:48.000000000 +0200
++++ patch-2.5.9/Makefile.in 2009-06-13 22:52:33.487310060 +0200
+@@ -112,11 +112,11 @@ patch$(EXEEXT): $(OBJS)
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
+
+ install:: all installdirs
+- $(INSTALL_PROGRAM) patch$(EXEEXT) $(bindir)/$(patch_name)$(EXEEXT)
+- -$(INSTALL_DATA) $(srcdir)/patch.man $(man1dir)/$(patch_name)$(man1ext)
++ $(INSTALL_PROGRAM) patch$(EXEEXT) $(DESTDIR)/$(bindir)/$(patch_name)$(EXEEXT)
++ -$(INSTALL_DATA) $(srcdir)/patch.man $(DESTDIR)/$(man1dir)/$(patch_name)$(man1ext)
+
+-installdirs::
+- $(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(man1dir)
++installdirs:
++ $(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(man1dir)
+
+ install-strip::
+ $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
diff --git a/package/rpm/Config.in b/package/rpm/Config.in
new file mode 100644
index 000000000..c84884a08
--- /dev/null
+++ b/package/rpm/Config.in
@@ -0,0 +1,11 @@
+config ADK_PACKAGE_RPM
+ prompt "rpm............................... Red Hat package manager"
+ tristate
+ depends on ADK_CXX
+ select ADK_PACKAGE_NSS
+ select ADK_PACKAGE_NSPR
+ select ADK_PACKAGE_ZLIB
+ select ADK_PACKAGE_LIBDB
+ default n
+ help
+ Red Hat package manager
diff --git a/package/rpm/Makefile b/package/rpm/Makefile
new file mode 100644
index 000000000..c7cf91c97
--- /dev/null
+++ b/package/rpm/Makefile
@@ -0,0 +1,37 @@
+# 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
+
+PKG_NAME:= rpm
+PKG_VERSION:= 4.7.0
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 74791d638c571ec79f06227d453a6a03
+PKG_DESCR:= GNU rpm
+PKG_SECTION:= base
+PKG_URL:= http://www.rpm.org
+PKG_SITES:= http://rpm.org/releases/rpm-4.7.x/
+
+DISTFILES:= ${PKG_NAME}-$(PKG_VERSION).tar.bz2
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,RPM,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+TCPPFLAGS+= -I${STAGING_DIR}/usr/include/nspr \
+ -I${STAGING_DIR}/usr/include/nss
+CONFIGURE_STYLE:= gnu
+CONFIGURE_ARGS:= --with-external-db \
+ --without-lua
+BUILD_STYLE:= auto
+INSTALL_STYLE:= auto
+
+post-install:
+ $(INSTALL_DIR) $(IDIR_RPM)/usr/bin $(IDIR_RPM)/usr/lib
+ $(INSTALL_DIR) $(IDIR_RPM)/usr/lib/rpm
+ $(INSTALL_BIN) $(WRKINST)/bin/rpm $(IDIR_RPM)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/rpm* $(IDIR_RPM)/usr/bin
+ $(CP) $(WRKINST)/usr/lib/*.so* $(IDIR_RPM)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/rpm/* $(IDIR_RPM)/usr/lib/rpm
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/rpm/patches/patch-config_guess b/package/rpm/patches/patch-config_guess
new file mode 100644
index 000000000..b5ec8f21a
--- /dev/null
+++ b/package/rpm/patches/patch-config_guess
@@ -0,0 +1,207 @@
+--- rpm-4.7.0.orig/config.guess 2008-08-30 00:27:10.000000000 +0200
++++ rpm-4.7.0/config.guess 2009-06-11 17:31:39.670840385 +0200
+@@ -4,7 +4,7 @@
+ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ # Free Software Foundation, Inc.
+
+-timestamp='2008-01-23'
++timestamp='2008-09-28'
+
+ # This file is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by
+@@ -139,6 +139,23 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
+ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
++if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
++ eval $set_cc_for_build
++ cat << EOF > $dummy.c
++ #include <features.h>
++ #ifdef __UCLIBC__
++ # ifdef __UCLIBC_CONFIG_VERSION__
++ LIBC=uclibc __UCLIBC_CONFIG_VERSION__
++ # else
++ LIBC=uclibc
++ # endif
++ #else
++ LIBC=gnu
++ #endif
++EOF
++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
++fi
++
+ # Note: order is significant - the case branches are not exclusive.
+
+ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+@@ -796,7 +813,7 @@ EOF
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+- EM64T | authenticamd)
++ EM64T | authenticamd | genuineintel)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+@@ -840,31 +857,31 @@ EOF
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+- echo cris-axis-linux-gnu
++ echo cris-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+- echo crisv32-axis-linux-gnu
++ echo crisv32-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+- echo frv-unknown-linux-gnu
++ echo frv-unknown-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+@@ -887,7 +904,7 @@ EOF
+ s: ::g
+ p
+ }'`"
+- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+@@ -910,16 +927,16 @@ EOF
+ s: ::g
+ p
+ }'`"
+- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ or32:Linux:*:*)
+- echo or32-unknown-linux-gnu
++ echo or32-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+- echo powerpc-unknown-linux-gnu
++ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64:Linux:*:*)
+- echo powerpc64-unknown-linux-gnu
++ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+@@ -932,40 +949,43 @@ EOF
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ exit ;;
++ padre:Linux:*:*)
++ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+- PA7*) echo hppa1.1-unknown-linux-gnu ;;
+- PA8*) echo hppa2.0-unknown-linux-gnu ;;
+- *) echo hppa-unknown-linux-gnu ;;
++ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
++ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
++ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+- echo hppa64-unknown-linux-gnu
++ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+- echo ${UNAME_MACHINE}-dec-linux-gnu
++ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+- echo x86_64-unknown-linux-gnu
++ echo x86_64-unknown-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-gnu
++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+@@ -980,20 +1000,19 @@ EOF
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
++ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
+ ;;
+ a.out-i386-linux)
+- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+- exit ;;
+- coff-i386)
+- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
+ exit ;;
+ esac
++ # This should get integrated into the C code below, but now we hack
++ if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+@@ -1216,6 +1235,9 @@ EOF
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
++ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
++ echo i586-pc-haiku
++ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
diff --git a/package/rpm/patches/patch-config_sub b/package/rpm/patches/patch-config_sub
new file mode 100644
index 000000000..3b14117be
--- /dev/null
+++ b/package/rpm/patches/patch-config_sub
@@ -0,0 +1,180 @@
+--- rpm-4.7.0.orig/config.sub 2008-08-30 00:27:10.000000000 +0200
++++ rpm-4.7.0/config.sub 2009-06-11 17:31:39.670840385 +0200
+@@ -4,7 +4,7 @@
+ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ # Free Software Foundation, Inc.
+
+-timestamp='2008-01-16'
++timestamp='2008-09-08'
+
+ # This file is (in principle) common to ALL GNU software.
+ # The presence of a machine in this file suggests that SOME GNU software
+@@ -244,18 +244,20 @@ case $basic_machine in
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+- | d10v | d30v | dlx | dsp16xx \
++ | d10v | d30v | dlx | dsp16xx | dvp \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+- | maxq | mb | microblaze | mcore | mep \
++ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+- | mips64vr | mips64vrel \
++ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
++ | mips64r5900 | mips64r5900el \
++ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+@@ -277,7 +279,7 @@ case $basic_machine in
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | score \
+- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
++ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+@@ -286,7 +288,7 @@ case $basic_machine in
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+- | z8k)
++ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+@@ -331,12 +333,14 @@ case $basic_machine in
+ | ip2k-* | iq2000-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+- | m88110-* | m88k-* | maxq-* | mcore-* \
++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+- | mips64vr-* | mips64vrel-* \
++ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
++ | mips64r5900-* | mips64r5900el-* \
++ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+@@ -358,20 +362,20 @@ case $basic_machine in
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
++ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+- | z8k-*)
++ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+@@ -459,6 +463,10 @@ case $basic_machine in
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
++ cegcc)
++ basic_machine=arm-unknown
++ os=-cegcc
++ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+@@ -526,6 +534,10 @@ case $basic_machine in
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
++ dicos)
++ basic_machine=i686-pc
++ os=-dicos
++ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+@@ -714,6 +726,24 @@ case $basic_machine in
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
++ mipsEE* | ee | ps2)
++ basic_machine=mips64r5900el-scei
++ case $os in
++ -linux*)
++ ;;
++ *)
++ os=-elf
++ ;;
++ esac
++ ;;
++ iop)
++ basic_machine=mipsel-scei
++ os=-irx
++ ;;
++ dvp)
++ basic_machine=dvp-scei
++ os=-elf
++ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+@@ -1128,6 +1158,10 @@ case $basic_machine in
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
++ z80-*-coff)
++ basic_machine=z80-unknown
++ os=-sim
++ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+@@ -1248,7 +1282,7 @@ case $os in
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+- | -chorusos* | -chorusrdb* \
++ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+@@ -1258,7 +1292,7 @@ case $os in
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+@@ -1388,6 +1422,9 @@ case $os in
+ -zvmoe)
+ os=-zvmoe
+ ;;
++ -dicos*)
++ os=-dicos
++ ;;
+ -none)
+ ;;
+ *)
diff --git a/package/rpm/patches/patch-configure b/package/rpm/patches/patch-configure
new file mode 100644
index 000000000..7602cc370
--- /dev/null
+++ b/package/rpm/patches/patch-configure
@@ -0,0 +1,11 @@
+--- rpm-4.7.0.orig/configure 2009-04-16 10:10:33.000000000 +0200
++++ rpm-4.7.0/configure 2009-06-23 19:55:16.747272696 +0200
+@@ -21839,7 +21839,7 @@ if test "$GCC" = yes; then
+ CFLAGS="$CFLAGS -fPIC -DPIC -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wno-char-subscripts"
+ # XXX disabled for now due to noise from NSPR headers
+ # CFLAGS="$CFLAGS -Wstrict-prototypes"
+- cflags_to_try="-fno-strict-aliasing -fstack-protector"
++ cflags_to_try="-fno-strict-aliasing"
+ { $as_echo "$as_me:$LINENO: checking supported compiler flags" >&5
+ $as_echo_n "checking supported compiler flags... " >&6; }
+ old_cflags=$CFLAGS
diff --git a/package/rpm/patches/patch-rpmio_fts_c b/package/rpm/patches/patch-rpmio_fts_c
new file mode 100644
index 000000000..90bed89de
--- /dev/null
+++ b/package/rpm/patches/patch-rpmio_fts_c
@@ -0,0 +1,12 @@
+--- rpm-4.7.0.orig/rpmio/fts.c 2009-03-03 07:51:52.000000000 +0100
++++ rpm-4.7.0/rpmio/fts.c 2009-06-25 20:23:10.374967519 +0200
+@@ -64,6 +64,9 @@ static char sccsid[] = "@(#)fts.c 8.6 (B
+ #include "rpmio/fts.h"
+ #include <rpm/rpmio.h>
+ #include <rpm/rpmurl.h>
++#ifdef __UCLIBC__
++# define __fxstat64(_stat_ver, _fd, _sbp) fstat64((_fd), (_sbp))
++#endif
+ # define __set_errno(val) (*__errno_location ()) = (val)
+ # define __open open
+ # define __close close
diff --git a/package/rpm/patches/patch-rpmio_rpmio_h b/package/rpm/patches/patch-rpmio_rpmio_h
new file mode 100644
index 000000000..bb7c0b073
--- /dev/null
+++ b/package/rpm/patches/patch-rpmio_rpmio_h
@@ -0,0 +1,12 @@
+--- rpm-4.7.0.orig/rpmio/rpmio.h 2009-03-03 07:51:52.000000000 +0100
++++ rpm-4.7.0/rpmio/rpmio.h 2009-06-25 20:22:25.734966728 +0200
+@@ -26,7 +26,8 @@ extern "C" {
+ * typedefs to isolate the lossage.
+ */
+ #if defined(__GLIBC__) && \
+- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
++ (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && \
++ !defined(__UCLIBC__)
+ #define USE_COOKIE_SEEK_POINTER 1
+ typedef _IO_off64_t _libio_off_t;
+ typedef _libio_off_t * _libio_pos_t;
diff --git a/package/rpm/patches/patch-rpmio_rpmsq_c b/package/rpm/patches/patch-rpmio_rpmsq_c
new file mode 100644
index 000000000..779101b62
--- /dev/null
+++ b/package/rpm/patches/patch-rpmio_rpmsq_c
@@ -0,0 +1,132 @@
+--- rpm-4.7.0.orig/rpmio/rpmsq.c 2009-03-03 07:51:52.000000000 +0100
++++ rpm-4.7.0/rpmio/rpmsq.c 2009-06-25 20:15:31.954966249 +0200
+@@ -83,6 +83,7 @@ static rpmsq rpmsqQueue = &rpmsqRock;
+ */
+ static int rpmsqInsert(void * elem, void * prev)
+ {
++ sigset_t new_set, old_set;
+ rpmsq sq = (rpmsq) elem;
+ int ret = -1;
+
+@@ -91,7 +92,9 @@ static int rpmsqInsert(void * elem, void
+ if (_rpmsq_debug)
+ fprintf(stderr, " Insert(%p): %p\n", ME(), sq);
+ #endif
+- ret = sighold(SIGCHLD);
++ sigemptyset(&new_set);
++ sigaddset(&new_set, SIGCHLD);
++ ret = sigprocmask(SIG_BLOCK, &new_set, &old_set);
+ if (ret == 0) {
+ sq->child = 0;
+ sq->reaped = 0;
+@@ -102,7 +105,7 @@ fprintf(stderr, " Insert(%p): %p\n",
+ sq->id = ME();
+ ret = pthread_mutex_init(&sq->mutex, NULL);
+ insque(elem, (prev != NULL ? prev : rpmsqQueue));
+- ret = sigrelse(SIGCHLD);
++ ret = sigprocmask(SIG_SETMASK, &old_set, NULL);
+ }
+ }
+ return ret;
+@@ -115,6 +118,7 @@ fprintf(stderr, " Insert(%p): %p\n",
+ */
+ static int rpmsqRemove(void * elem)
+ {
++ sigset_t new_set, old_set;
+ rpmsq sq = (rpmsq) elem;
+ int ret = -1;
+
+@@ -124,7 +128,9 @@ static int rpmsqRemove(void * elem)
+ if (_rpmsq_debug)
+ fprintf(stderr, " Remove(%p): %p\n", ME(), sq);
+ #endif
+- ret = sighold (SIGCHLD);
++ sigemptyset(&new_set);
++ sigaddset(&new_set, SIGCHLD);
++ ret = sigprocmask(SIG_BLOCK, &new_set, &old_set);
+ if (ret == 0) {
+ remque(elem);
+
+@@ -142,7 +148,7 @@ fprintf(stderr, " Remove(%p): %p\n",
+ sq->reaped = 0;
+ sq->child = 0;
+ #endif
+- ret = sigrelse(SIGCHLD);
++ ret = sigprocmask(SIG_SETMASK, &old_set, NULL);
+ }
+ }
+ return ret;
+@@ -289,6 +295,7 @@ int rpmsqEnable(int signum, rpmsqAction_
+
+ pid_t rpmsqFork(rpmsq sq)
+ {
++ sigset_t new_set, old_set;
+ pid_t pid;
+ int xx;
+ int nothreads = 0; /* XXX: Shouldn't this be a global? */
+@@ -304,7 +311,9 @@ fprintf(stderr, " Enable(%p): %p\n",
+
+ xx = pipe(sq->pipes);
+
+- xx = sighold(SIGCHLD);
++ sigemptyset(&new_set);
++ sigaddset(&new_set, SIGCHLD);
++ xx = sigprocmask(SIG_BLOCK, &new_set, &old_set);
+
+ /*
+ * Initialize the cond var mutex. We have to aquire the lock we
+@@ -355,7 +364,7 @@ fprintf(stderr, " Parent(%p): %p chil
+ }
+
+ out:
+- xx = sigrelse(SIGCHLD);
++ xx = sigprocmask(SIG_SETMASK, &old_set, NULL);
+ return sq->child;
+ }
+
+@@ -367,12 +376,15 @@ out:
+ */
+ static int rpmsqWaitUnregister(rpmsq sq)
+ {
++ sigset_t new_set, old_set;
+ int nothreads = 0;
+ int ret = 0;
+ int xx;
+
+ /* Protect sq->reaped from handler changes. */
+- ret = sighold(SIGCHLD);
++ sigemptyset(&new_set);
++ sigaddset(&new_set, SIGCHLD);
++ ret = sigprocmask(SIG_BLOCK, &new_set, &old_set);
+
+ /* Start the child, linux often runs child before parent. */
+ if (sq->pipes[0] >= 0)
+@@ -388,9 +400,9 @@ static int rpmsqWaitUnregister(rpmsq sq)
+ while (ret == 0 && sq->reaped != sq->child) {
+ if (nothreads)
+ /* Note that sigpause re-enables SIGCHLD. */
+- ret = sigpause(SIGCHLD);
++ ret = sigsuspend(&new_set);
+ else {
+- xx = sigrelse(SIGCHLD);
++ xx = sigprocmask(SIG_SETMASK, &old_set, NULL);
+
+ /*
+ * We start before the fork with this mutex locked;
+@@ -398,14 +410,14 @@ static int rpmsqWaitUnregister(rpmsq sq)
+ * So if we get the lock the child has been reaped.
+ */
+ ret = pthread_mutex_lock(&sq->mutex);
+- xx = sighold(SIGCHLD);
++ xx = sigprocmask(SIG_BLOCK, &new_set, &old_set);
+ }
+ }
+
+ /* Accumulate stopwatch time spent waiting, potential performance gain. */
+ sq->ms_scriptlets += rpmswExit(&sq->op, -1)/1000;
+
+- xx = sigrelse(SIGCHLD);
++ xx = sigprocmask(SIG_SETMASK, &old_set, NULL);
+
+ #ifdef _RPMSQ_DEBUG
+ if (_rpmsq_debug)
diff --git a/package/uclibc/Makefile b/package/uclibc/Makefile
index 5fc4bab62..fc02f72f5 100644
--- a/package/uclibc/Makefile
+++ b/package/uclibc/Makefile
@@ -18,9 +18,7 @@ do-install:
${INSTALL_DIR} $(IDIR_UCLIBC)/lib $(IDIR_UCLIBC)/etc
# create timezone file
echo 'CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00' > $(IDIR_UCLIBC)/etc/TZ
-ifneq (${CPU_ARCH},x86_64)
$(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(IDIR_UCLIBC)/lib/
-endif
$(CP) $(STAGING_DIR)/lib/libc.so.* $(IDIR_UCLIBC)/lib/
$(CP) $(STAGING_DIR)/lib/libuClibc-$(PKG_VERSION).so $(IDIR_UCLIBC)/lib/
$(CP) $(STAGING_DIR)/lib/ld*-uClibc-$(PKG_VERSION).so $(IDIR_UCLIBC)/lib/
@@ -30,11 +28,7 @@ endif
$(CP) $(STAGING_DIR)/lib/$$file-$(PKG_VERSION).so $(IDIR_UCLIBC)/lib/; \
done
# create links for ldd / gcc
-ifneq (${CPU_ARCH},x86_64)
cd $(IDIR_UCLIBC)/lib && ln -sf ld-uClibc.so.0 ld.so
-else
- cd $(IDIR_UCLIBC)/lib && ln -sf ld64-uClibc.so.0 ld.so
-endif
cd $(IDIR_UCLIBC)/lib && ln -sf libc.so.0 libc.so
cd $(IDIR_UCLIBC)/lib && ln -sf libgcc_s.so.1 libgcc_s.so
diff --git a/scripts/install.sh b/scripts/install.sh
index 926c03b6b..5cb5e01f4 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -156,7 +156,9 @@ if [ $rb532 -ne 0 ];then
$parted -s $1 set 1 boot on
$sfdisk --change-id $1 1 27
$sfdisk --change-id $1 3 88
- dd if=$3 of=${1}1
+ sleep 2
+ sync
+ dd if=$3 of=${1}1 bs=2048
sync
else
rootpart=${1}1
@@ -206,7 +208,7 @@ printf "Fixing permissions\n"
chmod 1777 $tmp/tmp
chmod 4755 $tmp/bin/busybox
-if [ $rb532 -ne 0 ];then
+if [ $rb532 -eq 0 ];then
printf "Copying grub files\n"
mkdir $tmp/boot/grub
cp /boot/grub/stage1 $tmp/boot/grub
diff --git a/target/Config.in b/target/Config.in
index b4c6fb06b..b2c29d0d0 100644
--- a/target/Config.in
+++ b/target/Config.in
@@ -1,9 +1,16 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
+# mark broken devices
+config ADK_BROKEN
+ bool
+
config ADK_DEVICE_NO_FPU
bool
+config ADK_LINUX_64
+ bool
+
config ADK_NATIVE
tristate
@@ -83,10 +90,6 @@ config ADK_DEVICE
default "rescue-mips" if ADK_rescue_mips
default "rescue-mipsel" if ADK_rescue_mipsel
-config ADK_LINUX_MIPS64
- bool
- default n
-
menu "Target system"
choice
@@ -124,7 +127,8 @@ config ADK_LINUX_CRIS_FOXBOARD
config ADK_LINUX_MIPS64_LEMOTE
bool "Lemote Subnotebook Yeeloong"
select ADK_lemote
- select ADK_LINUX_MIPS64
+ select ADK_LINUX_64
+ select ADK_KERNEL_INPUT_KEYBOARD
select ADK_KERNEL_NETDEVICES
select ADK_KERNEL_NET_PCI
select ADK_KERNEL_NET_ETHERNET
@@ -176,6 +180,7 @@ depends on ADK_LINUX_RESCUE
config ADK_LINUX_X86_64_RESCUE
bool "x86_64"
select ADK_rescue_x86_64
+ select ADK_LINUX_64
help
X86 architecture.
@@ -226,20 +231,21 @@ config ADK_LINUX_MIPSEL_QEMU
config ADK_LINUX_MIPS64_QEMU
bool "mips64 (big endian)"
select ADK_qemu_mips64
- select ADK_LINUX_MIPS64
+ select ADK_LINUX_64
help
Qemu support for MIPS64 BE architecture.
config ADK_LINUX_MIPS64EL_QEMU
bool "mips64 (little endian)"
select ADK_qemu_mips64el
- select ADK_LINUX_MIPS64
+ select ADK_LINUX_64
help
Qemu support for MIPS64 LE architecture.
config ADK_LINUX_CRIS_QEMU
bool "cris"
select ADK_qemu_cris
+ select ADK_BROKEN
help
Qemu support for CRISv32 architecture.
diff --git a/target/lemote/files/etc/inittab b/target/lemote/files/etc/inittab
new file mode 100644
index 000000000..b6dd0bd3b
--- /dev/null
+++ b/target/lemote/files/etc/inittab
@@ -0,0 +1,4 @@
+::sysinit:/etc/init.d/rcS
+::shutdown:/etc/init.d/rcK
+tty::respawn:/sbin/getty -i -L tty 115200 vt100
+tty1::respawn:/sbin/getty -i -L tty1 115200 vt100
diff --git a/target/lemote/kernel.config b/target/lemote/kernel.config
index 67bb92a95..61afec593 100644
--- a/target/lemote/kernel.config
+++ b/target/lemote/kernel.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.30
-# Sun Jun 14 18:50:00 2009
+# Sun Jun 21 18:23:45 2009
#
CONFIG_MIPS=y
@@ -119,9 +119,9 @@ CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
#
# CONFIG_32BIT is not set
CONFIG_64BIT=y
-# CONFIG_PAGE_SIZE_4KB is not set
+CONFIG_PAGE_SIZE_4KB=y
# CONFIG_PAGE_SIZE_8KB is not set
-CONFIG_PAGE_SIZE_16KB=y
+# CONFIG_PAGE_SIZE_16KB is not set
# CONFIG_PAGE_SIZE_32KB is not set
# CONFIG_PAGE_SIZE_64KB is not set
CONFIG_BOARD_SCACHE=y
@@ -210,11 +210,7 @@ CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
# CONFIG_RELAY is not set
# CONFIG_NAMESPACES is not set
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_RD_GZIP=y
-# CONFIG_RD_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
+# CONFIG_BLK_DEV_INITRD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
@@ -274,7 +270,6 @@ CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory"
-# CONFIG_PROBE_INITRD_HEADER is not set
CONFIG_FREEZER=y
#
@@ -466,7 +461,7 @@ CONFIG_BLK_DEV_IDECD=m
CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_IDE_TASK_IOCTL=y
-CONFIG_IDE_PROC_FS=y
+# CONFIG_IDE_PROC_FS is not set
#
# IDE chipset support/bugfixes
@@ -701,27 +696,26 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KEYBOARD_SUNKBD=m
-CONFIG_KEYBOARD_LKKBD=m
-CONFIG_KEYBOARD_XTKBD=m
-CONFIG_KEYBOARD_NEWTON=m
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_PS2_ALPS=y
-CONFIG_MOUSE_PS2_LOGIPS2PP=y
-CONFIG_MOUSE_PS2_SYNAPTICS=y
-CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_ALPS is not set
+# CONFIG_MOUSE_PS2_LOGIPS2PP is not set
+# CONFIG_MOUSE_PS2_SYNAPTICS is not set
+# CONFIG_MOUSE_PS2_TRACKPOINT is not set
# CONFIG_MOUSE_PS2_ELANTECH is not set
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-CONFIG_MOUSE_SERIAL=m
+# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_BCM5974 is not set
-CONFIG_MOUSE_INPORT=m
-# CONFIG_MOUSE_ATIXL is not set
-CONFIG_MOUSE_LOGIBM=m
-CONFIG_MOUSE_PC110PAD=m
-CONFIG_MOUSE_VSXXXAA=m
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
@@ -733,7 +727,7 @@ CONFIG_MOUSE_VSXXXAA=m
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
-# CONFIG_SERIO_PCIPS2 is not set
+CONFIG_SERIO_PCIPS2=y
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_GAMEPORT is not set
@@ -902,11 +896,30 @@ CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_LOGO=y
-CONFIG_LOGO_LINUX_MONO=y
-CONFIG_LOGO_LINUX_VGA16=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y
# CONFIG_SOUND is not set
-# CONFIG_HID_SUPPORT is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+# CONFIG_USB_HID is not set
+# CONFIG_HID_PID is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+
+#
+# Special HID drivers
+#
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
@@ -1239,8 +1252,6 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
CONFIG_CRC32=y
# CONFIG_CRC7 is not set
# CONFIG_LIBCRC32C is not set
-CONFIG_ZLIB_INFLATE=y
-CONFIG_DECOMPRESS_GZIP=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
diff --git a/target/lemote/uclibc.config b/target/lemote/uclibc.config
index 782574a3e..9155c26a6 100644
--- a/target/lemote/uclibc.config
+++ b/target/lemote/uclibc.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Version: 0.9.30.1
-# Thu May 28 14:45:13 2009
+# Mon Jun 22 21:54:05 2009
#
# TARGET_alpha is not set
# TARGET_arm is not set
@@ -60,7 +60,7 @@ UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
UCLIBC_HAS_FENV=y
-KERNEL_HEADERS=""
+KERNEL_HEADERS="/home/wbx/openadk/toolchain_build_mips64el/libc_dev/usr/include"
HAVE_DOT_CONFIG=y
#
@@ -73,9 +73,8 @@ DOPIC=y
HAVE_SHARED=y
# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
LDSO_LDD_SUPPORT=y
-LDSO_CACHE_SUPPORT=y
+# LDSO_CACHE_SUPPORT is not set
# LDSO_PRELOAD_FILE_SUPPORT is not set
-LDSO_BASE_FILENAME="ld.so"
# UCLIBC_STATIC_LDCONFIG is not set
LDSO_RUNPATH=y
UCLIBC_CTOR_DTOR=y
@@ -228,6 +227,6 @@ DOSTRIP=y
# SUPPORT_LD_DEBUG_EARLY is not set
# UCLIBC_MALLOC_DEBUGGING is not set
WARNINGS="-Wall"
-EXTRA_WARNINGS=y
+# EXTRA_WARNINGS is not set
# DOMULTI is not set
# UCLIBC_MJN3_ONLY is not set
diff --git a/target/wag54g/patches/ar7.patch b/target/wag54g/patches/ar7.patch
index fe4b10802..ba2f6ade4 100644
--- a/target/wag54g/patches/ar7.patch
+++ b/target/wag54g/patches/ar7.patch
@@ -2334,17 +2334,6 @@ diff -Nur linux-2.6.30.orig/arch/mips/kernel/traps.c linux-2.6.30/arch/mips/kern
}
return (void *)old_handler;
}
-diff -Nur linux-2.6.30.orig/arch/mips/lib/delay.c linux-2.6.30/arch/mips/lib/delay.c
---- linux-2.6.30.orig/arch/mips/lib/delay.c 2009-06-10 05:05:27.000000000 +0200
-+++ linux-2.6.30/arch/mips/lib/delay.c 2009-06-11 21:10:53.309003369 +0200
-@@ -51,6 +51,6 @@
- {
- unsigned int lpj = current_cpu_data.udelay_val;
-
-- __delay((us * 0x00000005 * HZ * lpj) >> 32);
-+ __delay((ns * 0x00000005 * HZ * lpj) >> 32);
- }
- EXPORT_SYMBOL(__ndelay);
diff -Nur linux-2.6.30.orig/drivers/Kconfig linux-2.6.30/drivers/Kconfig
--- linux-2.6.30.orig/drivers/Kconfig 2009-06-10 05:05:27.000000000 +0200
+++ linux-2.6.30/drivers/Kconfig 2009-06-11 20:55:34.619476239 +0200
diff --git a/target/wag54g/uclibc.config b/target/wag54g/uclibc.config
index 223c3ddd9..cefe27a63 100644
--- a/target/wag54g/uclibc.config
+++ b/target/wag54g/uclibc.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Version: 0.9.30
-# Fri Jan 9 14:41:23 2009
+# Version: 0.9.30-svn
+# Sun Jun 14 15:49:39 2009
#
# TARGET_alpha is not set
# TARGET_arm is not set
@@ -35,23 +35,6 @@ TARGET_mips=y
TARGET_ARCH="mips"
FORCE_OPTIONS_FOR_ARCH=y
ARCH_CFLAGS="-mno-split-addresses"
-# CONFIG_GENERIC_386 is not set
-# CONFIG_386 is not set
-# CONFIG_486 is not set
-# CONFIG_586 is not set
-# CONFIG_586MMX is not set
-# CONFIG_686 is not set
-# CONFIG_PENTIUMII is not set
-# CONFIG_PENTIUMIII is not set
-# CONFIG_PENTIUM4 is not set
-# CONFIG_K6 is not set
-# CONFIG_K7 is not set
-# CONFIG_ELAN is not set
-# CONFIG_CRUSOE is not set
-# CONFIG_WINCHIPC6 is not set
-# CONFIG_WINCHIP2 is not set
-# CONFIG_CYRIXIII is not set
-# CONFIG_NEHEMIAH is not set
CONFIG_MIPS_O32_ABI=y
# CONFIG_MIPS_N32_ABI is not set
# CONFIG_MIPS_N64_ABI is not set
@@ -99,8 +82,10 @@ UCLIBC_CTOR_DTOR=y
# LDSO_GNU_HASH_SUPPORT is not set
# HAS_NO_THREADS is not set
UCLIBC_HAS_THREADS=y
-PTHREADS_DEBUG_SUPPORT=y
-LINUXTHREADS_OLD=y
+UCLIBC_HAS_TLS=y
+# PTHREADS_DEBUG_SUPPORT is not set
+# LINUXTHREADS_OLD is not set
+UCLIBC_HAS_THREADS_NATIVE=y
UCLIBC_HAS_SYSLOG=y
UCLIBC_HAS_LFS=y
# MALLOC is not set
@@ -109,8 +94,9 @@ MALLOC_STANDARD=y
MALLOC_GLIBC_COMPAT=y
UCLIBC_DYNAMIC_ATEXIT=y
COMPAT_ATEXIT=y
-# UCLIBC_SUSV3_LEGACY is not set
+UCLIBC_SUSV3_LEGACY=y
# UCLIBC_SUSV3_LEGACY_MACROS is not set
+# UCLIBC_SUSV4_LEGACY is not set
# UCLIBC_HAS_STUBS is not set
UCLIBC_HAS_SHADOW=y
UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
@@ -144,7 +130,7 @@ UCLIBC_HAS_BSD_ERR=y
# UCLIBC_NTP_LEGACY is not set
# UCLIBC_SV4_DEPRECATED is not set
UCLIBC_HAS_REALTIME=y
-# UCLIBC_HAS_ADVANCED_REALTIME is not set
+UCLIBC_HAS_ADVANCED_REALTIME=y
UCLIBC_HAS_EPOLL=y
UCLIBC_HAS_XATTR=y
# UCLIBC_HAS_PROFILING is not set
@@ -160,6 +146,8 @@ UCLIBC_HAS_REENTRANT_RPC=y
UCLIBC_USE_NETLINK=y
UCLIBC_SUPPORT_AI_ADDRCONFIG=y
UCLIBC_HAS_BSD_RES_CLOSE=y
+UCLIBC_HAS_COMPAT_RES_STATE=y
+# UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set
#
# String and Stdio Support
@@ -200,6 +188,7 @@ UCLIBC_HAS_ERRNO_MESSAGES=y
UCLIBC_HAS_SIGNUM_MESSAGES=y
# UCLIBC_HAS_SYS_SIGLIST is not set
UCLIBC_HAS_GNU_GETOPT=y
+# UCLIBC_HAS_STDIO_FUTEXES is not set
UCLIBC_HAS_GNU_GETSUBOPT=y
#
@@ -238,11 +227,10 @@ UCLIBC_BUILD_NOEXECSTACK=y
CROSS_COMPILER_PREFIX=""
UCLIBC_EXTRA_CFLAGS=""
# DODEBUG is not set
-# DODEBUG_PT is not set
DOSTRIP=y
# DOASSERTS is not set
-# SUPPORT_LD_DEBUG is not set
-# SUPPORT_LD_DEBUG_EARLY is not set
+SUPPORT_LD_DEBUG=y
+SUPPORT_LD_DEBUG_EARLY=y
# UCLIBC_MALLOC_DEBUGGING is not set
WARNINGS="-Wall"
EXTRA_WARNINGS=y
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 8cdf93580..057c6f232 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -12,7 +12,7 @@ else
CONFOPTS+= --disable-libssp
endif
-ifeq ($(ADK_LINUX_MIPS64_LEMOTE),y)
+ifeq ($(ADK_LINUX_64),y)
CONFOPTS+= --enable-64-bit-bfd
endif
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 41ea5b9d8..6148985c1 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -38,7 +38,7 @@ ifeq ($(ADK_DEVICE_NO_FPU),y)
GCC_CONFOPTS+= --with-float=soft
endif
-ifeq ($(ADK_LINUX_MIPS64),y)
+ifeq ($(ADK_LINUX_64),y)
GCC_CONFOPTS+= --with-abi=64
endif
diff --git a/toolchain/gcc/patches/no-lib64.patch b/toolchain/gcc/patches/no-lib64.patch
index a46e0aa67..880f5dbd8 100644
--- a/toolchain/gcc/patches/no-lib64.patch
+++ b/toolchain/gcc/patches/no-lib64.patch
@@ -1,6 +1,6 @@
diff -Nur gcc-4.4.0.orig/gcc/config/i386/linux64.h gcc-4.4.0/gcc/config/i386/linux64.h
--- gcc-4.4.0.orig/gcc/config/i386/linux64.h 2009-04-10 01:23:07.000000000 +0200
-+++ gcc-4.4.0/gcc/config/i386/linux64.h 2009-06-02 22:38:29.054028385 +0200
++++ gcc-4.4.0/gcc/config/i386/linux64.h 2009-06-19 15:43:10.419891589 +0200
@@ -59,7 +59,7 @@
done. */
@@ -12,7 +12,7 @@ diff -Nur gcc-4.4.0.orig/gcc/config/i386/linux64.h gcc-4.4.0/gcc/config/i386/lin
#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} \
diff -Nur gcc-4.4.0.orig/gcc/config/i386/t-linux64 gcc-4.4.0/gcc/config/i386/t-linux64
--- gcc-4.4.0.orig/gcc/config/i386/t-linux64 2008-07-02 17:59:19.000000000 +0200
-+++ gcc-4.4.0/gcc/config/i386/t-linux64 2009-06-02 22:40:00.800873792 +0200
++++ gcc-4.4.0/gcc/config/i386/t-linux64 2009-06-19 15:43:10.419891589 +0200
@@ -7,7 +7,7 @@
MULTILIB_OPTIONS = m64/m32
@@ -22,9 +22,21 @@ diff -Nur gcc-4.4.0.orig/gcc/config/i386/t-linux64 gcc-4.4.0/gcc/config/i386/t-l
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
+diff -Nur gcc-4.4.0.orig/gcc/config/linux.h gcc-4.4.0/gcc/config/linux.h
+--- gcc-4.4.0.orig/gcc/config/linux.h 2009-04-10 01:23:07.000000000 +0200
++++ gcc-4.4.0/gcc/config/linux.h 2009-06-19 15:42:51.508828335 +0200
+@@ -119,7 +119,7 @@
+ supporting both 32-bit and 64-bit compilation. */
+ #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+ #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld-uClibc.so.0"
+ #define LINUX_DYNAMIC_LINKER \
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
+ #define LINUX_DYNAMIC_LINKER32 \
diff -Nur gcc-4.4.0.orig/gcc/config/mips/linux64.h gcc-4.4.0/gcc/config/mips/linux64.h
--- gcc-4.4.0.orig/gcc/config/mips/linux64.h 2009-02-20 16:20:38.000000000 +0100
-+++ gcc-4.4.0/gcc/config/mips/linux64.h 2009-06-02 22:40:46.756972667 +0200
++++ gcc-4.4.0/gcc/config/mips/linux64.h 2009-06-19 15:43:10.419891589 +0200
@@ -36,7 +36,7 @@
%{profile:-lc_p} %{!profile:-lc}}"
@@ -36,7 +48,7 @@ diff -Nur gcc-4.4.0.orig/gcc/config/mips/linux64.h gcc-4.4.0/gcc/config/mips/lin
#define LINUX_DYNAMIC_LINKERN32 \
diff -Nur gcc-4.4.0.orig/gcc/config/mips/t-linux64 gcc-4.4.0/gcc/config/mips/t-linux64
--- gcc-4.4.0.orig/gcc/config/mips/t-linux64 2006-06-06 14:51:24.000000000 +0200
-+++ gcc-4.4.0/gcc/config/mips/t-linux64 2009-06-02 22:35:11.634464615 +0200
++++ gcc-4.4.0/gcc/config/mips/t-linux64 2009-06-19 15:43:10.419891589 +0200
@@ -1,6 +1,6 @@
MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
MULTILIB_DIRNAMES = n32 32 64
diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile
index 69b5d343a..e393eba5b 100644
--- a/toolchain/uClibc/Makefile
+++ b/toolchain/uClibc/Makefile
@@ -8,11 +8,6 @@ include ../rules.mk
include Makefile.inc
include ${TOPDIR}/mk/buildhlp.mk
-#workaround for mips and gcc 4.4, where -Os does not inline code in ld.so
-ifeq ($(ARCH),mips)
-TARGET_CFLAGS:=$(subst Os,O2,$(TARGET_CFLAGS))
-endif
-
$(WRKBUILD)/.headers:
$(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(WRKBUILD)/Rules.mak
sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${TOOLCHAIN_SYSROOT}/usr/include\"' \
diff --git a/toolchain/uClibc/patches/always_inline.patch b/toolchain/uClibc/patches/always_inline.patch
deleted file mode 100644
index 88b5209e9..000000000
--- a/toolchain/uClibc/patches/always_inline.patch
+++ /dev/null
@@ -1,360 +0,0 @@
-diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/arm/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/arm/dl-sysdep.h
---- uClibc-0.9.30.1.orig/ldso/ldso/arm/dl-sysdep.h 2008-09-25 10:35:20.000000000 +0200
-+++ uClibc-0.9.30.1/ldso/ldso/arm/dl-sysdep.h 2009-06-18 16:37:16.000000000 +0200
-@@ -15,7 +15,7 @@
- GOT_BASE[1] = (unsigned long) MODULE; \
- }
-
--static __inline__ unsigned long arm_modulus(unsigned long m, unsigned long p)
-+static __always_inline unsigned long arm_modulus(unsigned long m, unsigned long p)
- {
- unsigned long i,t,inc;
- i=p; t=0;
-@@ -72,7 +72,7 @@
- first element of the GOT. We used to use the PIC register to do this
- without a constant pool reference, but GCC 4.2 will use a pseudo-register
- for the PIC base, so it may not be in r10. */
--static __inline__ Elf32_Addr __attribute__ ((unused))
-+static __always_inline Elf32_Addr __attribute__ ((unused))
- elf_machine_dynamic (void)
- {
- Elf32_Addr dynamic;
-@@ -104,7 +104,7 @@
- }
-
- /* Return the run-time load address of the shared object. */
--static __inline__ Elf32_Addr __attribute__ ((unused))
-+static __always_inline Elf32_Addr __attribute__ ((unused))
- elf_machine_load_address (void)
- {
- extern void __dl_start __asm__ ("_dl_start");
-@@ -128,7 +128,7 @@
- return pcrel_addr - got_addr;
- }
-
--static __inline__ void
-+static __always_inline void
- elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
- Elf32_Word relative_count)
- {
-diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/bfin/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/bfin/dl-sysdep.h
---- uClibc-0.9.30.1.orig/ldso/ldso/bfin/dl-sysdep.h 2008-07-23 13:23:36.000000000 +0200
-+++ uClibc-0.9.30.1/ldso/ldso/bfin/dl-sysdep.h 2009-06-18 16:37:37.000000000 +0200
-@@ -213,7 +213,7 @@
- #endif
-
- #include <elf.h>
--static __inline__ void
-+static __always_inline void
- elf_machine_relative (DL_LOADADDR_TYPE load_off, const Elf32_Addr rel_addr,
- Elf32_Word relative_count)
- {
-diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/cris/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/cris/dl-sysdep.h
---- uClibc-0.9.30.1.orig/ldso/ldso/cris/dl-sysdep.h 2008-07-23 13:19:00.000000000 +0200
-+++ uClibc-0.9.30.1/ldso/ldso/cris/dl-sysdep.h 2009-06-18 16:37:42.000000000 +0200
-@@ -39,7 +39,7 @@
- || ((type) == R_CRIS_GLOB_DAT)) * ELF_RTYPE_CLASS_PLT) \
- | (((type) == R_CRIS_COPY) * ELF_RTYPE_CLASS_COPY))
-
--static __inline__ Elf32_Addr
-+static __always_inline Elf32_Addr
- elf_machine_dynamic(void)
- {
- /* Don't just set this to an asm variable "r0" since that's not logical
-@@ -61,7 +61,7 @@
- there's some other symbol we could use, that we don't *have* to force a
- GOT entry for. */
-
--static __inline__ Elf32_Addr
-+static __always_inline Elf32_Addr
- elf_machine_load_address(void)
- {
- Elf32_Addr gotaddr_diff;
-@@ -95,7 +95,7 @@
- return gotaddr_diff;
- }
-
--static __inline__ void
-+static __always_inline void
- elf_machine_relative(Elf32_Addr load_off, const Elf32_Addr rel_addr,
- Elf32_Word relative_count)
- {
-diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/i386/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/i386/dl-sysdep.h
---- uClibc-0.9.30.1.orig/ldso/ldso/i386/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
-+++ uClibc-0.9.30.1/ldso/ldso/i386/dl-sysdep.h 2009-06-18 16:37:53.000000000 +0200
-@@ -42,8 +42,8 @@
- /* Return the link-time address of _DYNAMIC. Conveniently, this is the
- first element of the GOT. This must be inlined in a function which
- uses global data. */
--static __inline__ Elf32_Addr elf_machine_dynamic (void) attribute_unused;
--static __inline__ Elf32_Addr
-+static __always_inline Elf32_Addr elf_machine_dynamic (void) attribute_unused;
-+static __always_inline Elf32_Addr
- elf_machine_dynamic (void)
- {
- register Elf32_Addr *got __asm__ ("%ebx");
-@@ -52,8 +52,8 @@
-
-
- /* Return the run-time load address of the shared object. */
--static __inline__ Elf32_Addr elf_machine_load_address (void) attribute_unused;
--static __inline__ Elf32_Addr
-+static __always_inline Elf32_Addr elf_machine_load_address (void) attribute_unused;
-+static __always_inline Elf32_Addr
- elf_machine_load_address (void)
- {
- /* It doesn't matter what variable this is, the reference never makes
-@@ -66,7 +66,7 @@
- return addr;
- }
-
--static __inline__ void
-+static __always_inline void
- elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
- Elf32_Word relative_count)
- {
-diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/m68k/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/m68k/dl-sysdep.h
---- uClibc-0.9.30.1.orig/ldso/ldso/m68k/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
-+++ uClibc-0.9.30.1/ldso/ldso/m68k/dl-sysdep.h 2009-06-18 16:37:58.000000000 +0200
-@@ -41,7 +41,7 @@
- /* Return the link-time address of _DYNAMIC. Conveniently, this is the
- first element of the GOT. This must be inlined in a function which
- uses global data. */
--static __inline__ Elf32_Addr
-+static __always_inline Elf32_Addr
- elf_machine_dynamic (void)
- {
- register Elf32_Addr *got __asm__ ("%a5");
-@@ -50,7 +50,7 @@
-
-
- /* Return the run-time load address of the shared object. */
--static __inline__ Elf32_Addr
-+static __always_inline Elf32_Addr
- elf_machine_load_address (void)
- {
- Elf32_Addr addr;
-@@ -60,7 +60,7 @@
- return addr;
- }
-
--static __inline__ void
-+static __always_inline void
- elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
- Elf32_Word relative_count)
- {
-diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/mips/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h
---- uClibc-0.9.30.1.orig/ldso/ldso/mips/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
-+++ uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h 2009-06-18 16:38:03.000000000 +0200
-@@ -163,7 +163,7 @@
-
- #define OFFSET_GP_GOT 0x7ff0
-
--static __inline__ ElfW(Addr) *
-+static __always_inline ElfW(Addr) *
- elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
- {
- /* FIXME: the offset of gp from GOT may be system-dependent. */
-@@ -173,7 +173,7 @@
- /* Return the link-time address of _DYNAMIC. Conveniently, this is the
- first element of the GOT. This must be inlined in a function which
- uses global data. We assume its $gp points to the primary GOT. */
--static __inline__ ElfW(Addr)
-+static __always_inline ElfW(Addr)
- elf_machine_dynamic (void)
- {
- register ElfW(Addr) gp __asm__ ("$28");
-@@ -192,7 +192,7 @@
- #endif
-
- /* Return the run-time load address of the shared object. */
--static __inline__ ElfW(Addr)
-+static __always_inline ElfW(Addr)
- elf_machine_load_address (void)
- {
- ElfW(Addr) addr;
-@@ -208,7 +208,7 @@
- return addr;
- }
-
--static __inline__ void
-+static __always_inline void
- elf_machine_relative (ElfW(Addr) load_off, const ElfW(Addr) rel_addr,
- ElfW(Word) relative_count)
- {
-diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/powerpc/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/powerpc/dl-sysdep.h
---- uClibc-0.9.30.1.orig/ldso/ldso/powerpc/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
-+++ uClibc-0.9.30.1/ldso/ldso/powerpc/dl-sysdep.h 2009-06-18 16:38:09.000000000 +0200
-@@ -90,7 +90,7 @@
- #define ELF_MACHINE_PLTREL_OVERLAP 1
-
- /* Return the value of the GOT pointer. */
--static __inline__ Elf32_Addr * __attribute__ ((const))
-+static __always_inline Elf32_Addr * __attribute__ ((const))
- ppc_got (void)
- {
- Elf32_Addr *got;
-@@ -109,14 +109,14 @@
-
- /* Return the link-time address of _DYNAMIC, stored as
- the first value in the GOT. */
--static __inline__ Elf32_Addr __attribute__ ((const))
-+static __always_inline Elf32_Addr __attribute__ ((const))
- elf_machine_dynamic (void)
- {
- return *ppc_got();
- }
-
- /* Return the run-time load address of the shared object. */
--static __inline__ Elf32_Addr __attribute__ ((const))
-+static __always_inline Elf32_Addr __attribute__ ((const))
- elf_machine_load_address (void)
- {
- Elf32_Addr *branchaddr;
-@@ -164,7 +164,7 @@
- return runtime_dynamic - elf_machine_dynamic ();
- }
-
--static __inline__ void
-+static __always_inline void
- elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
- Elf32_Word relative_count)
- {
-diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/sh/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/sh/dl-sysdep.h
---- uClibc-0.9.30.1.orig/ldso/ldso/sh/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
-+++ uClibc-0.9.30.1/ldso/ldso/sh/dl-sysdep.h 2009-06-18 16:38:18.000000000 +0200
-@@ -25,7 +25,7 @@
- struct elf_resolve;
- extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
-
--static __inline__ unsigned int
-+static __always_inline unsigned int
- _dl_urem(unsigned int n, unsigned int base)
- {
- int res;
-@@ -100,7 +100,7 @@
- /* Return the link-time address of _DYNAMIC. Conveniently, this is the
- first element of the GOT. This must be inlined in a function which
- uses global data. */
--static __inline__ Elf32_Addr __attribute__ ((unused))
-+static __always_inline Elf32_Addr __attribute__ ((unused))
- elf_machine_dynamic (void)
- {
- register Elf32_Addr *got;
-@@ -109,7 +109,7 @@
- }
-
- /* Return the run-time load address of the shared object. */
--static __inline__ Elf32_Addr __attribute__ ((unused))
-+static __always_inline Elf32_Addr __attribute__ ((unused))
- elf_machine_load_address (void)
- {
- Elf32_Addr addr;
-@@ -151,7 +151,7 @@
- } \
- }
-
--static __inline__ void
-+static __always_inline void
- elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
- Elf32_Word relative_count)
- {
-diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/sh64/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/sh64/dl-sysdep.h
---- uClibc-0.9.30.1.orig/ldso/ldso/sh64/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
-+++ uClibc-0.9.30.1/ldso/ldso/sh64/dl-sysdep.h 2009-06-18 16:38:14.000000000 +0200
-@@ -42,7 +42,7 @@
- /* Return the link-time address of _DYNAMIC. Conveniently, this is the
- first element of the GOT. This must be inlined in a function which
- uses global data. */
--static __inline__ Elf32_Addr elf_machine_dynamic(void)
-+static __always_inline Elf32_Addr elf_machine_dynamic(void)
- {
- register Elf32_Addr *got;
-
-@@ -70,7 +70,7 @@
- }
-
- /* Return the run-time load address of the shared object. */
--static __inline__ Elf32_Addr elf_machine_load_address(void)
-+static __always_inline Elf32_Addr elf_machine_load_address(void)
- {
- Elf32_Addr addr;
-
-@@ -123,7 +123,7 @@
- } \
- }
-
--static __inline__ void
-+static __always_inline void
- elf_machine_relative(Elf32_Addr load_off, const Elf32_Addr rel_addr,
- Elf32_Word relative_count)
- {
-diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/sparc/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/sparc/dl-sysdep.h
---- uClibc-0.9.30.1.orig/ldso/ldso/sparc/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
-+++ uClibc-0.9.30.1/ldso/ldso/sparc/dl-sysdep.h 2009-06-18 16:38:23.000000000 +0200
-@@ -49,7 +49,7 @@
-
- #ifndef COMPILE_ASM
- /* Cheap modulo implementation, taken from arm/ld_sysdep.h. */
--static __inline__ unsigned long
-+static __always_inline unsigned long
- sparc_mod(unsigned long m, unsigned long p)
- {
- unsigned long i, t, inc;
-@@ -127,7 +127,7 @@
- /* Return the link-time address of _DYNAMIC. Conveniently, this is the
- first element of the GOT. This must be inlined in a function which
- uses global data. */
--static __inline__ Elf32_Addr
-+static __always_inline Elf32_Addr
- elf_machine_dynamic (void)
- {
- register Elf32_Addr *got __asm__ ("%l7");
-@@ -138,7 +138,7 @@
- }
-
- /* Return the run-time load address of the shared object. */
--static __inline__ Elf32_Addr
-+static __always_inline Elf32_Addr
- elf_machine_load_address (void)
- {
- register Elf32_Addr *pc __asm__ ("%o7"), *got __asm__ ("%l7");
-@@ -157,7 +157,7 @@
- return (Elf32_Addr) got - *got + (pc[2] - pc[3]) * 4 - 4;
- }
-
--static __inline__ void
-+static __always_inline void
- elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
- Elf32_Word relative_count)
- {
-diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/xtensa/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/xtensa/dl-sysdep.h
---- uClibc-0.9.30.1.orig/ldso/ldso/xtensa/dl-sysdep.h 2008-07-23 13:19:00.000000000 +0200
-+++ uClibc-0.9.30.1/ldso/ldso/xtensa/dl-sysdep.h 2009-06-18 16:38:39.000000000 +0200
-@@ -87,7 +87,7 @@
- (((type) == R_XTENSA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)
-
- /* Return the link-time address of _DYNAMIC. */
--static __inline__ Elf32_Addr
-+static __always_inline Elf32_Addr
- elf_machine_dynamic (void)
- {
- /* This function is only used while bootstrapping the runtime linker.
-@@ -97,7 +97,7 @@
- }
-
- /* Return the run-time load address of the shared object. */
--static __inline__ Elf32_Addr
-+static __always_inline Elf32_Addr
- elf_machine_load_address (void)
- {
- Elf32_Addr addr, tmp;
-@@ -118,7 +118,7 @@
- return addr - 3;
- }
-
--static __inline__ void
-+static __always_inline void
- elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
- Elf32_Word relative_count)
- {
diff --git a/toolchain/uClibc/patches/extension-insteadof-inline.patch b/toolchain/uClibc/patches/extension-insteadof-inline.patch
new file mode 100644
index 000000000..bd3a720e9
--- /dev/null
+++ b/toolchain/uClibc/patches/extension-insteadof-inline.patch
@@ -0,0 +1,77 @@
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/mips/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/mips/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
++++ uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h 2009-06-21 19:08:44.487613137 +0200
+@@ -163,22 +163,25 @@
+
+ #define OFFSET_GP_GOT 0x7ff0
+
+-static __inline__ ElfW(Addr) *
+-elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
+-{
+- /* FIXME: the offset of gp from GOT may be system-dependent. */
+- return (ElfW(Addr) *) (gpreg - OFFSET_GP_GOT);
+-}
++#define elf_mips_got_from_gpreg(gpreg) __extension__({ \
++ ElfW(Addr) *elf_mips_got_from_gpreg_res; \
++ \
++ /* FIXME: the offset of gp from GOT may be system-dependent. */ \
++ elf_mips_got_from_gpreg_res = gpreg - OFFSET_GP_GOT; \
++ (elf_mips_got_from_gpreg_res); \
++})
+
+ /* Return the link-time address of _DYNAMIC. Conveniently, this is the
+ first element of the GOT. This must be inlined in a function which
+ uses global data. We assume its $gp points to the primary GOT. */
+-static __inline__ ElfW(Addr)
+-elf_machine_dynamic (void)
+-{
+- register ElfW(Addr) gp __asm__ ("$28");
+- return *elf_mips_got_from_gpreg (gp);
+-}
++#define elf_machine_dynamic() __extension__({ \
++ register ElfW(Addr) elf_machine_dynamic_gp __asm__("$28"); \
++ ElfW(Addr) elf_machine_dynamic_res; \
++ \
++ elf_machine_dynamic_res = *elf_mips_got_from_gpreg( \
++ elf_machine_dynamic_gp); \
++ (elf_machine_dynamic_res); \
++})
+
+ #define STRINGXP(X) __STRING(X)
+ #define STRINGXV(X) STRINGV_(X)
+@@ -192,21 +195,20 @@
+ #endif
+
+ /* Return the run-time load address of the shared object. */
+-static __inline__ ElfW(Addr)
+-elf_machine_load_address (void)
+-{
+- ElfW(Addr) addr;
+- __asm__ (" .set noreorder\n"
+- " " STRINGXP (PTR_LA) " %0, 0f\n"
+- " bltzal $0, 0f\n"
+- " nop\n"
+- "0: " STRINGXP (PTR_SUBU) " %0, $31, %0\n"
+- " .set reorder\n"
+- : "=r" (addr)
+- : /* No inputs */
+- : "$31");
+- return addr;
+-}
++#define elf_machine_load_address() __extension__({ \
++ ElfW(Addr) elf_machine_load_address_addr; \
++ \
++ __asm__ (" .set noreorder\n" \
++ " " STRINGXP (PTR_LA) " %0, 0f\n" \
++ " bltzal $0, 0f\n" \
++ " nop\n" \
++ "0: " STRINGXP (PTR_SUBU) " %0, $31, %0\n" \
++ " .set reorder\n" \
++ : "=r" (elf_machine_load_address_addr) \
++ : /* No inputs */ \
++ : "$31"); \
++ (elf_machine_load_address_addr); \
++})
+
+ static __inline__ void
+ elf_machine_relative (ElfW(Addr) load_off, const ElfW(Addr) rel_addr,
diff --git a/toolchain/uClibc/patches/nold64.patch b/toolchain/uClibc/patches/nold64.patch
new file mode 100644
index 000000000..237cb9f4d
--- /dev/null
+++ b/toolchain/uClibc/patches/nold64.patch
@@ -0,0 +1,17 @@
+diff -Nur uClibc-0.9.30.1.orig/Rules.mak uClibc-0.9.30.1/Rules.mak
+--- uClibc-0.9.30.1.orig/Rules.mak 2009-03-02 22:10:04.000000000 +0100
++++ uClibc-0.9.30.1/Rules.mak 2009-06-18 20:11:42.336906659 +0200
+@@ -97,12 +97,11 @@
+ LIBC := libc
+ SHARED_MAJORNAME := $(LIBC).so.$(MAJOR_VERSION)
+ ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),)
+-UCLIBC_LDSO_NAME := ld64-uClibc
+ ARCH_NATIVE_BIT := 64
+ else
+-UCLIBC_LDSO_NAME := ld-uClibc
+ ARCH_NATIVE_BIT := 32
+ endif
++UCLIBC_LDSO_NAME := ld-uClibc
+ UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(MAJOR_VERSION)
+ NONSHARED_LIBNAME := uclibc_nonshared.a
+ libc := $(top_builddir)lib/$(SHARED_MAJORNAME)
diff --git a/toolchain/uClibc/patches/pagesize-fix.patch b/toolchain/uClibc/patches/pagesize-fix.patch
new file mode 100644
index 000000000..789820638
--- /dev/null
+++ b/toolchain/uClibc/patches/pagesize-fix.patch
@@ -0,0 +1,276 @@
+diff -Nur uClibc-0.9.30.1.orig/ldso/include/ldso.h uClibc-0.9.30.1/ldso/include/ldso.h
+--- uClibc-0.9.30.1.orig/ldso/include/ldso.h 2008-05-30 16:35:31.000000000 +0200
++++ uClibc-0.9.30.1/ldso/include/ldso.h 2009-06-21 19:34:42.324963528 +0200
+@@ -39,6 +39,19 @@
+ #include <dl-elf.h>
+ #include <dl-hash.h>
+
++/* common align masks, if not specified by sysdep headers */
++#ifndef ADDR_ALIGN
++#define ADDR_ALIGN (_dl_pagesize - 1)
++#endif
++
++#ifndef PAGE_ALIGN
++#define PAGE_ALIGN (~ADDR_ALIGN)
++#endif
++
++#ifndef OFFS_ALIGN
++#define OFFS_ALIGN (PAGE_ALIGN & ~(1ul << (sizeof(_dl_pagesize) * 8 - 1)))
++#endif
++
+ /* For INIT/FINI dependency sorting. */
+ struct init_fini_list {
+ struct init_fini_list *next;
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/arm/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/arm/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/arm/dl-sysdep.h 2008-09-25 10:35:20.000000000 +0200
++++ uClibc-0.9.30.1/ldso/ldso/arm/dl-sysdep.h 2009-06-21 19:34:42.324963528 +0200
+@@ -55,11 +55,6 @@
+ struct elf_resolve;
+ unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
+
+-/* 4096 bytes alignment */
+-#define PAGE_ALIGN 0xfffff000
+-#define ADDR_ALIGN 0xfff
+-#define OFFS_ALIGN 0x7ffff000
+-
+ /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value.
+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/avr32/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/avr32/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/avr32/dl-sysdep.h 2008-11-03 16:54:24.000000000 +0100
++++ uClibc-0.9.30.1/ldso/ldso/avr32/dl-sysdep.h 2009-06-21 19:34:42.324963528 +0200
+@@ -46,11 +46,6 @@
+
+ unsigned long _dl_linux_resolver(unsigned long got_offset, unsigned long *got);
+
+-/* 4096 bytes alignment */
+-#define PAGE_ALIGN 0xfffff000
+-#define ADDR_ALIGN 0xfff
+-#define OFFS_ALIGN 0x7ffff000
+-
+ #define elf_machine_type_class(type) \
+ ((type == R_AVR32_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)
+
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/bfin/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/bfin/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/bfin/dl-sysdep.h 2008-07-23 13:23:36.000000000 +0200
++++ uClibc-0.9.30.1/ldso/ldso/bfin/dl-sysdep.h 2009-06-21 19:34:42.324963528 +0200
+@@ -67,12 +67,6 @@
+
+ extern int _dl_linux_resolve(void) __attribute__((__visibility__("hidden")));
+
+-/* 4KiB page alignment. Should perhaps be made dynamic using
+- getpagesize(), based on AT_PAGESZ from auxvt? */
+-#define PAGE_ALIGN 0xfffff000
+-#define ADDR_ALIGN 0xfff
+-#define OFFS_ALIGN 0x7ffff000
+-
+ struct funcdesc_ht;
+
+ #undef SEND_EARLY_STDERR
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/cris/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/cris/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/cris/dl-sysdep.h 2008-07-23 13:19:00.000000000 +0200
++++ uClibc-0.9.30.1/ldso/ldso/cris/dl-sysdep.h 2009-06-21 19:34:42.324963528 +0200
+@@ -18,11 +18,6 @@
+ struct elf_resolve;
+ extern unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry);
+
+-/* 8192 bytes alignment */
+-#define PAGE_ALIGN 0xffffe000
+-#define ADDR_ALIGN 0x1fff
+-#define OFFS_ALIGN 0xffffe000
+-
+ /* The union of reloc-type-classes where the reloc TYPE is a member.
+
+ TYPE is in the class ELF_RTYPE_CLASS_PLT if it can describe a
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/frv/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/frv/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/frv/dl-sysdep.h 2008-07-23 13:23:36.000000000 +0200
++++ uClibc-0.9.30.1/ldso/ldso/frv/dl-sysdep.h 2009-06-21 19:34:42.324963528 +0200
+@@ -51,12 +51,6 @@
+
+ extern int _dl_linux_resolve(void) __attribute__((__visibility__("hidden")));
+
+-/* 16KiB page alignment. Should perhaps be made dynamic using
+- getpagesize(), based on AT_PAGESZ from auxvt? */
+-#define PAGE_ALIGN 0xffffc000
+-#define ADDR_ALIGN 0x3fff
+-#define OFFS_ALIGN 0x7fffc000
+-
+ struct funcdesc_ht;
+
+ /* We must force strings used early in the bootstrap into the data
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/i386/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/i386/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/i386/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
++++ uClibc-0.9.30.1/ldso/ldso/i386/dl-sysdep.h 2009-06-21 19:34:42.328963480 +0200
+@@ -25,11 +25,6 @@
+ struct elf_resolve;
+ extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
+
+-/* 4096 bytes alignment */
+-#define PAGE_ALIGN 0xfffff000
+-#define ADDR_ALIGN 0xfff
+-#define OFFS_ALIGN 0x7ffff000
+-
+ /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
+ TLS variable, so undefined references should not be allowed to
+ define the value.
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/m68k/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/m68k/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/m68k/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
++++ uClibc-0.9.30.1/ldso/ldso/m68k/dl-sysdep.h 2009-06-21 19:34:42.328963480 +0200
+@@ -25,11 +25,6 @@
+ struct elf_resolve;
+ extern unsigned long _dl_linux_resolver (struct elf_resolve *, int);
+
+-/* 4096 bytes alignment */
+-#define PAGE_ALIGN 0xfffff000
+-#define ADDR_ALIGN 0xfff
+-#define OFFS_ALIGN 0x7ffff000
+-
+ /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value.
+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/mips/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/mips/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
++++ uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h 2009-06-22 20:51:04.324542339 +0200
+@@ -148,14 +148,9 @@
+
+ /* 4096 bytes alignment */
+ #if _MIPS_SIM == _MIPS_SIM_ABI64
+-#define PAGE_ALIGN (~0xfffUL)
+-#define ADDR_ALIGN 0xfffUL
+-#define OFFS_ALIGN (0x10000000000UL-0x1000)
+-#else /* O32 || N32 */
+-#define PAGE_ALIGN 0xfffff000
+-#define ADDR_ALIGN 0xfff
+-#define OFFS_ALIGN 0x7ffff000
+-#endif /* O32 || N32 */
++#define OFFS_ALIGN (0x10000000000UL-_dl_pagesize)
++#endif
++/* O32 || N32 */
+
+ #define elf_machine_type_class(type) ELF_RTYPE_CLASS_PLT
+ /* MIPS does not have COPY relocs */
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/powerpc/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/powerpc/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/powerpc/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
++++ uClibc-0.9.30.1/ldso/ldso/powerpc/dl-sysdep.h 2009-06-21 19:34:42.328963480 +0200
+@@ -67,11 +67,6 @@
+ extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
+ void _dl_init_got(unsigned long *lpnt,struct elf_resolve *tpnt);
+
+-/* 4096 bytes alignment */
+-#define PAGE_ALIGN 0xfffff000
+-#define ADDR_ALIGN 0xfff
+-#define OFFS_ALIGN 0x7ffff000
+-
+ /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value.
+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/sh/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/sh/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/sh/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
++++ uClibc-0.9.30.1/ldso/ldso/sh/dl-sysdep.h 2009-06-21 19:34:42.328963480 +0200
+@@ -83,11 +83,6 @@
+
+ #define do_rem(result, n, base) ((result) = _dl_urem((n), (base)))
+
+-/* 4096 bytes alignment */
+-#define PAGE_ALIGN 0xfffff000
+-#define ADDR_ALIGN 0xfff
+-#define OFFS_ALIGN 0x7ffff000
+-
+ /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
+ TLS variable, so undefined references should not be allowed to
+ define the value.
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/sh64/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/sh64/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/sh64/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
++++ uClibc-0.9.30.1/ldso/ldso/sh64/dl-sysdep.h 2009-06-21 19:34:42.328963480 +0200
+@@ -25,11 +25,6 @@
+ struct elf_resolve;
+ extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
+
+-/* 4096 bytes alignment */
+-#define PAGE_ALIGN 0xfffff000
+-#define ADDR_ALIGN 0xfff
+-#define OFFS_ALIGN 0x7ffff000
+-
+ /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
+ TLS variable, so undefined references should not be allowed to
+ define the value.
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/sparc/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/sparc/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/sparc/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
++++ uClibc-0.9.30.1/ldso/ldso/sparc/dl-sysdep.h 2009-06-21 19:34:42.332963990 +0200
+@@ -89,18 +89,6 @@
+ #define do_rem(result, n, base) ((result) = sparc_mod(n, base))
+ #endif
+
+-/* 4096 bytes alignment */
+-#if defined(__sparc_v9__)
+-/* ...but 8192 is required for mmap() on sparc64 kernel */
+-#define PAGE_ALIGN 0xffffe000
+-#define ADDR_ALIGN 0x1fff
+-#define OFFS_ALIGN 0x7fffe000
+-#elif defined(__sparc_v8__)
+-#define PAGE_ALIGN 0xfffff000
+-#define ADDR_ALIGN 0xfff
+-#define OFFS_ALIGN 0x7ffff000
+-#endif
+-
+ /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+ PLT entries should not be allowed to define the value.
+ ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/x86_64/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/x86_64/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/x86_64/dl-sysdep.h 2006-03-08 04:58:13.000000000 +0100
++++ uClibc-0.9.30.1/ldso/ldso/x86_64/dl-sysdep.h 2009-06-21 19:34:42.332963990 +0200
+@@ -41,11 +41,6 @@
+ struct elf_resolve;
+ extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
+
+-/* 4096 bytes alignment */
+-#define PAGE_ALIGN 0xfffff000
+-#define ADDR_ALIGN 0xfff
+-#define OFFS_ALIGN 0x7ffff000
+-
+ /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
+ TLS variable, so undefined references should not be allowed to
+ define the value.
+diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/xtensa/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/xtensa/dl-sysdep.h
+--- uClibc-0.9.30.1.orig/ldso/ldso/xtensa/dl-sysdep.h 2008-07-23 13:19:00.000000000 +0200
++++ uClibc-0.9.30.1/ldso/ldso/xtensa/dl-sysdep.h 2009-06-21 19:34:42.332963990 +0200
+@@ -76,11 +76,6 @@
+ struct elf_resolve;
+ extern unsigned long _dl_linux_resolver (struct elf_resolve *, int);
+
+-/* 4096 bytes alignment */
+-#define PAGE_ALIGN 0xfffff000
+-#define ADDR_ALIGN 0xfff
+-#define OFFS_ALIGN 0x7ffff000
+-
+ /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
+ undefined references should not be allowed to define the value. */
+ #define elf_machine_type_class(type) \
+diff -Nur uClibc-0.9.30.1.orig/libc/sysdeps/linux/mips/bits/uClibc_page.h uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/uClibc_page.h
+--- uClibc-0.9.30.1.orig/libc/sysdeps/linux/mips/bits/uClibc_page.h 2004-08-14 01:39:45.000000000 +0200
++++ uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/uClibc_page.h 2009-06-22 21:04:53.505363149 +0200
+@@ -20,15 +20,17 @@
+ #ifndef _UCLIBC_PAGE_H
+ #define _UCLIBC_PAGE_H
+
+-/* PAGE_SIZE of mips is sortof wierd, and depends on how the kernel
+- * happens to have been configured. It might use 4KB, 16K or 64K
+- * pages. To avoid using the current kernel configuration settings,
+- * uClibc will simply use 4KB on mips and call it good. */
+-#if 0
+-#define PAGE_SHIFT 16
++/* This approach sucks, one should really use sysconf(_SC_PAGESIZE)
++ * instead. The current mips64 kernel only seems to boot with a 16K
++ * page size on a Loongson 2f notebook, so we hardcode it to 16K on
++ * MIPS64 (matching the kernel developer's default) and 4K otherwise.
++ */
++#ifdef __mips64
+ #define PAGE_SHIFT 14
+-#endif
++#else
+ #define PAGE_SHIFT 12
++#endif
++
+ #define PAGE_SIZE (1UL << PAGE_SHIFT)
+ #define PAGE_MASK (~(PAGE_SIZE-1))
+