On Mon, Jun 26, 2000 at 10:15:14PM +0200, Svante Signell wrote:
> Kernel-2.1.6-1.src.rpm does not build:

Yes, I thought we went over this.  We know it doesn't build.  It's
rawhide.  By the time we're done, everything will build.

Here's the patch to make the kernel build, but good luck getting past
RAID initialization with a 2.96 gcc.

Matt




I figured that changing the comments to fit the new code would
be a good idea for future code readers -- the comment about the
cast will not make sense otherwise.

michaelkjohnson

 "He that composes himself is wiser than he that composes a book."
 Linux Application Development                     -- Ben Franklin
 http://people.redhat.com/johnsonm/lad/

--- linux/arch/i386/math-emu/get_address.c.gcc296       Sun Sep 13 15:18:03 1998
+++ linux/arch/i386/math-emu/get_address.c      Wed Jun 21 09:56:47 2000
@@ -155,6 +155,7 @@
 { 
   struct desc_struct descriptor;
   unsigned long base_address, limit, address, seg_top;
+  unsigned short selector;
 
   segment--;
 
@@ -172,14 +173,16 @@
       /* fs and gs aren't used by the kernel, so they still have their
         user-space values. */
     case PREFIX_FS_-1:
-      /* The cast is needed here to get gcc 2.8.0 to use a 16 bit register
+      /* The extra variable is needed here to get gcc to use a 16 bit register
         in the assembler statement. */
-      __asm__("mov %%fs,%0":"=r" ((unsigned short)addr->selector));
+      __asm__("mov %%fs,%0":"=r" (selector));
+      addr->selector = selector;
       break;
     case PREFIX_GS_-1:
-      /* The cast is needed here to get gcc 2.8.0 to use a 16 bit register
+      /* The extra variable is needed here to get gcc to use a 16 bit register
         in the assembler statement. */
-      __asm__("mov %%gs,%0":"=r" ((unsigned short)addr->selector));
+      __asm__("mov %%gs,%0":"=r" (selector));
+      addr->selector = selector;
       break;
     default:
       addr->selector = PM_REG_(segment);

Reply via email to