patches/linux/2.6.5/100-linux-2.6.5-x86_64-unistd.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Aug 07 14:05:47 2008 +0000 (2008-08-07)
changeset 766 717efd8b78b4
permissions -rw-r--r--
Update all samples to the latest set of options.
Update some samples to use newer features.
Add patches for the uClibc-20080801 snapshot to be able to build with gcc-4.3.
Add a patch against glibc-2.7 to allow building PPC with latest kernel headers.
Add a patch to gcc to use an alternate unwinding when built against uClibc (after a private explanation/request by Daniel Egger <daniel@eggers-club.de>)

/trunk/patches/glibc/2.7/230-powerpc-private_futex.patch | 15 15 0 0 +
/trunk/patches/uClibc/20080801/300-fix-asm.patch | 175 175 0 0 +++++++++
/trunk/patches/uClibc/20080801/100-ifaddrs.patch | 190 190 0 0 +++++++++
/trunk/patches/uClibc/20080801/200-mips-typeof.patch | 112 112 0 0 ++++++
/trunk/patches/gcc/4.3.1/330-unwind-for-uClibc.patch | 25 25 0 0 +
/trunk/samples/x86_64-unknown-linux-gnu/crosstool.config | 17 10 7 0 +
/trunk/samples/armeb-unknown-linux-uclibc/crosstool.config | 7 5 2 0 +
/trunk/samples/arm-unknown-linux-gnueabi/crosstool.config | 7 5 2 0 +
/trunk/samples/ia64-unknown-linux-gnu/crosstool.config | 14 11 3 0 +
/trunk/samples/x86_64-unknown-linux-uclibc/uClibc-20080801.config | 232 232 0 0 ++++++++++++
/trunk/samples/x86_64-unknown-linux-uclibc/crosstool.config | 34 21 13 0 +-
/trunk/samples/i686-nptl-linux-gnu/crosstool.config | 10 7 3 0 +
/trunk/samples/powerpc-unknown-linux-gnu/crosstool.config | 12 9 3 0 +
/trunk/samples/mips-unknown-linux-uclibc/uClibc-20080801.config | 249 249 0 0 ++++++++++++
/trunk/samples/mips-unknown-linux-uclibc/crosstool.config | 38 23 15 0 +-
/trunk/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 14 10 4 0 +
/trunk/samples/armeb-unknown-linux-gnu/crosstool.config | 7 5 2 0 +
/trunk/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 12 9 3 0 +
/trunk/samples/arm-unknown-linux-uclibc/crosstool.config | 7 5 2 0 +
/trunk/samples/i586-geode-linux-uclibc/uClibc-20080801.config | 261 261 0 0 +++++++++++++
/trunk/samples/i586-geode-linux-uclibc/crosstool.config | 32 20 12 0 ++
/trunk/samples/powerpc-unknown-linux-uclibc/crosstool.config | 12 9 3 0 +
/trunk/samples/mipsel-unknown-linux-gnu/crosstool.config | 7 5 2 0 +
/trunk/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 7 5 2 0 +
/trunk/samples/alphaev56-unknown-linux-gnu/crosstool.config | 16 10 6 0 +
25 files changed, 1428 insertions(+), 84 deletions(-)
     1 Retrieved with wget http://www.x86-64.org/lists/discuss/msg04963.html
     2 then tabs fixed up by rediffing
     3 
     4 Message-Id: EFF62C7EE88E71429E38641A1172F4C2077104@net.teracruz.com
     5 To: discuss@xxxxxxxxxx
     6 Subject: Compile error with glibc 2.3.2 + Linux 2.6.5 ARCH=x86_64
     7 From: "David Lee" david.lee@xxxxxxxxxxxx
     8 Date: Wed, 21 Apr 2004 15:26:04 -0500</li>
     9 
    10 I am getting compiler errors when trying to compile glibc 2.3.2 using
    11 the kernel headers from linux 2.6.5.  The headers from linux 2.6.3 work
    12 fine.
    13 
    14 I've traced the cause of the problem to a change made in
    15 ./include/asm-x86_64/unistd.h in the 2.6.4 release.
    16 
    17 +#ifndef __ASSEMBLY__
    18 +
    19 +#include <linux/linkage.h>
    20 +#include <linux/compiler.h>
    21 +#include <linux/types.h>
    22 +#include <asm/ptrace.h>
    23 +
    24 +asmlinkage long sys_ptrace(long request, long pid,
    25 +                                unsigned long addr, long data);
    26 +asmlinkage long sys_iopl(unsigned int level, struct pt_regs regs);
    27 +asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int
    28 turn_on);
    29 +struct sigaction;
    30 +asmlinkage long sys_rt_sigaction(int sig,
    31 +                                const struct sigaction __user *act,
    32 +                                struct sigaction __user *oact,
    33 +                                size_t sigsetsize);
    34 +
    35 +#endif  /* __ASSEMBLY__ */
    36 
    37 Within glibc, ./sysdeps/unix/sysv/linux/x86_64/syscall.S ends up
    38 including this file, which chokes the assembler with the struct
    39 declarations in the above #include's.
    40 
    41 /home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
    42 _64-linux/glibcinclude/linux/posix_types.h: Assembler messages:
    43 /home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
    44 _64-linux/glibcinclude/linux/posix_types.h:36: Error: no such
    45 instruction: `typedef struct{'
    46 
    47 There are also errors about conflicting re-declarations further along in
    48 the glibc build.
    49 
    50 ../posix/sys/types.h:62: error: conflicting types for `dev_t'
    51 /home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
    52 _64-linux/glibcinclude/linux/types.h:23: error: previous declaration of
    53 `dev_t'
    54 
    55 Changing the '#ifndef __ASSEMBLY__' to '#if ((!defined __ASSEMBLY__) &&
    56 (defined __KERNEL__))' clears up the problem.  My patch is below.
    57 
    58 dave
    59 
    60 
    61 --- linux-2.6.5/include/asm-x86_64/unistd.h.old	2004-04-03 19:37:36.000000000 -0800
    62 +++ linux-2.6.5/include/asm-x86_64/unistd.h	2004-05-05 11:07:11.000000000 -0700
    63 @@ -713,7 +713,7 @@
    64  
    65  #endif /* __KERNEL_SYSCALLS__ */
    66  
    67 -#ifndef __ASSEMBLY__
    68 +#if ((!defined __ASSEMBLY__) && (defined __KERNEL__))
    69  
    70  #include <linux/linkage.h>
    71  #include <linux/compiler.h>
    72 @@ -730,7 +730,7 @@
    73  				struct sigaction __user *oact,
    74  				size_t sigsetsize);
    75  
    76 -#endif	/* __ASSEMBLY__ */
    77 +#endif /* ((!defined __ASSEMBLY__) && (defined __KERNEL__) */
    78  
    79  #endif /* __NO_STUBS */
    80