patches/linux/2.4.26/kaz-types.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
yann@1
     1
The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
yann@1
     2
yann@1
     3
In file included from sys/ustat.h:30,
yann@1
     4
                 from ../sysdeps/unix/sysv/linux/ustat.c:21:
yann@1
     5
../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
yann@1
     6
make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
yann@1
     7
make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
yann@1
     8
make[1]: *** [misc/subdir_lib] Error 2
yann@1
     9
make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
yann@1
    10
make: *** [all] Error 2
yann@1
    11
yann@1
    12
----------- snip ---------------
yann@1
    13
yann@1
    14
Date: Fri, 06 Jun 2003 08:00:00 +0900
yann@1
    15
From: kaz Kojima <kkojima@rr.iij4u.or.jp>
yann@1
    16
Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
yann@1
    17
 error: redefinition of `struct user_fpu_struct'"
yann@1
    18
To: linux-sh@m17n.org
yann@1
    19
Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
yann@1
    20
yann@1
    21
Hi,
yann@1
    22
yann@1
    23
Dan Kegel <dank@kegel.com> wrote:
yann@1
    24
> When I try to build glibc-2.3.2 for sh4, it fails with the error
yann@1
    25
[snip]
yann@1
    26
> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
yann@1
    27
> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
yann@1
    28
[snip]
yann@1
    29
> The error reminds me of the kind of thing fixed by
yann@1
    30
> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
yann@1
    31
yann@1
    32
It seems that the definitions in asm/user.h and the above patch collide.
yann@1
    33
I'm not sure why you need this patch, but is it needed for the problem
yann@1
    34
about struct ustat that you pointed out in this list, isn't it?
yann@1
    35
I found why I don't hit ustat problem - my local kernel tree includes
yann@1
    36
the following patch, though I can't recall about it.
yann@1
    37
yann@1
    38
Regards,
yann@1
    39
	kaz
yann@1
    40
--
yann@1
    41
diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
yann@1
    42
--- linux-2.5.69-sf-orig/include/linux/types.h	Wed Mar  5 12:29:34 2003
yann@1
    43
+++ sh4-unknown-linux-gnu/include/linux/types.h	Sat Apr 19 10:05:52 2003
yann@1
    44
@@ -141,6 +141,7 @@
yann@1
    45
 
yann@1
    46
 #endif /* __KERNEL_STRICT_NAMES */
yann@1
    47
 
yann@1
    48
+#ifdef	__KERNEL__
yann@1
    49
 /*
yann@1
    50
  * Below are truly Linux-specific types that should never collide with
yann@1
    51
  * any application/library that wants linux/types.h.
yann@1
    52
@@ -152,5 +153,6 @@
yann@1
    53
 	char			f_fname[6];
yann@1
    54
 	char			f_fpack[6];
yann@1
    55
 };
yann@1
    56
+#endif
yann@1
    57
 
yann@1
    58
 #endif /* _LINUX_TYPES_H */
yann@1
    59
yann@1
    60