Re: [BUG] x86: 2.6.27-rc1 does not build with gcc-3.2.3 any more

From: Ingo Molnar
Date: Wed Jul 30 2008 - 07:10:29 EST



* Mikael Pettersson <mikpe@xxxxxxxx> wrote:

> static inline __attribute__((always_inline))
> unsigned char readb(const volatile void *addr)
> {
> unsigned char ret;
> asm volatile("mov" "b" " %1,%0"
> : "=" "q" (ret)
> : "m" (*(volatile unsigned char *)addr)
> : "memory");
> return ret;
> }
>
> The problem is that "=q" has been broken up into two adjacent
> string literals, and apparently gcc-3.2.3 hasn't done string
> literal concatenation at the time it processes the asm().
> Hence the syntax error. (This is clearly a gcc bug.)
>
> Switching to gcc-3.3.6 or newer fixes the problem.
>
> The question is, should the kernel be fixed to compile with 3.2.3
> again (by generating "=q" not "=" "q"), or should the minimum supported
> gcc version be bumped to 3.3.6?
>
> I have no strong feeling about this, except that I want to use the
> oldest (== least bloated) gcc possible on my 486 test box.

yeah, please send a fix. We could move the '=' from build_mmio_read into
the argument (explicitly).

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