diff options
Diffstat (limited to 'patches/linux/2.6.6')
-rw-r--r-- | patches/linux/2.6.6/kaz-types.patch | 60 | ||||
-rw-r--r-- | patches/linux/2.6.6/linux-2.6.5-x86_64-unistd.patch | 80 | ||||
-rw-r--r-- | patches/linux/2.6.6/linux-2.6.8-noshared-kconfig.patch | 28 |
3 files changed, 168 insertions, 0 deletions
diff --git a/patches/linux/2.6.6/kaz-types.patch b/patches/linux/2.6.6/kaz-types.patch new file mode 100644 index 0000000..ec5de36 --- /dev/null +++ b/patches/linux/2.6.6/kaz-types.patch @@ -0,0 +1,60 @@ +The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4: + +In file included from sys/ustat.h:30, + from ../sysdeps/unix/sysv/linux/ustat.c:21: +../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat' +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 +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' +make[1]: *** [misc/subdir_lib] Error 2 +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' +make: *** [all] Error 2 + +----------- snip --------------- + +Date: Fri, 06 Jun 2003 08:00:00 +0900 +From: kaz Kojima <kkojima@rr.iij4u.or.jp> +Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32: + error: redefinition of `struct user_fpu_struct'" +To: linux-sh@m17n.org +Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp> + +Hi, + +Dan Kegel <dank@kegel.com> wrote: +> When I try to build glibc-2.3.2 for sh4, it fails with the error +[snip] +> /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' +> /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' +[snip] +> The error reminds me of the kind of thing fixed by +> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch + +It seems that the definitions in asm/user.h and the above patch collide. +I'm not sure why you need this patch, but is it needed for the problem +about struct ustat that you pointed out in this list, isn't it? +I found why I don't hit ustat problem - my local kernel tree includes +the following patch, though I can't recall about it. + +Regards, + kaz +-- +diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h +--- linux-2.5.69-sf-orig/include/linux/types.h Wed Mar 5 12:29:34 2003 ++++ sh4-unknown-linux-gnu/include/linux/types.h Sat Apr 19 10:05:52 2003 +@@ -141,6 +141,7 @@ + + #endif /* __KERNEL_STRICT_NAMES */ + ++#ifdef __KERNEL__ + /* + * Below are truly Linux-specific types that should never collide with + * any application/library that wants linux/types.h. +@@ -152,5 +153,6 @@ + char f_fname[6]; + char f_fpack[6]; + }; ++#endif + + #endif /* _LINUX_TYPES_H */ + + diff --git a/patches/linux/2.6.6/linux-2.6.5-x86_64-unistd.patch b/patches/linux/2.6.6/linux-2.6.5-x86_64-unistd.patch new file mode 100644 index 0000000..829f0d9 --- /dev/null +++ b/patches/linux/2.6.6/linux-2.6.5-x86_64-unistd.patch @@ -0,0 +1,80 @@ +Retrieved with wget http://www.x86-64.org/lists/discuss/msg04963.html +then tabs fixed up by rediffing + +Message-Id: EFF62C7EE88E71429E38641A1172F4C2077104@net.teracruz.com +To: discuss@xxxxxxxxxx +Subject: Compile error with glibc 2.3.2 + Linux 2.6.5 ARCH=x86_64 +From: "David Lee" david.lee@xxxxxxxxxxxx +Date: Wed, 21 Apr 2004 15:26:04 -0500</li> + +I am getting compiler errors when trying to compile glibc 2.3.2 using +the kernel headers from linux 2.6.5. The headers from linux 2.6.3 work +fine. + +I've traced the cause of the problem to a change made in +./include/asm-x86_64/unistd.h in the 2.6.4 release. + ++#ifndef __ASSEMBLY__ ++ ++#include <linux/linkage.h> ++#include <linux/compiler.h> ++#include <linux/types.h> ++#include <asm/ptrace.h> ++ ++asmlinkage long sys_ptrace(long request, long pid, ++ unsigned long addr, long data); ++asmlinkage long sys_iopl(unsigned int level, struct pt_regs regs); ++asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int +turn_on); ++struct sigaction; ++asmlinkage long sys_rt_sigaction(int sig, ++ const struct sigaction __user *act, ++ struct sigaction __user *oact, ++ size_t sigsetsize); ++ ++#endif /* __ASSEMBLY__ */ + +Within glibc, ./sysdeps/unix/sysv/linux/x86_64/syscall.S ends up +including this file, which chokes the assembler with the struct +declarations in the above #include's. + +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86 +_64-linux/glibcinclude/linux/posix_types.h: Assembler messages: +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86 +_64-linux/glibcinclude/linux/posix_types.h:36: Error: no such +instruction: `typedef struct{' + +There are also errors about conflicting re-declarations further along in +the glibc build. + +../posix/sys/types.h:62: error: conflicting types for `dev_t' +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86 +_64-linux/glibcinclude/linux/types.h:23: error: previous declaration of +`dev_t' + +Changing the '#ifndef __ASSEMBLY__' to '#if ((!defined __ASSEMBLY__) && +(defined __KERNEL__))' clears up the problem. My patch is below. + +dave + + +--- linux-2.6.5/include/asm-x86_64/unistd.h.old 2004-04-03 19:37:36.000000000 -0800 ++++ linux-2.6.5/include/asm-x86_64/unistd.h 2004-05-05 11:07:11.000000000 -0700 +@@ -713,7 +713,7 @@ + + #endif /* __KERNEL_SYSCALLS__ */ + +-#ifndef __ASSEMBLY__ ++#if ((!defined __ASSEMBLY__) && (defined __KERNEL__)) + + #include <linux/linkage.h> + #include <linux/compiler.h> +@@ -730,7 +730,7 @@ + struct sigaction __user *oact, + size_t sigsetsize); + +-#endif /* __ASSEMBLY__ */ ++#endif /* ((!defined __ASSEMBLY__) && (defined __KERNEL__) */ + + #endif /* __NO_STUBS */ + diff --git a/patches/linux/2.6.6/linux-2.6.8-noshared-kconfig.patch b/patches/linux/2.6.6/linux-2.6.8-noshared-kconfig.patch new file mode 100644 index 0000000..326cdcd --- /dev/null +++ b/patches/linux/2.6.6/linux-2.6.8-noshared-kconfig.patch @@ -0,0 +1,28 @@ +Lets you run 'make oldconfig' and 'make menuconfig' on systems +where shared libraries aren't easy. (There's no harm in using the +static version of libkconfig.) +Idea mentioned by Bertrand Marquis, but this patch is a bit simpler than his. + + +--- linux-2.6.8.1/scripts/kconfig/Makefile.old 2004-09-09 20:30:25.000000000 -0700 ++++ linux-2.6.8.1/scripts/kconfig/Makefile 2004-09-09 20:47:51.000000000 -0700 +@@ -68,8 +68,8 @@ + libkconfig-objs := zconf.tab.o + + host-progs := conf mconf qconf gconf +-conf-objs := conf.o libkconfig.so +-mconf-objs := mconf.o libkconfig.so ++conf-objs := conf.o $(libkconfig-objs) ++mconf-objs := mconf.o $(libkconfig-objs) + + ifeq ($(MAKECMDGOALS),xconfig) + qconf-target := 1 +@@ -88,7 +88,7 @@ + gconf-objs := gconf.o kconfig_load.o + endif + +-clean-files := libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \ ++clean-files := $(libkconfig-objs) lkc_defs.h qconf.moc .tmp_qtcheck \ + .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c + + # generated files seem to need this to find local include files |