Re: 2.3.47 pre[45] does not compile

From: Linus Torvalds (torvalds@transmeta.com)
Date: Sat Feb 19 2000 - 00:21:42 EST


In article <200002190021.BAA23537@db0bm.ampr.org>,
f5ibh <f5ibh@db0bm.ampr.org> wrote:
>Hi !
>
>I'm trying to compile 2.3.47 pre4 and pre5 and I've the following errors
:

It is, as the error message tells you, a compiler bug.

I'm sure it will be fixed soon in the egcs development trees, in the
meantime the only way to work around it seems to be to edit the file

        include/linux/spinlock.c

search for the comment with "Gcc-2.7.x has a nasty bug with empty
initializers" and change it to say "All current versions of gcc have a
nasty bug with empty initializers", and then change the following #if
statement to be #if 0, so that the "gcc_is_buggy" version of the
spinlock is activated.

That will make each spinlock be four bytes on UP, instead of being
empty, but at least it will compile and work.

The egcs people know about this and I'm sure it will get fixed soon, but
in the meantime there is a working (although cludgy) workaround.

On the whole, I have to say that these kinds of compiler bugs where the
compiler aborts during compilation are a LOT easier to find than the
ones where wrong code is generated ;)

                Linus

-
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/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:22 EST