Kernal v1.2.13/GCC v2.7.2 - Can't make zImage (io.h?)

Kernal v1.2.13/GCC v2.7.2 - Can't make zImage (io.h?)

Post by Stephen Costar » Mon, 27 May 1996 04:00:00



I just 'upgraded' to GCC v2.7.2 on my linux v1.2.13/ELF (slackware v3.0)
system.  I followed the GCC upgrade doc and have updated all my binaries
as well to the current versions.  I went and did some testing with other
programs (both c & c++) and all seem to be compiling fine.  I then
tried to re-compile the 1.2.13 kernel (I have two patches on the kernel
the 3com 595 vortex, and AHA2940UW patches).  The compile went fine
until I got to making the zImage.  (make dep, make clean, etc all worked)
this is the error that I got when I started making the zImage:
Anyone have any ideas on how to fix this?  

-------------------------------
/usr/src/linuxelf-1.2.13/include/asm/io.h: In function 'copro_timeout':
/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h: In function 'check_fpu':
/usr/src/linuxelf-1.2.13/include/asm/io.h:78: inconsistent operand constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h:78: inconsistent operand constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'
make: *** [init/main.o] error 1

-------------------------------------
relative portion of io.h:
------------

#define __OUT1(s,x) \
extern inline void __out##s(unsigned x value, unsigned short port) {

#define __OUT2(s,s1,s2) \
__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1"

#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##_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; }

#define __IN1(s) \
extern inline unsigned int __in##s(unsigned short port) { unsigned int _v;

#define __IN2(s,s1,s2) \
__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"

#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##_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; }

__IN(b,"b","0" (0))
__IN(w,"w","0" (0))
__IN(l,"")

__OUT(b,"b",char)
__OUT(w,"w",short)
__OUT(l,,int)

--------------------------------------------

Stephen Costaras

 
 
 

Kernal v1.2.13/GCC v2.7.2 - Can't make zImage (io.h?)

Post by Konrad Rokic » Thu, 30 May 1996 04:00:00


I have the EXACT same problem. Anyone out there know what's wrong?
Please help!


>I just 'upgraded' to GCC v2.7.2 on my linux v1.2.13/ELF (slackware v3.0)

Same here... except I have Slackware v2.0 (Like it matters...)

Quote:>system.  I followed the GCC upgrade doc and have updated all my binaries
>as well to the current versions.  I went and did some testing with other
>programs (both c & c++) and all seem to be compiling fine.  I then

I tried compiling "Hello World" and it worked fine.

Quote:>tried to re-compile the 1.2.13 kernel (I have two patches on the kernel

I also tried compiling 1.2.8 and got the same error....

Quote:>the 3com 595 vortex, and AHA2940UW patches).  The compile went fine

I had no patches on mine

>until I got to making the zImage.  (make dep, make clean, etc all worked)
>this is the error that I got when I started making the zImage:
>Anyone have any ideas on how to fix this?  
>-------------------------------
>/usr/src/linuxelf-1.2.13/include/asm/io.h: In function 'copro_timeout':
>/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'
>/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'
>/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'
>/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'
>/usr/src/linuxelf-1.2.13/include/asm/io.h: In function 'check_fpu':
>/usr/src/linuxelf-1.2.13/include/asm/io.h:78: inconsistent operand constraints in an 'asm'
>/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'
>/usr/src/linuxelf-1.2.13/include/asm/io.h:78: inconsistent operand constraints in an 'asm'
>/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'
>make: *** [init/main.o] error 1
>-------------------------------------
>relative portion of io.h:
>------------
>#define __OUT1(s,x) \
>extern inline void __out##s(unsigned x value, unsigned short port) {
>#define __OUT2(s,s1,s2) \
>__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1"
>#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##_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; }
>#define __IN1(s) \
>extern inline unsigned int __in##s(unsigned short port) { unsigned int _v;
>#define __IN2(s,s1,s2) \
>__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"
>#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##_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; }
>__IN(b,"b","0" (0))
>__IN(w,"w","0" (0))
>__IN(l,"")
>__OUT(b,"b",char)
>__OUT(w,"w",short)
>__OUT(l,,int)
>--------------------------------------------
>Stephen Costaras



