linux-jlime-sh3-2.6.16.20: Add patches for known gcc 4.1.1 issues
authorKristoffer Ericson <kristoffer_e1@hotmail.com>
Fri, 9 Jun 2006 00:41:01 +0000 (00:41 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Fri, 9 Jun 2006 00:41:01 +0000 (00:41 +0000)
* Lower default optimization to -O1
* add volatile struct so it doesnt get wiped out by gcc
jlime-donkey.conf: Set default optimization
* Lower default optimization to -O1

conf/distro/jlime-donkey.conf
packages/linux/linux-jlime-sh3-2.6.16.20/Optimize-O1.patch [new file with mode: 0644]
packages/linux/linux-jlime-sh3-2.6.16.20/defconfig_jlime
packages/linux/linux-jlime-sh3-2.6.16.20/volatile-signal.c.patch [new file with mode: 0644]
packages/linux/linux-jlime-sh3-2.6.16.20/volatile-sys_sh.c.patch [new file with mode: 0644]
packages/linux/linux-jlime-sh3-2.6.16.20/volatile-traps.c.patch [new file with mode: 0644]
packages/linux/linux-jlime-sh3_2.6.16.20.bb

index 8324411..cbdb373 100644 (file)
@@ -84,9 +84,9 @@ include conf/distro/preferred-opie-versions.inc
 PCMCIA_MANAGER = "pcmciautils"
 
 #<>
-#<> Dont wanna break stuff when "some" packages do -O3, so lets set it at -O2
-#<>
-FULL_OPTIMIZATION = "-O2"
+#<> We are using gcc 4.1.1 so lets keep optimizations low
+#<> 
+FULL_OPTIMIZATION = "-O1"
 
 #<>
 #<>Our Image files should look abit better.
diff --git a/packages/linux/linux-jlime-sh3-2.6.16.20/Optimize-O1.patch b/packages/linux/linux-jlime-sh3-2.6.16.20/Optimize-O1.patch
new file mode 100644 (file)
index 0000000..4b8f1ec
--- /dev/null
@@ -0,0 +1,22 @@
+--- linux-2.6.16.20/Makefile_orig      2006-06-08 23:14:14.000000000 +0000
++++ linux-2.6.16.20/Makefile   2006-06-08 23:15:39.000000000 +0000
+@@ -185,8 +185,8 @@
+ HOSTCC        = gcc
+ HOSTCXX       = g++
+-HOSTCFLAGS    = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+-HOSTCXXFLAGS  = -O2
++HOSTCFLAGS    = -Wall -Wstrict-prototypes -O1 -fomit-frame-pointer
++HOSTCXXFLAGS  = -O1
+ #     Decide whether to build built-in, modular, or both.
+ #     Normally, just do built-in.
+@@ -501,7 +501,7 @@
+ ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
+ CFLAGS                += -Os
+ else
+-CFLAGS                += -O2
++CFLAGS                += -O1
+ endif
+ #Add align options if CONFIG_CC_* is not equal to 0
index 47ba191..452b8d8 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.16-sh
-# Thu Jun  8 01:14:17 2006
+# Thu Jun  8 03:45:30 2006
 #
 CONFIG_SUPERH=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -23,7 +23,7 @@ CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
-# CONFIG_POSIX_MQUEUE is not set
+CONFIG_POSIX_MQUEUE=y
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_SYSCTL=y
@@ -32,7 +32,7 @@ CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_UID16=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
diff --git a/packages/linux/linux-jlime-sh3-2.6.16.20/volatile-signal.c.patch b/packages/linux/linux-jlime-sh3-2.6.16.20/volatile-signal.c.patch
new file mode 100644 (file)
index 0000000..0a8178c
--- /dev/null
@@ -0,0 +1,65 @@
+--- linux-2.6.16.20/arch/sh/kernel/signal.c_orig       2006-06-08 23:52:12.000000000 +0000
++++ linux-2.6.16.20/arch/sh/kernel/signal.c    2006-06-08 23:58:27.000000000 +0000
+@@ -33,7 +33,7 @@
+ #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
+-asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset);
++asmlinkage int do_signal(volatile struct pt_regs *regs, sigset_t *oldset);
+ /*
+  * Atomically swap in the new signal mask, and wait for a signal.
+@@ -41,7 +41,7 @@
+ asmlinkage int
+ sys_sigsuspend(old_sigset_t mask,
+              unsigned long r5, unsigned long r6, unsigned long r7,
+-             struct pt_regs regs)
++             volatile struct pt_regs regs)
+ {
+       sigset_t saveset;
+@@ -64,7 +64,7 @@
+ asmlinkage int
+ sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize,
+                 unsigned long r6, unsigned long r7,
+-                struct pt_regs regs)
++                volatile struct pt_regs regs)
+ {
+       sigset_t saveset, newset;
+@@ -92,7 +92,7 @@
+ asmlinkage int 
+ sys_sigaction(int sig, const struct old_sigaction __user *act,
+-            struct old_sigaction __user *oact)
++            volatile struct old_sigaction __user *oact)
+ {
+       struct k_sigaction new_ka, old_ka;
+       int ret;
+@@ -125,7 +125,7 @@
+ asmlinkage int
+ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
+               unsigned long r6, unsigned long r7,
+-              struct pt_regs regs)
++              volatile struct pt_regs regs)
+ {
+       return do_sigaltstack(uss, uoss, regs.regs[15]);
+ }
+@@ -232,7 +232,7 @@
+ asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5,
+                            unsigned long r6, unsigned long r7,
+-                           struct pt_regs regs)
++                           volatile struct pt_regs regs)
+ {
+       struct sigframe __user *frame = (struct sigframe __user *)regs.regs[15];
+       sigset_t set;
+@@ -265,7 +265,7 @@
+ asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
+                               unsigned long r6, unsigned long r7,
+-                              struct pt_regs regs)
++                              volatile struct pt_regs regs)
+ {
+       struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs.regs[15];
+       sigset_t set;
diff --git a/packages/linux/linux-jlime-sh3-2.6.16.20/volatile-sys_sh.c.patch b/packages/linux/linux-jlime-sh3-2.6.16.20/volatile-sys_sh.c.patch
new file mode 100644 (file)
index 0000000..f90fe7f
--- /dev/null
@@ -0,0 +1,11 @@
+--- linux-2.6.16.20/arch/sh/kernel/sys_sh.c_orig       2006-06-09 00:00:18.000000000 +0000
++++ linux-2.6.16.20/arch/sh/kernel/sys_sh.c    2006-06-09 00:02:24.000000000 +0000
+@@ -31,7 +31,7 @@
+  */
+ asmlinkage int sys_pipe(unsigned long r4, unsigned long r5,
+       unsigned long r6, unsigned long r7,
+-      struct pt_regs regs)
++      volatile struct pt_regs regs)
+ {
+       int fd[2];
+       int error;
diff --git a/packages/linux/linux-jlime-sh3-2.6.16.20/volatile-traps.c.patch b/packages/linux/linux-jlime-sh3-2.6.16.20/volatile-traps.c.patch
new file mode 100644 (file)
index 0000000..dd432f5
--- /dev/null
@@ -0,0 +1,47 @@
+--- linux-2.6.16.20/arch/sh/kernel/traps.c_orig        2006-06-09 00:03:58.000000000 +0000
++++ linux-2.6.16.20/arch/sh/kernel/traps.c     2006-06-09 00:07:04.000000000 +0000
+@@ -51,7 +51,7 @@
+ #define DO_ERROR(trapnr, signr, str, name, tsk)                               \
+ asmlinkage void do_##name(unsigned long r4, unsigned long r5,         \
+                         unsigned long r6, unsigned long r7,           \
+-                        struct pt_regs regs)                          \
++                        volatile struct pt_regs regs)                         \
+ {                                                                     \
+       unsigned long error_code;                                       \
+                                                                       \
+@@ -89,7 +89,7 @@
+ DEFINE_SPINLOCK(die_lock);
+-void die(const char * str, struct pt_regs * regs, long err)
++void die(const char * str, volatile struct pt_regs * regs, long err)
+ {
+       static int die_counter;
+@@ -102,7 +102,7 @@
+       do_exit(SIGSEGV);
+ }
+-static inline void die_if_kernel(const char * str, struct pt_regs * regs, long err)
++static inline void die_if_kernel(const char * str, volatile struct pt_regs * regs, long err)
+ {
+       if (!user_mode(regs))
+               die(str, regs, err);
+@@ -117,7 +117,7 @@
+  * - other kernel errors are bad
+  * - return 0 if fixed-up, -EFAULT if non-fatal (to the kernel) fault
+  */
+-static int die_if_no_fixup(const char * str, struct pt_regs * regs, long err)
++static int die_if_no_fixup(const char * str, volatile struct pt_regs * regs, long err)
+ {
+       if (!user_mode(regs))
+       {
+@@ -581,7 +581,7 @@
+ asmlinkage void do_exception_error(unsigned long r4, unsigned long r5,
+                                  unsigned long r6, unsigned long r7,
+-                                 struct pt_regs regs)
++                                 volatile struct pt_regs regs)
+ {
+       long ex;
+       asm volatile("stc       r2_bank, %0" : "=r" (ex));
index 3410130..53010e6 100644 (file)
@@ -7,7 +7,11 @@ COMPATIBLE_HOST = "sh.*-linux"
 COMPATIBLE_MACHINE = 'jornada6xx'
 
 SRC_URI = "http://www.jlime.com/downloads/Releases/donkey/kernels/6xx/sources/jlime-2.6.16.20-patched.tar.gz \
-           file://defconfig_jlime"
+           file://defconfig_jlime \
+          file://volatile-traps.c.patch;patch=1  \
+          file://volatile-signal.c.patch;patch=1 \
+          file://volatile-sys_sh.c.patch;patch=1 \
+          file://Optimize-O1.patch;patch=1"
 
 S = "${WORKDIR}/linux-${PV}"