diff -NurpP --minimal uClibc-0.9.26/include/fpu_control.h uClibc-0.9.26-fix/include/fpu_control.h --- uClibc-0.9.26/include/fpu_control.h 1970-01-01 01:00:00.000000000 +0100 +++ uClibc-0.9.26-fix/include/fpu_control.h 2003-10-08 21:30:32.000000000 +0200 @@ -0,0 +1,102 @@ +/* FPU control word definitions. ARM version. + Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _FPU_CONTROL_H +#define _FPU_CONTROL_H + +/* We have a slight terminology confusion here. On the ARM, the register + * we're interested in is actually the FPU status word - the FPU control + * word is something different (which is implementation-defined and only + * accessible from supervisor mode.) + * + * The FPSR looks like this: + * + * 31-24 23-16 15-8 7-0 + * | system ID | trap enable | system control | exception flags | + * + * We ignore the system ID bits; for interest's sake they are: + * + * 0000 "old" FPE + * 1000 FPPC hardware + * 0001 FPE 400 + * 1001 FPA hardware + * + * The trap enable and exception flags are both structured like this: + * + * 7 - 5 4 3 2 1 0 + * | reserved | INX | UFL | OFL | DVZ | IVO | + * + * where a `1' bit in the enable byte means that the trap can occur, and + * a `1' bit in the flags byte means the exception has occurred. + * + * The exceptions are: + * + * IVO - invalid operation + * DVZ - divide by zero + * OFL - overflow + * UFL - underflow + * INX - inexact (do not use; implementations differ) + * + * The system control byte looks like this: + * + * 7-5 4 3 2 1 0 + * | reserved | AC | EP | SO | NE | ND | + * + * where the bits mean + * + * ND - no denormalised numbers (force them all to zero) + * NE - enable NaN exceptions + * SO - synchronous operation + * EP - use expanded packed-decimal format + * AC - use alternate definition for C flag on compare operations + */ + +/* masking of interrupts */ +#define _FPU_MASK_IM 0x00010000 /* invalid operation */ +#define _FPU_MASK_ZM 0x00020000 /* divide by zero */ +#define _FPU_MASK_OM 0x00040000 /* overflow */ +#define _FPU_MASK_UM 0x00080000 /* underflow */ +#define _FPU_MASK_PM 0x00100000 /* inexact */ +#define _FPU_MASK_DM 0x00000000 /* denormalized operation */ + +/* The system id bytes cannot be changed. + Only the bottom 5 bits in the trap enable byte can be changed. + Only the bottom 5 bits in the system control byte can be changed. + Only the bottom 5 bits in the exception flags are used. + The exception flags are set by the fpu, but can be zeroed by the user. */ +#define _FPU_RESERVED 0xffe0e0e0 /* These bits are reserved. */ + +/* The fdlibm code requires strict IEEE double precision arithmetic, + no interrupts for exceptions, rounding to nearest. Changing the + rounding mode will break long double I/O. Turn on the AC bit, + the compiler generates code that assumes it is on. */ +#define _FPU_DEFAULT 0x00001000 /* Default value. */ +#define _FPU_IEEE 0x001f1000 /* Default + exceptions enabled. */ + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +#define _FPU_GETCW(cw) __asm__ ("rfs %0" : "=r" (cw)) +#define _FPU_SETCW(cw) __asm__ ("wfs %0" : : "r" (cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* _FPU_CONTROL_H */ diff -NurpP --minimal 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-04 00:18:09.000000000 +0100 +++ uClibc-0.9.26-fix/libc/sysdeps/linux/arm/ioperm.c 2004-07-19 22:21:18.000000000 +0200 @@ -47,6 +47,8 @@ #include #include +#include + #define PATH_ARM_SYSTYPE "/etc/arm_systype" #define PATH_CPUINFO "/proc/cpuinfo" @@ -93,6 +95,8 @@ static struct platform { * 3. Lookup the "system type" field in /proc/cpuinfo. Again, if it * matches an entry in the platform[] table, use the corresponding * values. + * + * 4. BUS_ISA is changed to CTL_BUS_ISA (for kernel since 2.4.23). */ static int @@ -100,8 +104,15 @@ init_iosys (void) { 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 -NurpP --minimal 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 15:17:07.000000000 +0200 +++ uClibc-0.9.26-fix/libc/sysdeps/linux/common/create_module.c 2004-07-19 21:31:17.000000000 +0200 @@ -29,6 +29,13 @@ //#define __NR_create_module 127 +/* + * In 2.6.x, there's no longer a create_modul() call. + */ +#ifdef __NR_create_module + + + #if defined(__i386__) || defined(__m68k__) || defined(__arm__) || defined(__cris__) || defined(__i960__) #define __NR___create_module __NR_create_module #ifdef __STR_NR_create_module @@ -64,4 +71,8 @@ unsigned long create_module(const char * _syscall2(unsigned long, create_module, const char *, name, size_t, size); #endif +/* + * No create_module() in 2.6.x kernel versions. + */ +#endif /* __NR_create_module */ diff -NurpP --minimal 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 09:47:22.000000000 +0100 +++ uClibc-0.9.26-fix/libc/sysdeps/linux/common/syscalls.c 2004-07-19 21:31:17.000000000 +0200 @@ -1411,12 +1411,23 @@ _syscall5(int, init_module, void *, firs # endif #endif + + //#define __NR_get_kernel_syms 130 +/* + * Linux 2.6.x doesn't have old-style module support + */ +#ifdef __NR_get_kernel_syms + #ifdef L_get_kernel_syms struct kernel_sym; _syscall1(int, get_kernel_syms, struct kernel_sym *, table); #endif +#endif /* __NR_get_kernel_syms */ + + + //#define __NR_quotactl 131 #ifdef __NR_quotactl #ifdef L_quotactl