---http://www.clark.net/pub/srokicki/home.html---

 
 
 

Kernal v1.2.13/GCC v2.7.2 - Can't make zImage (io.h?)

Post by Todd R. Eigenschi » Fri, 31 May 1996 04:00:00


: I have the EXACT same problem. Anyone out there know what's wrong?
: Please help!
:

:
:
: >I just 'upgraded' to GCC v2.7.2 on my linux v1.2.13/ELF (slackware v3.0)
: Same here... except I have Slackware v2.0 (Like it matters...)
:
: [...]
:
: >-------------------------------
: >/usr/src/linuxelf-1.2.13/include/asm/io.h: In function 'copro_timeout':
: >/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'

In lines 71 and 76 of io.h, the "d (port)" should be "id (port)".  I
made the change, and things compiled fine.  But by then, my need to
switch back to 1.2.13 went away, so I haven't tested it.

Here's what I mailed myself from tin when I read it:

: > The relevant section of the io.h header file is a follows -
: >
: >     68 #define __INS(s) \
: >     69 extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \
: >     70 { __asm__ __volatile__ ("cld ; rep ; ins" #s \
: >     71 : "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }

:       If you want to fix it yourself, change that "d" (port)
: to "ld" (port).

Actually it should be changed to  id   not   ld .

: >     72
: >     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)); }

:       Same here.  "d" (port) -> "ld" (port)

SAME HERE   id   not  ld

Many thanks to the person who posted it when I read it (I've now lost
track).

Todd
--
Todd R. Eigenschink             Midwest Internet Exchange, Inc.

System Manager                  (219) 483-2040

 
 
 

Kernal v1.2.13/GCC v2.7.2 - Can't make zImage (io.h?)

Post by ZERO » Sat, 01 Jun 1996 04:00:00


I just upgraded to GCC v2.7.2 on my linux v1.2.8/ELF (slackware v2.0)
system.  I followed the ELF HOWTO exactly. I tried compiling "Hello
World" and it worked fine. Tried to re-compile the 1.2.18 kernel. (I
also tried compiling 1.2.13 and got the same error.)
The compile went fine until I got to making the zImage.  (make dep,
make clean, etc all worked) This is the error that I got when I
started making the zImage:
Anyone have any ideas on how to fix this?  

Somebody else posted an error like this an got an answer that you have
to change "d (port)" to "id (port)" in lines 71 and 76 of io.h. But
these are not the lines that have an error. I tried it an it didn't
work.

-------------------------------
/usr/src/linuxelf-1.2.13/include/asm/io.h: In function
'copro_timeout':
/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand
constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand
constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand
constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand
constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h: In function 'check_fpu':
/usr/src/linuxelf-1.2.13/include/asm/io.h:78: inconsistent operand
constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand
constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h:78: inconsistent operand
constraints in an 'asm'
/usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand
constraints in an 'asm'
make: *** [init/main.o] error 1

-----------------------------------
Part of io.h:
------------------------------------

#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;

Quote:} \

__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; }

#define __INS(s) \
extern inline void ins##s(unsigned short port, void * addr, unsigned
long count) \
{ __asm__ __volatile__ ("cld ; rep ; ins" #s \
 : "=D" (addr), "=c" (count) : "id" (port),"0" (addr),"1" (count)); }

#define __OUTS(s) \
extern inline void outs##s(unsigned short port, const void * addr,
unsigned long count) \
{ __asm__ __volatile__ ("cld ; rep ; outs" #s \
 : "=S" (addr), "=c" (count) : "id" (port),"0" (addr),"1" (count)); }

__IN(b,"b","0" (0))       <==== THIS IS WRONG. LINE 78.
__IN(w,"w","0" (0))
__IN(l,"")

__OUT(b,"b",char)      <==== THIS IS ALSO WRONG. LINE 82.
__OUT(w,"w",short)
__OUT(l,,int)

