Patch for kernel with new gcc (was Re: GCC-2.7.1...)

Patch for kernel with new gcc (was Re: GCC-2.7.1...)

Post by Russell Johnsto » Thu, 07 Dec 1995 04:00:00




> I missed the original posting of the patch to enable the 1.2.13
> kernel to compile under gcc-2.7.x. Could you repost it?

The following patch allowed me to compile kernel 1.2.13 with the
new gcc-2.7.2 et. al.  It is stolen from Leonard N. Zubkoff, who
very kindly posted it a few days ago to the LinuxNet gcc mailing-
list (archived at http://homer.ncm.com/).  I compiled with H.J.'s
ELF patches too, but I assume it will also work if you are compiling
without them.

Cheers,
Russell Johnston

--- ./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) \

 
 
 

Patch for kernel with new gcc (was Re: GCC-2.7.1...)

Post by Lamar Folso » Sat, 09 Dec 1995 04:00:00


Is this patch necessary for gcc 2.7.0?  (or...My kernel, 1.2.13 and 1.3.45 are
compiled with gcc 2.7.0.  Do I need the patch if I upgrade gcc?)

Thanks,

 
 
 

1. Stable gcc-2.7.1/libg++-2.7.1/libc-5.?.?

I recently downloaded the newest libg++ (2.7.1) from MIT, but I read in
the release notes that this will not work on Linux because it is
incompatible with the Linux C library (I'm using kernel 1.3.43,
libc-5.0.9 and gcc-2.7.1).

Is anyone working on a new release of libc which will work with
libg++-2.7.1?  Is there an "integrated" libc/libg++ source tree which
will compile out of the box?

Please reply by E-mail if possible.

               Colm.

--

Computer Science Dept | WWW: http://isg.cs.tcd.ie/cbuckley/

Dublin 2, Ireland     | "Never trust a programmer with a screwdriver."

2. XFree86

3. inline asm errors when compiling linux-1.2.13 with gcc-2.7.1

4. korn shell if statement

5. gcc-2.7.1

6. PPPD Takes Over 1 Minute to Dial Out. Why?

7. FreeBSD2.1R, gcc-2.7.2 and libg++.2.7.1

8. Connection Speed

9. GCC-2.7.1 & Linux (-lieee does help)

10. How can I completely replace gcc installed by default with new gcc-3.2?

11. GCC-2.8.0 or GCC-2.8.1(alpha?)

12. gcc-2.5.8 -> gcc-2.6.3 Help I get an error

13. gcc-2.9.xx co-existing with gcc-2.7.2.3?