summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-05-26 04:02:55 +0000
committerMike Frysinger <vapier@gentoo.org>2004-05-26 04:02:55 +0000
commit6d2f68a0f54e6b787b38b46efc4b1608a33efc8d (patch)
tree9d3e5f8e9dab49d23137501cb74899a6cc7c729f /dev-libs/uclibc
parentFix bug 52008 by bumping mutt-cvs-maildir-header-cache from .15 to .16 -- tha... (diff)
downloadgentoo-2-6d2f68a0f54e6b787b38b46efc4b1608a33efc8d.tar.gz
gentoo-2-6d2f68a0f54e6b787b38b46efc4b1608a33efc8d.tar.bz2
gentoo-2-6d2f68a0f54e6b787b38b46efc4b1608a33efc8d.zip
Add patch to allow arm building
Diffstat (limited to 'dev-libs/uclibc')
-rw-r--r--dev-libs/uclibc/ChangeLog6
-rw-r--r--dev-libs/uclibc/files/0.9.26/arm-fix-missing-syscalls.patch69
-rw-r--r--dev-libs/uclibc/files/digest-uclibc-0.9.26-r11
-rw-r--r--dev-libs/uclibc/uclibc-0.9.26-r1.ebuild25
4 files changed, 97 insertions, 4 deletions
diff --git a/dev-libs/uclibc/ChangeLog b/dev-libs/uclibc/ChangeLog
index 9778ff4d666f..6bd9c3c17a42 100644
--- a/dev-libs/uclibc/ChangeLog
+++ b/dev-libs/uclibc/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-libs/uclibc
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/ChangeLog,v 1.19 2004/02/01 09:41:56 solar Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/ChangeLog,v 1.20 2004/05/26 04:02:54 vapier Exp $
+
+ 26 May 2004; Mike Frysinger <vapier@gentoo.org>
+ +files/0.9.26/arm-fix-missing-syscalls.patch, uclibc-0.9.26-r1.ebuild:
+ Add patch to allow arm building
01 Feb 2004; <solar@gentoo.org> uclibc-0.9.23.ebuild,
uclibc-0.9.26-r1.ebuild, uclibc-0.9.26.ebuild:
diff --git a/dev-libs/uclibc/files/0.9.26/arm-fix-missing-syscalls.patch b/dev-libs/uclibc/files/0.9.26/arm-fix-missing-syscalls.patch
new file mode 100644
index 000000000000..79a91de3af81
--- /dev/null
+++ b/dev-libs/uclibc/files/0.9.26/arm-fix-missing-syscalls.patch
@@ -0,0 +1,69 @@
+diff -ur uClibc-0.9.26/libc/sysdeps/linux/arm/ioperm.c uClibc-0.9.26.fix/libc/sysdeps/linux/arm/ioperm.c
+--- uClibc-0.9.26/libc/sysdeps/linux/arm/ioperm.c 2002-11-03 18:18:09.000000000 -0500
++++ uClibc-0.9.26.fix/libc/sysdeps/linux/arm/ioperm.c 2004-05-25 22:18:30.001343000 -0400
+@@ -47,6 +47,8 @@
+ #include <asm/page.h>
+ #include <sys/sysctl.h>
+
++#include <linux/version.h>
++
+ #define PATH_ARM_SYSTYPE "/etc/arm_systype"
+ #define PATH_CPUINFO "/proc/cpuinfo"
+
+@@ -100,8 +102,13 @@
+ {
+ char systype[256];
+ int i, n;
++#if LINUX_VERSION_CODE < 132119
+ static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
+ static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
++#else
++ static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
++ static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
++#endif
+ size_t len = sizeof(io.base);
+
+ if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
+diff -ur uClibc-0.9.26/libc/sysdeps/linux/common/create_module.c uClibc-0.9.26.fix/libc/sysdeps/linux/common/create_module.c
+--- uClibc-0.9.26/libc/sysdeps/linux/common/create_module.c 2003-08-27 09:17:07.000000000 -0400
++++ uClibc-0.9.26.fix/libc/sysdeps/linux/common/create_module.c 2004-05-25 21:49:03.000000000 -0400
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <sys/syscall.h>
+
++#ifdef __NR_create_module
+
+ //#define __NR_create_module 127
+
+@@ -65,3 +66,11 @@
+ #endif
+
+
++
++#else
++unsigned long create_module(const char *name, size_t size)
++{
++ __set_errno(ENOSYS);
++ return (unsigned long)-1;
++}
++#endif
+diff -ur uClibc-0.9.26/libc/sysdeps/linux/common/syscalls.c uClibc-0.9.26.fix/libc/sysdeps/linux/common/syscalls.c
+--- uClibc-0.9.26/libc/sysdeps/linux/common/syscalls.c 2004-01-02 03:47:22.000000000 -0500
++++ uClibc-0.9.26.fix/libc/sysdeps/linux/common/syscalls.c 2004-05-25 22:28:28.351343000 -0400
+@@ -1413,8 +1413,16 @@
+
+ //#define __NR_get_kernel_syms 130
+ #ifdef L_get_kernel_syms
++#ifdef __NR_get_kernel_syms
+ struct kernel_sym;
+ _syscall1(int, get_kernel_syms, struct kernel_sym *, table);
++#else
++int get_kernel_syms(struct kernel_sym *table)
++{
++ __set_errno(ENOSYS);
++ return (unsigned long)-1;
++}
++#endif
+ #endif
+
+ //#define __NR_quotactl 131
diff --git a/dev-libs/uclibc/files/digest-uclibc-0.9.26-r1 b/dev-libs/uclibc/files/digest-uclibc-0.9.26-r1
index a089f9d8c86e..f3b03fa6ae5c 100644
--- a/dev-libs/uclibc/files/digest-uclibc-0.9.26-r1
+++ b/dev-libs/uclibc/files/digest-uclibc-0.9.26-r1
@@ -1 +1,2 @@
MD5 7212713c432dd0de6ec2140c2a6212e4 uClibc-0.9.26.tar.bz2 1604543
+MD5 2e222a3ff0ef849be2a262640920da6d uclibc-0.9.26-broken-up-syscalls.patch.bz2 22953
diff --git a/dev-libs/uclibc/uclibc-0.9.26-r1.ebuild b/dev-libs/uclibc/uclibc-0.9.26-r1.ebuild
index 835597c22d9e..ac7957bbd6f2 100644
--- a/dev-libs/uclibc/uclibc-0.9.26-r1.ebuild
+++ b/dev-libs/uclibc/uclibc-0.9.26-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.26-r1.ebuild,v 1.3 2004/02/07 04:49:32 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/uclibc/uclibc-0.9.26-r1.ebuild,v 1.4 2004/05/26 04:02:54 vapier Exp $
inherit eutils flag-o-matic
@@ -11,7 +11,7 @@ SRC_URI="http://www.kernel.org/pub/linux/libs/uclibc/${MY_P}.tar.bz2"
LICENSE="LGPL-2"
SLOT="0"
-KEYWORDS="~x86 ~ppc ~sparc ~mips"
+KEYWORDS="~x86 ~ppc ~sparc ~mips arm"
IUSE="pie"
DEPEND="sys-devel/gcc"
@@ -33,15 +33,34 @@ src_unpack() {
epatch ${FILESDIR}/${PV}/uClibc-${PV}-Makefile.patch
fi
+ # support archs which dont implement all syscalls
+ epatch ${FILESDIR}/${PV}/arm-fix-missing-syscalls.patch
+
# fixup for install perms
sed -i -e "s:-fa:-dRf:g" Makefile
+ local target=""
+ if [ "${ARCH}" == "x86" ] ; then
+ target="i386"
+ elif [ "${ARCH}" == "ppc" ] ; then
+ target="powerpc"
+ else
+ # sparc|mips|alpha|arm|sh
+ target="${ARCH}"
+ fi
+ sed -i \
+ -e "s:default TARGET_i386:default TARGET_${target}:" \
+ extra/Configs/Config.in
+ sed -i \
+ -e "s:default CONFIG_GENERIC_386:default CONFIG_${UCLIBC_CPU:-GENERIC_386}:" \
+ extra/Configs/Config.${target}
+
make defconfig >/dev/null || die "could not config"
for def in UCLIBC_{HAS_LOCALE,PROFILING} DO{DEBUG,ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} ; do
sed -i "s:${def}=y:# ${def} is not set:" .config
done
- if [ `use x86` ] ; then
+ if use x86 ; then
use pie && PIC=1
[ "`is-flag -fPIC`" == "true" ] && PIC=1
fi