Re: kernel and egcs

Matthias Urlichs (smurf@work.smurf.noris.de)
24 Jan 1998 14:54:57 +0100


Kurt Garloff <garloff@kg1.ping.de> writes:
>
> Linux-2.0.33 compiled with

> works with the 2.1.79 arch/i386/kernel/ioport.c

Or apply the following patch (with patch -l). Whoever wrote this code
(Linus?) didn't have optimizing compilers firmly enough in mind. ;-)

Index: arch/i386/kernel/ioport.c
--- arch/i386/kernel/ioport.c.orig Sun, 23 Nov 1997 09:31:56 +0100 smurf (kernel_linux/i/10_ioport.c 1.7 644) noris.13
+++ arch/i386/kernel/ioport.c Sat, 24 Jan 1998 14:25:19 +0100 smurf (kernel_linux/i/10_ioport.c 1.7 644) exp.3(w)
@@ -76,7 +76,7 @@
asmlinkage int sys_iopl(long ebx,long ecx,long edx,
long esi, long edi, long ebp, long eax, long ds,
long es, long fs, long gs, long orig_eax,
- long eip,long cs,long eflags,long esp,long ss)
+ long eip,long cs, volatile long eflags,long esp,long ss)
{
unsigned int level = ebx;

The patch to skip all these stupid warnings in string.h is equally simple:

Index: include/asm-i386/string.h
--- include/asm-i386/string.h.orig Mon, 24 Nov 1997 18:08:21 +0100 smurf (kernel_linux/n/8_string.h 1.19 644) noris.13
+++ include/asm-i386/string.h Sat, 24 Jan 1998 14:26:59 +0100 smurf (kernel_linux/n/8_string.h 1.19 644) exp.3(w)
@@ -443,6 +443,7 @@
case 3: COMMON("\n\tmovsw\n\tmovsb"); return to;
}
#undef COMMON
+ return to;
}

#define __HAVE_ARCH_MEMCPY
@@ -594,6 +595,7 @@
case 3: COMMON("\n\tstosw\n\tstosb"); return s;
}
#undef COMMON
+ return s;
}

#define __constant_c_x_memset(s, c, count) \

-- 
Matthias Urlichs
noris network GmbH