Hello,
I've run into problems compiling the linux-1.2.13 kernel, which
always worked fine for me. I suspect the problem is not the
kernel, but gcc. I recently upgraded my gcc to version 2.7.1
(homebuilt from GNU sources, linux-aout configuration). When I
try to build the kernel, I get:
ZOO-station:/usr/src/linux# make zlilo
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall
-Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c -o
init/main.o init/main.c
/usr/src/linux/include/asm/io.h: In function `copro_timeout':
/usr/src/linux/include/asm/io.h:82: inconsistent operand
constraints in an `asm'
/usr/src/linux/include/asm/io.h:82: inconsistent operand
constraints in an `asm'
/usr/src/linux/include/asm/io.h:82: inconsistent operand
constraints in an `asm'
/usr/src/linux/include/asm/io.h:82: inconsistent operand
constraints in an `asm'
/usr/src/linux/include/asm/io.h: In function `check_fpu':
/usr/src/linux/include/asm/io.h:78: inconsistent operand
constraints in an `asm'
/usr/src/linux/include/asm/io.h:82: inconsistent operand
constraints in an `asm'
/usr/src/linux/include/asm/io.h:78: inconsistent operand
constraints in an `asm'
/usr/src/linux/include/asm/io.h:82: inconsistent operand
constraints in an `asm'
make: *** [init/main.o] Error 1
ZOO-station:/usr/src/linux#
So, did gcc-2.7.1 chenge the syntax for inline asm?
Does anybody have the same problems, or know how to fix this?
The offending part from linux/include/asm/io.h:
73: #define __OUTS(s) \
74: extern inline void outs##s(unsigned short port, const void *
addr, unsigned long count) \
75: { __asm__ __volatile__ ("cld ; rep ; outs" #s \
76: : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1"
(count)); }
77:
78: __IN(b,"b","0" (0))
79: __IN(w,"w","0" (0))
80: __IN(l,"")
81:
82: __OUT(b,"b",char)
83: __OUT(w,"w",short)
84: __OUT(l,,int)
85:
86: __INS(b)
87: __INS(w)
88: __INS(l)
89:
90: __OUTS(b)
91: __OUTS(w)
92: __OUTS(l)
BTW: The ftape module, which also never gave me troubles, gives
about the
same errors.
Happy hacking,
JanJaap