[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: inconsistent operand constraints



  wendal  writes:
  wendal>  I installed gcc-2.7.2 and tried to compile the 1.2.13 kernel and
  wendal> received the following error:
  wendal> 
  wendal> /usr/src/linux-1.2.13/include/asm/io.h:82: inconsistent operand
  wendal> constraints in an 'asm'
  wendal> 
  wendal> This kernel works fine with gcc-2.6.3.
  wendal> 
  wendal> Has anybody seen this before, what's happening here?

This is known as bug#2073. I append what was posted five weeks ago.
Cheers, Dirk


Resent-From: Miquel van Smoorenburg <miquels@Q.cistron.nl>
From: Miquel van Smoorenburg <miquels@Q.cistron.nl>
To: bruce@Pixar.com, debian-bugs@Pixar.com
Cc: debian-bugs@Pixar.com, torin@daft.com
Subject: Bug#2073: assembler problems in asm/io.h during build of kernel
Date: Tue, 2 Jan 1996 12:35:06 +0100 (MET)

You (Bruce Perens) wrote:
> There was a change in the way that GCC handles embedded assembler that
> made new compilers incompatible with the old kernels. Ugh. The io.h file
> in the new kernel is similar enough to the old one that it may be a drop-in
> replacement. I don't think anyone has tried this yet.

I saw this on comp.os.linux.development.system, but I haven't tried
if it still compiles the kernel with gcc < 2.7.x...


From: Russell Johnston <rjohnsto@edge.net>
Newsgroups: comp.os.linux.development.system
Subject: Re: gcc 2.7.2 and kernel 1.2.13

This patch allows compilation of kernel 1.2.13 with gcc > 2.7.0

Russell Johnston
<rjohnsto@edge.net>

--- ./linux/include/asm-i386/io.h-	Mon Aug 15 00:56:19 1994
+++ ./linux/include/asm-i386/io.h	Wed Nov 15 23:04:25 1995
@@ -49,9 +49,9 @@

 #define __OUT(s,s1,x) \
 __OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); } \
-__OUT1(s##c,x) __OUT2(s,s1,"") : : "a" (value), "i" (port)); } \
+__OUT1(s##c,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); } \
 __OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port));
SLOW_DOWN_IO; } \
-__OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "i" (port));
SLOW_DOWN_IO; }
+__OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port));
SLOW_DOWN_IO; }

 #define __IN1(s) \
 extern inline unsigned int __in##s(unsigned short port) { unsigned int _v;
@@ -61,9 +61,9 @@

 #define __IN(s,s1,i...) \
 __IN1(s) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); return _v; } \
-__IN1(s##c) __IN2(s,s1,"") : "=a" (_v) : "i" (port) ,##i ); return _v; } \
+__IN1(s##c) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); return _v; }
\
 __IN1(s##_p) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i );
SLOW_DOWN_IO; return _v; } \
-__IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "i" (port) ,##i );
SLOW_DOWN_IO; return _v; }
+__IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i );
SLOW_DOWN_IO; return _v; }

 #define __INS(s) \
 extern inline void ins##s(unsigned short port, void * addr, unsigned long
count) \

--
  Miquel van    | Cistron Internet Services   --    Alphen aan den Rijn.
  Smoorenburg,  | mailto:info@cistron.nl          http://www.cistron.nl/
miquels@het.net | Tel: +31-172-419445 (Voice) 430979 (Fax) 442580 (Data)



--
Dirk Eddelb"uttel                              http://qed.econ.queensu.ca/~edd


Reply to: