lkml.org 
[lkml]   [1998]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.2.0 and egcs 1.1 was Re: Sorry, wrong gcc-version
On Sun, Oct 25, 1998 at 11:55:09PM +0100, Linus Torvalds wrote:
>
>
> On 25 Oct 1998, Andi Kleen wrote:
> >
> > Actually this is not entirely correct. Even 2.1.x kernels still have lots
> > of incorrect inline assembler constraints which can cause the compiler
> > to misoptimize the kernel.
>
> I don't agree.
>
> The assembler used to be correct, and the gcc people unilaterally decided
> to change the rules. As such, I don't think the asm is any more
> "incorrect" than the new gcc versions are incorrect.

OK, lets say "lots of assembler constraints that cause some gcc versions
to generate bogus code".

> So Andi, don't go saying that the kernel has problems, when it is equally
> true to say that gcc has problems.

I actually don't care that much about who is to blame for the problems,
just that the problems are fixed (this is free software - no need to
blame someone :)

> > Linus what is your position on egcs 1.1 and 2.2.0 ?
>
> My problem is that I see too many egcs people that claim that the kernel
> is buggy, even though at least half the reports I ever got were egcs bugs,
> in my opinion. As such, I don't have very much faith in what the egcs
> people tell me any more.

I'm curious. Did you see any new to egcs 1.1 bug that was caused/went away
with -fno-gcse ? I would expect global CSE to move a lot of code and cause
locking problems etc. by this.

> For example, everybody in the egcs camp just decided that clobbers and
> inputs must not overlap. Nobody told me why, and why they can't just be
> automatically converted to early-clobbers inside gcc.

I can't comment one the reasons for this change. AFAIK egcs-current
does a lot more strict checking on inline assembler arguments, but that
doesn't help for the goal of a stable running 2.2 kernel that was compiled
by egcs. It seems in this this case it is easier to fix the kernel than
the compiler. If this can't be done then the kernel should at least
have get this patch until the issue is resolved:


--- linux/init/main.c-o Mon Oct 26 00:52:44 1998
+++ linux/init/main.c Mon Oct 26 00:55:18 1998
@@ -65,6 +65,14 @@
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
#error sorry, your GCC is too old. It builds incorrect kernels.
#endif
+/*
+ * Sadly newer gcc versions aren't capable to generate reliable i386
+ * kernels because of various inline assembly problems. If you know
+ * what you're doing disable this check (but think twice!)
+ */
+#if defined(__i386__) && __GNUC_MINOR__ > 7
+#error sorry, your GCC is too new. It builds incorrect kernels.
+#endif

extern char _stext, _etext;
extern char *linux_banner;

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [from the cache]
©2003-2011 Jasper Spaans