__INS(b)
__INS(w)
__INS(l)

__OUTS(b)
__OUTS(w)
__OUTS(l)

PLEASE HELP!


---http://www.clark.net/pub/srokicki/home.html---

 
 
 

Kernal v1.2.13/GCC v2.7.2 - Can't make zImage (io.h?)

Post by Leonard N. Zubkof » Sat, 01 Jun 1996 04:00:00



  Newsgroups: comp.os.linux.development.system
  Date: Fri, 31 May 1996 06:39:20 GMT
  Organization: SPOZ

  I just upgraded to GCC v2.7.2 on my linux v1.2.8/ELF (slackware v2.0)
  system.  I followed the ELF HOWTO exactly. I tried compiling "Hello
  World" and it worked fine. Tried to re-compile the 1.2.18 kernel. (I
  also tried compiling 1.2.13 and got the same error.)
  The compile went fine until I got to making the zImage.  (make dep,
  make clean, etc all worked) This is the error that I got when I
  started making the zImage:
  Anyone have any ideas on how to fix this?  

  Somebody else posted an error like this an got an answer that you have
  to change "d (port)" to "id (port)" in lines 71 and 76 of io.h. But
  these are not the lines that have an error. I tried it an it didn't
  work.

Try this:

--- linux/include/asm-i386/io.h-        Mon Aug 15 00:56:19 1994

 #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) \

 #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) \

 
 
 

Kernal v1.2.13/GCC v2.7.2 - Can't make zImage (io.h?)

Post by Ian Viemeiste » Sun, 02 Jun 1996 04:00:00



> I just 'upgraded' to GCC v2.7.2 on my linux v1.2.13/ELF (slackware v3.0)
> system.  I followed the GCC upgrade doc and have updated all my binaries
> as well to the current versions.  I went and did some testing with other
> programs (both c & c++) and all seem to be compiling fine.  I then
> tried to re-compile the 1.2.13 kernel (I have two patches on the kernel
> the 3com 595 vortex, and AHA2940UW patches).  The compile went fine
> until I got to making the zImage.  (make dep, make clean, etc all worked)
> this is the error that I got when I started making the zImage:
> Anyone have any ideas on how to fix this?

> -------------------------------
> /usr/src/linuxelf-1.2.13/include/asm/io.h: In function 'copro_timeout':
> /usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'

I had the same problem - then I realized that I hadn't upgraded *everything*,
I seem to remember that binutils was the problem (likely 'as')
What version of binutils did you upgrade to?

Ian

http://styx.ios.com/~vmeister/

 
 
 

Kernal v1.2.13/GCC v2.7.2 - Can't make zImage (io.h?)

Post by Justin Schoem » Tue, 04 Jun 1996 04:00:00


: >
: > I just 'upgraded' to GCC v2.7.2 on my linux v1.2.13/ELF (slackware v3.0)
: > system.  I followed the GCC upgrade doc and have updated all my binaries
: > as well to the current versions.  I went and did some testing with other
: > programs (both c & c++) and all seem to be compiling fine.  I then
: > tried to re-compile the 1.2.13 kernel (I have two patches on the kernel
: > the 3com 595 vortex, and AHA2940UW patches).  The compile went fine
: > until I got to making the zImage.  (make dep, make clean, etc all worked)
: > this is the error that I got when I started making the zImage:
: > Anyone have any ideas on how to fix this?
: >
: > -------------------------------
: > /usr/src/linuxelf-1.2.13/include/asm/io.h: In function 'copro_timeout':
: > /usr/src/linuxelf-1.2.13/include/asm/io.h:82: inconsistent operand constraints in an 'asm'

: I had the same problem - then I realized that I hadn't upgraded *everything*,
: I seem to remember that binutils was the problem (likely 'as')
: What version of binutils did you upgrade to?

: Ian

: http://styx.ios.com/~vmeister/

This is a known problem with gcc2.7.2.  A bugfix for this (and a couple of other things) is avaliable from:

http://trishul.sci.gu.edu.au/~tony/linux/patches.html

justin schoeman